-
Notifications
You must be signed in to change notification settings - Fork 1k
updata testbed playbook for ubuntu 17.04 #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| # - id: sequence number for vm set on the host. | ||
| # - external_iface: interface which will be used as parent for vlan interface creation | ||
| # - vlan_base: first vlan id for the VMs | ||
| # - VMs: a dictionary which contains hostnames of VMs as a key and a dictionary with parameters (num, memory, mgmt_ip) for every VM. | ||
| # - VMs: a dictionary which contains hostnames of VMs as a key and a dictionary with parameters (num, memory, mgmt_ip) for every VM. | ||
| # - topology: a dictionary which contains hostnames of VMs as a key and vlans value which define a topology (numbers of connected ports for every VM) | ||
| # - mgmt_bridge: linux bridge which is used for management interface connections | ||
| # - root_path: path where disk images for VMs are created | ||
|
|
@@ -13,8 +13,49 @@ | |
| # - vm_images_url: url where base images are located | ||
| # - vmimages_saskey: a key for Azure download service. Could be set to '' | ||
|
|
||
| # Need latest ubuntu 4.10 kernel to fix a openvswitch bug | ||
| # https://bugs.launchpad.net/ubuntu/+source/kernel-package/+bug/1685742 | ||
| - name: Check if kernel upgrade needed | ||
| set_fact: | ||
| kernel_upgrade_needed: true | ||
| when: | ||
| - ansible_distribution == "Ubuntu" | ||
| - ansible_distribution_version == "17.04" | ||
| - ansible_kernel.find('4.10.0') != -1 | ||
| - "{{ ansible_kernel | regex_replace('4.10.0-([0-9]+)-.*', '\\1') | int < 25 }}" | ||
|
|
||
| - block: | ||
| - debug: msg="{{ ansible_kernel }}" | ||
|
|
||
| - name: Upgrade kernel package | ||
| apt: pkg={{ item }} state=latest | ||
| become: yes | ||
| with_items: | ||
| - linux-image-generic | ||
| - linux-image-extra-virtual | ||
|
|
||
| - name: Prompt for rebooting | ||
| fail: | ||
| msg: "Kernel upgraded, need to reboot!" | ||
| when: kernel_upgrade_needed is defined | ||
|
|
||
| - name: Add docker repository for 17.04 | ||
| apt_repository: | ||
| repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable | ||
| state: present | ||
| become: yes | ||
| when: ansible_distribution_version == "17.04" | ||
|
|
||
| - name: Add docker repository for 16.04 | ||
| apt_repository: | ||
| repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable | ||
| state: present | ||
| become: yes | ||
| when: ansible_distribution_version == "16.04" | ||
|
|
||
| - name: Install necessary packages | ||
| apt: pkg={{ item }} update_cache=yes cache_valid_time=3600 | ||
| apt: pkg={{ item }} update_cache=yes cache_valid_time=86400 | ||
| become: yes | ||
| with_items: | ||
| - qemu | ||
| - openvswitch-switch | ||
|
|
@@ -26,11 +67,24 @@ | |
| - libvirt-bin | ||
| - python-libvirt | ||
| - python-pip | ||
| - apt-transport-https | ||
| - ca-certificates | ||
| - curl | ||
| - software-properties-common | ||
| - docker-ce | ||
|
|
||
| - name: Install python packages | ||
| pip: name=docker-py state=present version=1.7.2 | ||
| become: yes | ||
| environment: "{{ proxy_env | default({}) }}" | ||
|
|
||
| - name: Install br_netfilter kernel module | ||
| become: yes | ||
| modprobe: name=br_netfilter state=present | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need br_netfilter?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in roles/vm_set/test/start.yml ""
|
||
|
|
||
| - name: Ensure {{ root_path }} exists | ||
| file: path={{ root_path }} state=directory | ||
|
|
||
| - name: Install cleanup script | ||
| template: src=cleanup.sh.j2 | ||
| dest={{ root_path }}/cleanup.sh | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,4 @@ | |
| vm_topology: | ||
| cmd: 'destroy' | ||
| vm_names: "{{ VM_hosts }}" | ||
|
|
||
| become: yes | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to make this kernel upgrade? Can you please leave a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comments