Update files for OVS/OVN

Update files based on additional testing. Add lines to Vagrantfile to use virtio NICs w/ VirtualBox. Re-arrange config keys in Consul configuration template. Add quotes to IP addresses in machines.yml. Update Ansible playbook in provision.yml to install Python OVS libraries.
This commit is contained in:
Scott S. Lowe 2016-09-28 23:14:22 -06:00
parent 31411b64f1
commit 70bb2e959e
4 changed files with 20 additions and 16 deletions

View file

@ -59,6 +59,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.memory = machine['ram']
vb.cpus = machine['vcpu']
override.vm.box = machine['vb_box']
vb.customize ['modifyvm', :id, '--nictype1', 'virtio']
vb.customize ['modifyvm', :id, '--nictype2', 'virtio']
end # srv.vm.provider 'virtualbox'
end # config.vm.define
end # machines.each

View file

@ -3,17 +3,17 @@
{% set quote = '"' %}
{
"advertise_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}",
"bootstrap_expect": 3,
"server": true,
"client_addr": "0.0.0.0",
"datacenter": "dc1",
"data_dir": "/var/consul",
"enable_syslog": true,
"log_level": "INFO",
"enable_syslog": false,
"retry_join": [ {% for host in groups['all'] %}{% if not loop.last %}
"{{ hostvars[host]['ansible_eth1']['ipv4']['address'] }}",
{% else %}
"{{ hostvars[host]['ansible_eth1']['ipv4']['address'] }}"
{% endif %}{% endfor %} ],
"client_addr": "0.0.0.0",
"advertise_addr": "{{ hostvars[inventory_hostname]['ansible_eth1']['ipv4']['address'] }}"
"server": true
}

View file

@ -4,16 +4,16 @@
vb_box: "ubuntu/trusty64"
ram: "512"
vcpu: "1"
ip_addr: 192.168.100.101
ip_addr: "192.168.100.101"
- name: "docker-02"
vmw_box: "slowe/ubuntu-trusty-x64"
vb_box: "ubuntu/trusty64"
ram: "512"
vcpu: "1"
ip_addr: 192.168.100.102
ip_addr: "192.168.100.102"
- name: "docker-03"
vmw_box: "slowe/ubuntu-trusty-x64"
vb_box: "ubuntu/trusty64"
ram: "512"
vcpu: "1"
ip_addr: 192.168.100.103
ip_addr: "192.168.100.103"

View file

@ -100,8 +100,8 @@
- name: Add Docker APT repository key
apt_key:
keyserver: p80.pool.sks-keyservers.net
id: 58118E89F3A912897C070ADBF76221572C52609D
keyserver: "p80.pool.sks-keyservers.net"
id: "58118E89F3A912897C070ADBF76221572C52609D"
state: "present"
tags:
- docker
@ -166,18 +166,20 @@
- docker
- docker-cfg
- name: Install Python flask module
- name: Install Python modules
pip:
name: "Flask"
name: "{{ item }}"
with_items:
- "Flask"
- "ovs"
tags:
- docker
- ovn
- name: Clone OVS repository
- name: Download OVS 2.6.0 release tarball
become: "no"
git:
repo: "https://github.com/openvswitch/ovs.git"
dest: "~/ovs"
update: "no"
get_url:
url: "https://github.com/openvswitch/ovs/archive/v2.6.0.tar.gz"
dest: "/home/vagrant/2.6.0.tar.gz"
tags:
- ovn