diff options
author | Yifei Xue <xueyifei@huawei.com> | 2017-07-17 17:21:12 +0800 |
---|---|---|
committer | Yifei Xue <xueyifei@huawei.com> | 2017-07-17 17:21:12 +0800 |
commit | f99f3977b6ce67dc336bfd1ca614806f404f75c1 (patch) | |
tree | 4cb1668b724fefa9752f135a305372b7972580cd /deploy/adapters/ansible/roles/onos_cluster/tasks | |
parent | c2cc1f592fa352dda5ea6600c9871659bfcfd2ef (diff) |
Bug fix for onos sfc
Add the configuration of sfc driver in
networking-sfc and networking-onos.
Change-Id: I2f9345d2caa030960e707f15406cb22f6b525dc0
Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/onos_cluster/tasks')
-rwxr-xr-x | deploy/adapters/ansible/roles/onos_cluster/tasks/onos_sfc_controller.yml | 28 |
1 files changed, 18 insertions, 10 deletions
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] |