summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbobzhou <bob.zh@huawei.com>2017-03-10 10:09:55 +0800
committerbobzhou <bob.zh@huawei.com>2017-04-13 15:40:15 +0800
commit266e9a5336defeff5f10331ab8316d69e7b20cc1 (patch)
tree01f72ebbf2e73e5021d032f6a4d9328ab345cd93 /lib
parentdf58098027d081e99cdcce863ef24a992d8a7adb (diff)
add onos deployment steps
opnfv-tht-pr: 128 opnfv-puppet-tripleo-pr: 23 Change-Id: Ib99f7e3968ed03bd86ca0de9c6c37c9871921486 Signed-off-by: bobzhou <bob.zh@huawei.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/installer/onos/onos_gw_mac_update.sh56
-rwxr-xr-xlib/overcloud-deploy-functions.sh16
2 files changed, 8 insertions, 64 deletions
diff --git a/lib/installer/onos/onos_gw_mac_update.sh b/lib/installer/onos/onos_gw_mac_update.sh
deleted file mode 100644
index 3b3b0724..00000000
--- a/lib/installer/onos/onos_gw_mac_update.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-# Update gateway mac to onos for l3 function
-
-# author: Bob zhou
-# author: Tim Rozet
-
-
-# Update gateway mac to onos for l3 function
-# params: external CIDR, external gateway
-function onos_update_gw_mac {
- local CIDR
- local GW_IP
-
- if [[ -z "$1" || -z "$2" ]]; then
- return 1
- else
- CIDR=$1
- GW_IP=$2
- fi
-
- if [ -z "$UNDERCLOUD" ]; then
- #if not found then dnsmasq may be using leasefile-ro
- undercloud_mac=$(virsh domiflist undercloud | grep default | \
- grep -Eo "[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+:[0-9a-f\]+")
- UNDERCLOUD=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'})
- fi
- # get controller ip address
- controller_ip=$(ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-source stackrc
-openstack server list | grep overcloud-controller-0 | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
-EOI
-)
-
- if [ -z "$controller_ip" ]; then
- echo "ERROR: Failed to find controller_ip for overcloud-controller-0"
- return 1
- fi
-
- # get gateway mac
- GW_MAC=$(arping ${GW_IP} -c 1 -I br-external | grep -Eo '([0-9a-fA-F]{2})(([/\s:-][0-9a-fA-F]{2}){5})')
-
- if [ -z "$GW_MAC" ]; then
- echo "ERROR: Failed to find gateway mac for ${GW_IP}"
- return 1
- fi
-
- # update gateway mac to onos
- ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-ssh -T ${SSH_OPTIONS[@]} "heat-admin@${controller_ip}" <<EOF
-echo "external gateway mac is ${GW_MAC}"
-/opt/onos/bin/onos "externalgateway-update -m ${GW_MAC}"
-EOF
-EOI
-
-}
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 0ed98fb7..f30e875f 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -47,14 +47,12 @@ function overcloud_deploy {
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
SDN_IMAGE=opendaylight
elif [ "${deploy_options_array['sdn_controller']}" == 'onos' ]; then
- echo -e "${red}ERROR: ONOS is unsupported in Danube...exiting${reset}"
- exit 1
- #if [ "${deploy_options_array['sfc']}" == 'True' ]; then
- # DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos_sfc.yaml"
- #else
- # DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
- #fi
- #SDN_IMAGE=onos
+ if [ "${deploy_options_array['sfc']}" == 'True' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-onos-sfc.yaml"
+ else
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-onos.yaml"
+ fi
+ SDN_IMAGE=onos
elif [ "${deploy_options_array['sdn_controller']}" == 'ovn' ]; then
if [[ "$ha_enabled" == "True" ]]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-ovn-ha.yaml"
@@ -168,6 +166,8 @@ EOI
# upgrade ovs into ovs 2.5.90 with NSH function if SFC is enabled
if [[ "${deploy_options_array['sfc']}" == 'True' && "${deploy_options_array['dataplane']}" == 'ovs' ]]; then
+ echo "ONOS SFC is currently unavailable. JIRA: APEX-417"
+ exit 1
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_kmod_rpm_name}" \
--run-command "yum upgrade -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_rpm_name}" \