Merge branch 'master' into corywip
This commit is contained in:
commit
9106614582
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,8 +4,9 @@ After=network.target
|
||||||
StartLimitIntervalSec=0
|
StartLimitIntervalSec=0
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=oneshot
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
RemainAfterExit=true
|
||||||
|
|
||||||
ExecStart=/usr/sbin/ovsovn-service-manager.sh START
|
ExecStart=/usr/sbin/ovsovn-service-manager.sh START
|
||||||
ExecStop=/usr/sbin/ovsovn-service-manager.sh STOP
|
ExecStop=/usr/sbin/ovsovn-service-manager.sh STOP
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -33,9 +33,9 @@
|
||||||
src: "{{item}}"
|
src: "{{item}}"
|
||||||
dest: "/tmp/{{item}}"
|
dest: "/tmp/{{item}}"
|
||||||
with_items:
|
with_items:
|
||||||
- libopenvswitch_2.13.0-1_amd64.deb
|
- libopenvswitch_2.14.0-1_amd64.deb
|
||||||
- openvswitch-common_2.13.0-1_amd64.deb
|
- openvswitch-common_2.14.0-1_amd64.deb
|
||||||
- openvswitch-switch_2.13.0-1_amd64.deb
|
- openvswitch-switch_2.14.0-1_amd64.deb
|
||||||
when: force_new_ovs_download == True
|
when: force_new_ovs_download == True
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@
|
||||||
apt:
|
apt:
|
||||||
deb: "{{ item }}"
|
deb: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "/tmp/libopenvswitch_2.13.0-1_amd64.deb"
|
- "/tmp/libopenvswitch_2.14.0-1_amd64.deb"
|
||||||
- "/tmp/openvswitch-common_2.13.0-1_amd64.deb"
|
- "/tmp/openvswitch-common_2.14.0-1_amd64.deb"
|
||||||
- "/tmp/openvswitch-switch_2.13.0-1_amd64.deb"
|
- "/tmp/openvswitch-switch_2.14.0-1_amd64.deb"
|
||||||
when: force_new_ovs_download == True
|
when: force_new_ovs_download == True
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,18 +95,23 @@
|
||||||
src: "{{item}}"
|
src: "{{item}}"
|
||||||
dest: "/tmp/{{item}}"
|
dest: "/tmp/{{item}}"
|
||||||
with_items:
|
with_items:
|
||||||
- ovn_20.06.0-1_amd64.deb
|
- ovn_20.09.0-1_amd64.deb
|
||||||
when: force_new_ovn_download == True
|
when: force_new_ovn_download == True
|
||||||
|
|
||||||
- name: "Install packages"
|
- name: "Install packages"
|
||||||
apt:
|
apt:
|
||||||
deb: "{{ item }}"
|
deb: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "/tmp/ovn_20.06.0-1_amd64.deb"
|
- "/tmp/ovn_20.09.0-1_amd64.deb"
|
||||||
when: force_new_ovn_download == True
|
when: force_new_ovn_download == True
|
||||||
|
|
||||||
|
- set_fact: ovn_sb_group_name_rendered="{{hostvars[ansible_hostname].ovn_sb_db_group}}"
|
||||||
|
tags: service
|
||||||
|
|
||||||
|
- name: Generate OVN SB Connection fact
|
||||||
|
set_fact: OVN_SB_Connection="{% for host in groups[ovn_sb_group_name_rendered] %}tcp:{{ hostvars[host].host_loopback_IP }}:6642{% if not loop.last %},{% endif %}{% endfor %}"
|
||||||
|
tags: service
|
||||||
|
|
||||||
#Install the custom service to start OVS and OVN as required
|
#Install the custom service to start OVS and OVN as required
|
||||||
- name: "Copy /usr/sbin/ovsovn-service-manager.sh file"
|
- name: "Copy /usr/sbin/ovsovn-service-manager.sh file"
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -8,9 +8,9 @@ echo "ZZZ $1"
|
||||||
|
|
||||||
START(){
|
START(){
|
||||||
hostname=$(hostname)
|
hostname=$(hostname)
|
||||||
loopbackIP={{this_host_ip_rendered}}
|
loopbackIP={{host_loopback_IP}}
|
||||||
controllerIP={{OVN_VIP}}
|
|
||||||
echo "Starting OpenVSwitch and OVN on $hostname with $loopbackIP and pointing to OVN controller $controllerIP"
|
echo "Starting OpenVSwitch and OVN on $hostname with $loopbackIP and pointing to OVN controller {{OVN_SB_Connection}}"
|
||||||
|
|
||||||
DIR="/var/run/openvswitch/db.sock"
|
DIR="/var/run/openvswitch/db.sock"
|
||||||
if [ -d "$DIR" ]; then
|
if [ -d "$DIR" ]; then
|
||||||
|
@ -21,9 +21,10 @@ START(){
|
||||||
/usr/share/openvswitch/scripts/ovs-ctl start --system-id=$hostname
|
/usr/share/openvswitch/scripts/ovs-ctl start --system-id=$hostname
|
||||||
#Instruct OVSDB to listen on 127.0.0.2:6640 so the ovs-vsctl command from within a container can access OpenVswitch
|
#Instruct OVSDB to listen on 127.0.0.2:6640 so the ovs-vsctl command from within a container can access OpenVswitch
|
||||||
ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640
|
ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640
|
||||||
|
ovs-vsctl del-br br-int
|
||||||
|
|
||||||
ovs-vsctl set open . external-ids:ovn-bridge=br-int
|
ovs-vsctl set open . external-ids:ovn-bridge=br-int
|
||||||
ovs-vsctl set open . external-ids:ovn-remote=tcp:$controllerIP:6642
|
ovs-vsctl set open . external-ids:ovn-remote={{OVN_SB_Connection}}
|
||||||
ovs-vsctl set open . external-ids:ovn-encap-type=geneve
|
ovs-vsctl set open . external-ids:ovn-encap-type=geneve
|
||||||
ovs-vsctl set open . external-ids:ovn-encap-ip=$loopbackIP
|
ovs-vsctl set open . external-ids:ovn-encap-ip=$loopbackIP
|
||||||
/usr/share/ovn/scripts/ovn-ctl start_controller
|
/usr/share/ovn/scripts/ovn-ctl start_controller
|
||||||
|
|
Loading…
Reference in New Issue