aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/odl_sfc/roles/setup-odl-sfc/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/odl_sfc/roles/setup-odl-sfc/tasks')
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml1
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml35
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml5
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml32
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml2
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml11
-rw-r--r--plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml8
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml1
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml4
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml7
10 files changed, 32 insertions, 74 deletions
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml
index dc071cc7..684f314c 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-1.yml
@@ -8,7 +8,6 @@
- name: install networking-odl
pip:
name: networking-odl
- version: "{{ networking_odl_version }}"
virtualenv: /openstack/venvs/neutron-15.1.4
- name: configure vsctl for dhcp agent
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml
index 2527852e..e0a9088f 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-agents-3.yml
@@ -4,41 +4,10 @@
shell: |
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight_v2;
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan;
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling "True";
+ crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini ovs;
+ crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver;
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security;
-- name: configure bridge_mappings -> ml2
- shell: |
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
- ovs bridge_mappings "{{ contr_l2_mappings }}";
- when:
- - odl_l3_agent == "Disable"
- - inventory_hostname not in groups['nova_compute']
-
-- name: configure bridge_mappings -> ml2
- shell: |
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
- ovs bridge_mappings "{{ compu_l2_mappings }}";
- when:
- - odl_l3_agent == "Disable"
- - inventory_hostname in groups['nova_compute']
-
-- name: configure bridge_mappings for L3
- shell: |
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
- ovs bridge_mappings "{{ contr_l3_mappings }}";
- when:
- - odl_l3_agent == "Enable"
- - inventory_hostname not in groups['nova_compute']
-
-- name: configure bridge_mappings for L3
- shell: |
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
- ovs bridge_mappings "{{ compu_l3_mappings }}";
- when:
- - odl_l3_agent == "Enable"
- - inventory_hostname in groups['nova_compute']
-
- name: configure external bridge name for L2
shell: |
crudini --set /etc/neutron/l3_agent.ini \
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml
index 6879340e..9ca27e0a 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-hosts-1.yml
@@ -94,6 +94,11 @@
sed -i 's/port="8282"/port="8081"/'
{{ odl_home }}configuration/tomcat-server.xml
+- name: modify 8181 to 8081
+ shell: >
+ sed -i 's/8181/8081/'
+ {{ odl_home }}etc/org.ops4j.pax.web.cfg
+
- name: remove karaf data directory
file:
path: "{{ odl_home }}data"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
index 2e58e141..7b699a35 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
@@ -1,27 +1,9 @@
---
+- name: copy download script
+ copy:
+ src: odl_pkg.sh
+ dest: /opt/odl_pkg.sh
+ mode: 0777
-- name: download networking-odl
- get_url:
- url: "{{ odl_pip }}"
- dest: /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64
-
-- name: download networking-sfc
- shell: |
- mkdir -p /opt/tmp
- pip install networking-sfc==4.0.0 -d /opt/tmp/
- cp /opt/tmp/networking* /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/
- rm -rf /opt/tmp
- when:
- - odl_sfc == "Enable"
- - inventory_hostname in groups['repo_container'][0]
-
-- name: patch networking-odl to fix a bug
- shell: |
- cd /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/
- tar -zxf networking-odl-4.0.0.tar.gz # hard code, need to modify
- rm -rf networking-odl-4.0.0.tar.gz
- sed -i 's/^Babel.*/Babel!=2.4.0,>=2.3.4/' networking-odl-4.0.0/requirements.txt
- tar -zcf networking-odl-4.0.0.tar.gz networking-odl-4.0.0/
- rm -rf networking-odl-4.0.0/
- pip install networking-odl-4.0.0.tar.gz -d ./
- cd -
+- name: download networking sfc and odl
+ command: su -s /bin/sh -c "/opt/odl_pkg.sh"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml
index e2dd128d..40149346 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-1.yml
@@ -8,13 +8,11 @@
- name: install networking-odl
pip:
name: networking-odl
- version: "{{ networking_odl_version }}"
virtualenv: /openstack/venvs/neutron-15.1.4 # Todo: hardcode, need to modify
- name: install networking-sfc
pip:
name: networking-sfc
- version: "4.0.0"
virtualenv: /openstack/venvs/neutron-15.1.4
when: odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml
index b54fce22..d8bcf154 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-2.yml
@@ -10,16 +10,9 @@
shell: >
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight_v2;
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vxlan;
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs enable_tunneling "True";
+ crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini ovs;
+ crudini --del /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver;
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 extension_drivers port_security;
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs bridge_mappings
- "{{ contr_l2_mappings }}";
-
-- name: configure bridge_mappings for L3
- shell: >
- crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs bridge_mappings
- "{{ contr_l3_mappings }}";
- when: odl_l3_agent == "Enable"
- name: turn off l3 ha for odl l2
shell: |
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml
new file mode 100644
index 00000000..c43b6dcc
--- /dev/null
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-tacker-1.yml
@@ -0,0 +1,8 @@
+---
+
+- name: upgrade networking-sfc
+ pip:
+ name: networking-sfc
+ extra_args: -U
+ virtualenv: /openstack/venvs/tacker-15.1.4
+ when: odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml
index 613c796b..d10634fa 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-utility-1.yml
@@ -3,5 +3,4 @@
- name: Install networking-sfc for CLI
pip:
name: networking-sfc
- version: "4.0.0"
when: odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml
index e65be002..6b226688 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/main.yml
@@ -1,4 +1,6 @@
---
- include: odl-cluster.yml
- when: opendaylight is defined and opendaylight == "Enable"
+ when:
+ - opendaylight is defined and opendaylight == "Enable"
+ - odl_sfc is defined and odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml
index a22e980f..ee2ee32a 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-cluster.yml
@@ -4,7 +4,7 @@
- include_vars: "{{ openstack_passwd_file }}"
-- include_vars: odl-pre.yml
+- include: odl-pre.yml
when: inventory_hostname == "localhost"
- include_vars: /tmp/odl-extra-vars.yml
@@ -15,7 +15,7 @@
- include: control-repos-1.yml
vars:
odl_pip: "{{ networking_odl_url }}"
- when: inventory_hostname in groups['repo_container']
+ when: inventory_hostname == groups['repo_container'][0]
- include: control-servers-1.yml
when: inventory_hostname in groups['neutron_server']
@@ -48,4 +48,7 @@
- inventory_hostname in groups['neutron_server'][0]
- inventory_hostname not in groups['network_hosts']
+- include: control-tacker-1.yml
+ when: inventory_hostname in groups['tacker_all']
+
- include: odl-post.yml