aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml
diff options
context:
space:
mode:
authorCNlucius <lukai1@huawei.com>2016-06-30 10:27:59 +0800
committerCNlucius CNlucius <lukai1@huawei.com>2016-07-05 07:00:04 +0000
commitff20b4011edfe706bcc605ca30d1f618a889a027 (patch)
treeb0360cee03161dbff9b29b2e972279b1548e46b3 /deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml
parent780256c594ade62a006b5bf740f868714a60ac8e (diff)
COMPASS-409
Upgrade ONOS support for Compass Change-Id: Iefc37dc629b1ad7c19bf2b679ec08c9cb15c6a76 Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml')
-rwxr-xr-xdeploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml76
1 files changed, 15 insertions, 61 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml
index 1db17329..aac787ea 100755
--- a/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml
+++ b/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml
@@ -7,38 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-#- name: remove neutron-plugin-openvswitch-agent auto start
-# shell: >
-# update-rc.d neutron-openvswitch-agent remove;
-# sed -i /neutron-openvswitch-agent/d /opt/service
-#- name: shut down and disable Neutron's agent services
-# service: name=neutron-openvswitch-agent state=stopped
-
-#- name: Stop the Open vSwitch service and clear existing OVSDB
-# shell: >
-# ovs-vsctl del-br br-int ;
-# ovs-vsctl del-br br-tun ;
-# ovs-vsctl del-manager ;
-
-#- 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: start up onos-external nic
-# command: su -s /bin/sh -c "ifconfig eth2 0 up"
- name: set veth port
shell: >
ip link add onos_port1 type veth peer name onos_port2;
@@ -46,26 +15,28 @@
ifconfig onos_port2 up;
ignore_errors: True
-- name: set veth to ovs
- shell: >
- export externamMac=`ifconfig eth1 | grep -Eo '\<[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'`;
- ifconfig onos_port2 hw ether $externamMac;
- ovs-vsctl add-port br-prv onos_port1;
- ignore_errors: True
+- name: add openflow-base feature
+ command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow-base'";
+ when: inventory_hostname in groups['onos']
-#- name: wait for onos start time
-# shell: "sleep 200"
+- name: add openflow feature
+ command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow'";
+ when: inventory_hostname in groups['onos']
- name: add ovsdatabase feature
command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-ovsdatabase'";
- when: inventory_hostname == groups['onos'][0]
+ when: inventory_hostname in groups['onos']
-- name: add openflow-base feature
- command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow-base'";
+- name: add ovsdb-base feature
+ command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-ovsdb-base'";
when: inventory_hostname in groups['onos']
-- name: add openflow feature
- command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow'";
+- name: add onos driver ovsdb feature
+ command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-drivers-ovsdb'";
+ when: inventory_hostname in groups['onos']
+
+- name: add ovsdb provider host feature
+ command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-ovsdb-provider-host'";
when: inventory_hostname in groups['onos']
- name: add vtn feature
@@ -79,23 +50,6 @@
- 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;"
-- name: create public network
- shell: >
- export OS_PASSWORD=console;
- export OS_TENANT_NAME=admin;
- export OS_AUTH_URL=http://{{ internal_vip.ip }}:35357/v2.0;
- export OS_USERNAME=ADMIN;
- neutron net-create ext-net --shared --router:external=True;
- neutron subnet-create ext-net {{ public_net_info.floating_ip_cidr }} --name ext-subnet --allocation-pool start={{ public_net_info.floating_ip_start }},end={{ public_net_info.floating_ip_end }};
- when: inventory_hostname == groups['controller'][0]
-
-- name: set gateway mac address
- shell: >
- ping -c 1 {{ ansible_default_ipv4.gateway }};
- gatewayMac=`arp -a {{ ansible_default_ipv4.gateway }} | awk '{print $4}'`;
- /opt/onos/bin/onos "externalgateway-update -m $gatewayMac";
- when: inventory_hostname in groups['onos']
-
- name: delete default gateway
shell: >
route delete default;