diff options
author | chenshuai@huawei.com <chenshuai@huawei.com> | 2015-09-20 12:45:08 +0800 |
---|---|---|
committer | chenshuai@huawei.com <chenshuai@huawei.com> | 2015-09-20 12:46:50 +0800 |
commit | ab9c9cbd1c96611c5cbe56260a73524186bf72f1 (patch) | |
tree | 6510d4c72133a0f5ea1681e58650538995bcee7e /deploy/adapters/ansible/roles/onos/tasks/openvswitch.yml | |
parent | fb0d6fc92a6286953e0985a68d317cd108cf8d4b (diff) |
Write ONOS ansible script for Ubuntu14.04
JIRA: COMPASS-54
Change-Id: Icb0f0023681a0407bb987757171f72d70c1360f6
Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/onos/tasks/openvswitch.yml')
-rwxr-xr-x | deploy/adapters/ansible/roles/onos/tasks/openvswitch.yml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/onos/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/onos/tasks/openvswitch.yml new file mode 100755 index 00000000..7658d90d --- /dev/null +++ b/deploy/adapters/ansible/roles/onos/tasks/openvswitch.yml @@ -0,0 +1,34 @@ +--- +- name: remove neutron-plugin-openvswitch-agent auto start + shell: > + update-rc.d neutron-plugin-openvswitch-agent remove; + sed -i /neutron-plugin-openvswitch-agent/d /opt/service + +- name: shut down and disable Neutron's agent services + service: name=neutron-plugin-openvswitch-agent state=stopped + +- name: Stop the Open vSwitch service and clear existing OVSDB + shell: > + service openvswitch-switch stop ; + rm -rf /var/log/openvswitch/* ; + rm -rf /etc/openvswitch/conf.db ; + service openvswitch-switch start ; + +#- name: get image http server +# shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf +# register: http_server +# +#- name: download ovs +# get_url: url="http://{{ http_server.stdout_lines[0] }}/packages/onos/openvswitch.tar" dest=/opt/openvswitch.tar +# +#- name: extract ovs +# command: su -s /bin/sh -c "tar xvf /opt/openvswitch.tar -C /opt/" +# +#- name: update ovs +# shell: > +# cd /opt/openvswitch; +# dpkg -i openvswitch-common_2.3.0-1_amd64.deb; +# dpkg -i openvswitch-switch_2.3.0-1_amd64.deb; +- name: Set ONOS as the manager + command: su -s /bin/sh -c "ovs-vsctl set-manager tcp:{{ ip_settings[groups['onos'][0]]['mgmt']['ip'] }}:6640;" + |