diff options
author | Yifei Xue <xueyifei@huawei.com> | 2018-01-24 04:04:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-24 04:04:36 +0000 |
commit | 667f37288ec38370c9bd5b463d3756ce4f28299d (patch) | |
tree | 5d26893c5a7d560d4bf1771b6690502926661611 /deploy | |
parent | 80a3a5e0f7cb3d555e07f1e940854624d320ffbd (diff) | |
parent | f99f3977b6ce67dc336bfd1ca614806f404f75c1 (diff) |
Merge "Bug fix for onos sfc" into stable/danubestable/danube
Diffstat (limited to 'deploy')
4 files changed, 31 insertions, 12 deletions
diff --git a/deploy/adapters/ansible/roles/onos_cluster/files/driver.sh b/deploy/adapters/ansible/roles/onos_cluster/files/driver.sh new file mode 100755 index 00000000..97706dbe --- /dev/null +++ b/deploy/adapters/ansible/roles/onos_cluster/files/driver.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sed -i '/\[networking_sfc.sfc.drivers\]/a onos = networking_onos.services.sfc.driver:OnosSfcDriver' /usr/local/lib/python2.7/dist-packages/networking_sfc-3.0.0.dist-info/entry_points.txt + +sed -i '/\[networking_sfc.flowclassifier.drivers\]/a onos = networking_onos.services.flowclassifier.driver:OnosFlowClassifierDriver' /usr/local/lib/python2.7/dist-packages/networking_sfc-3.0.0.dist-info/entry_points.txt diff --git a/deploy/adapters/ansible/roles/onos_cluster/files/sfc_plugins.conf b/deploy/adapters/ansible/roles/onos_cluster/files/sfc_plugins.conf index ddef928d..a5049f61 100644..100755 --- a/deploy/adapters/ansible/roles/onos_cluster/files/sfc_plugins.conf +++ b/deploy/adapters/ansible/roles/onos_cluster/files/sfc_plugins.conf @@ -2,3 +2,9 @@ service_plugins = networking_sfc.services.sfc.plugin.SfcPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,onos_router +[sfc] +drivers = onos + +[flowclassifier] +drivers = onos + diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_sfc_controller.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_sfc_controller.yml index 2874d503..136e8da5 100755 --- a/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_sfc_controller.yml +++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_sfc_controller.yml @@ -17,13 +17,11 @@ url: "http://{{ http_server.stdout_lines[0] }}/packages/onos/{{ onos_driver }}" dest: /opt/ -- name: download onos sfc driver package - get_url: - url: "http://{{ http_server.stdout_lines[0] }}/packages/onos/{{ onos_sfc_driver }}" - dest: /opt/ - - name: unarchive onos driver package - command: su -s /bin/sh -c "tar xvf /opt/networking-onos.tar -C /opt/" + command: su -s /bin/sh -c "tar zxf /opt/networking-onos.tar.gz -C /opt/" + +- name: upgrade stevedore + pip: name=stevedore state=latest - name: install onos driver command: su -s /bin/sh -c "/opt/networking-onos/install_driver.sh" @@ -31,6 +29,15 @@ - name: install networking-sfc pip: name=networking-sfc state=present version=3.0.0 +- name: copy driver_configuration script + copy: + src: driver.sh + dest: "/opt/driver.sh" + mode: 0777 + +- name: Configure sfc driver + command: su -s /bin/sh -c "/opt/driver.sh;" + - name: install onos required packages action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" with_items: "{{ packages }}" @@ -181,11 +188,12 @@ - name: Configure Neutron3 shell: > - mysql -e "drop database if exists neutron_ml2;"; - mysql -e "create database neutron_ml2 character set utf8;"; - mysql -e "grant all on neutron_ml2.* to 'neutron'@'%';"; + mysql -e "drop database if exists neutron;"; + mysql -e "create database neutron character set utf8;"; + mysql -e "grant all on neutron.* to 'neutron'@'%' identified by \ + '{{ NEUTRON_DBPASS }}';"; su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \ - --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron; + --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron; su -s /bin/sh -c "neutron-db-manage --subproject networking-sfc upgrade head" neutron; when: inventory_hostname == haproxy_hosts.keys()[0] diff --git a/deploy/adapters/ansible/roles/onos_cluster/vars/main.yml b/deploy/adapters/ansible/roles/onos_cluster/vars/main.yml index 3c3dd557..e140446f 100755 --- a/deploy/adapters/ansible/roles/onos_cluster/vars/main.yml +++ b/deploy/adapters/ansible/roles/onos_cluster/vars/main.yml @@ -13,8 +13,8 @@ onos_home: /opt/onos/ karaf_dist: apache-karaf-3.0.5 jdk8_pkg_name: jdk-8u51-linux-x64.tar.gz jdk8_script_name: install_jdk8.tar -onos_driver: networking-onos.tar -onos_sfc_driver: networking-sfc.tar +onos_driver: networking-onos.tar.gz +onos_sfc_driver: networking-sfc.tar.gz repository: repository.tar sfc_plugins: src: sfc_plugins.conf |