add onos deployment steps 21/30221/29
authorbobzhou <bob.zh@huawei.com>
Fri, 10 Mar 2017 02:09:55 +0000 (10:09 +0800)
committerbobzhou <bob.zh@huawei.com>
Thu, 13 Apr 2017 07:40:15 +0000 (15:40 +0800)
opnfv-tht-pr: 128
opnfv-puppet-tripleo-pr: 23

Change-Id: Ib99f7e3968ed03bd86ca0de9c6c37c9871921486
Signed-off-by: bobzhou <bob.zh@huawei.com>
build/Makefile
build/c7-opnfv-x86_64-comps.xml
build/opnfv-environment.yaml
build/overcloud-onos.sh
build/rpm_specs/opnfv-apex-common.spec
build/variables.sh
ci/deploy.sh
lib/installer/onos/onos_gw_mac_update.sh [deleted file]
lib/overcloud-deploy-functions.sh

index 5dc4ef1..ed98325 100644 (file)
@@ -60,17 +60,14 @@ clean:
 clean-cache:
        rm -rf $(CACHE_DIR)
 
-# ONOS integration did not get updated for Danube,
-# removing it from the default builds
-
 .PHONY: images
-images: undercloud overcloud-full overcloud-opendaylight overcloud-onos
+images: undercloud overcloud-full overcloud-opendaylight overcloud-onos
 
 .PHONY: rpms
-rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
+rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
 
 .PHONY: rpms-check
-rpms-check: release-rpm-check common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
+rpms-check: release-rpm-check common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
 
 .PHONY: rpms-clean
 rpms-clean:
index 8bbe81d..16f6ec7 100644 (file)
       <groupid>virtualization-hypervisor</groupid>
       <groupid>virtualization-tools</groupid>
       <groupid>apex-opendaylight</groupid>
-      <!--groupid>apex-onos</groupid-->
+      <groupid>apex-onos</groupid>
     </grouplist>
     <optionlist>
       <groupid>virtualization-platform</groupid>
       <groupid>virtualization-hypervisor</groupid>
       <groupid>virtualization-tools</groupid>
       <groupid>apex-opendaylight</groupid>
-      <!--groupid>apex-onos</groupid-->
+      <groupid>apex-onos</groupid>
     </grouplist>
     <optionlist>
       <groupid>kde-desktop</groupid>
index e29b0c7..8eeb126 100644 (file)
@@ -107,6 +107,8 @@ parameter_defaults:
     - OS::TripleO::Services::TripleoFirewall
     - OS::TripleO::Services::OpenDaylightApi
     - OS::TripleO::Services::OpenDaylightOvs
+    - OS::TripleO::Services::ONOSApi
+    - OS::TripleO::Services::ONOSOvs
     - OS::TripleO::Services::SensuClient
     - OS::TripleO::Services::FluentdClient
     - OS::TripleO::Services::VipHosts
@@ -138,6 +140,7 @@ parameter_defaults:
     - OS::TripleO::Services::TripleoFirewall
     - OS::TripleO::Services::NeutronSriovAgent
     - OS::TripleO::Services::OpenDaylightOvs
+    - OS::TripleO::Services::ONOSOvs
     - OS::TripleO::Services::SensuClient
     - OS::TripleO::Services::FluentdClient
     - OS::TripleO::Services::VipHosts
index 40f9f66..c64c19b 100755 (executable)
@@ -28,12 +28,16 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/${onos_release_fi
                                          -a overcloud-full-onos_build.qcow2
 
 #Those files can be store in local cache for saving download time
-git clone https://github.com/saravanaonos/puppet-onos.git
+git clone https://github.com/bobzhouHW/puppet-onos.git
 tar --xform="s:puppet-onos/:onos/:" -czf puppet-onos.tar.gz puppet-onos
 
 LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/jdk-8u51-linux-x64.tar.gz:/opt/ \
                                          --upload ${BUILD_DIR}/puppet-onos/files/install_jdk8.tar:/opt/ \
                                          --run-command "cd /opt/ && tar -xf install_jdk8.tar && sh /opt/install_jdk8/install_jdk8.sh" \
+                                         --upload ${BUILD_DIR}/puppet-onos/files/networking-onos.tar:/opt/ \
+                                         --run-command "cd /opt/ && tar -xf networking-onos.tar && sh /opt/networking-onos/install_driver.sh" \
+                                         --upload ${BUILD_DIR}/puppet-onos/files/networking-sfc.tar:/opt/ \
+                                         --run-command "cd /opt/ && tar -xf networking-sfc.tar && sh /opt/networking-sfc/install_driver.sh" \
                                          --upload ${BUILD_DIR}/puppet-onos.tar.gz:/etc/puppet/modules/ \
                                          --run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" \
                                          -a overcloud-full-onos_build.qcow2
index ca7a05e..431bd56 100644 (file)
@@ -59,8 +59,8 @@ install config/deploy/os-odl-ovs_dpdk-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-a
 install config/deploy/os-odl-ovs_dpdk-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-noha.yaml
 install config/deploy/os-odl-gluon-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-gluon-noha.yaml
 install config/deploy/os-ovn-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-ovn-nofeature-noha.yaml
-#install config/deploy/os-onos-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
-#install config/deploy/os-onos-sfc-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
+install config/deploy/os-onos-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
+install config/deploy/os-onos-sfc-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
 install config/deploy/os-ocl-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
 install config/network/network_settings.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/network_settings.yaml
 install config/network/network_settings_v6.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/network_settings_v6.yaml
@@ -90,7 +90,6 @@ install lib/python/apex/common/__init__.py %{buildroot}%{python3_sitelib}/apex/c
 install lib/python/apex/common/constants.py %{buildroot}%{python3_sitelib}/apex/common/
 install lib/python/apex/common/utils.py %{buildroot}%{python3_sitelib}/apex/common/
 mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/installer/onos/
-install lib/installer/onos/onos_gw_mac_update.sh %{buildroot}%{_var}/opt/opnfv/lib/installer/onos/
 install lib/installer/domain.xml %{buildroot}%{_var}/opt/opnfv/lib/installer/
 
 mkdir -p %{buildroot}%{_docdir}/opnfv/
@@ -119,7 +118,6 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_var}/opt/opnfv/lib/utility-functions.sh
 %{_var}/opt/opnfv/lib/python/
 %{python3_sitelib}/apex/
-%{_var}/opt/opnfv/lib/installer/onos/onos_gw_mac_update.sh
 %{_var}/opt/opnfv/lib/installer/domain.xml
 %{_sysconfdir}/bash_completion.d/apex
 %{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
@@ -144,8 +142,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_sysconfdir}/opnfv-apex/os-odl-nofeature-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-gluon-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-ovn-nofeature-noha.yaml
-#%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
-#%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/network_settings.yaml
 %{_sysconfdir}/opnfv-apex/network_settings_v6.yaml
@@ -174,7 +172,6 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 * Fri Mar 10 2017 Feng Pan <fpan@redhat.com> - 4.0-6
 - Add os-odl_l3-fdio-noha.yaml and os-odl_l3-fdio-ha.yaml
 * Wed Mar 08 2017 Dan Radez <dradez@redhat.com> - 4.0-5
-- Commenting out ONOS, unsupported in Danube
 - Adding kvm4nfv files
 - Adding OVN files
 * Tue Feb 14 2017 Feng Pan <fpan@redhat.com> - 4.0-4
index 6064dc8..e5e37b2 100644 (file)
@@ -16,8 +16,8 @@ CACHE_HISTORY=".cache_history"
 PATCHES_DIR="${BUILD_ROOT}/patches"
 
 rdo_images_uri=${RDO_IMAGES_URI:-http://buildlogs.centos.org/centos/7/cloud/$(uname -p)/tripleo_images/newton/delorean}
-onos_release_uri=https://downloads.onosproject.org/nightly/
-onos_release_file=onos-1.8.0-rc6.tar.gz
+onos_release_uri=https://downloads.onosproject.org/release/
+onos_release_file=onos-1.8.4.tar.gz
 onos_jdk_uri=http://artifacts.opnfv.org/apex/colorado
 onos_ovs_uri=http://artifacts.opnfv.org/apex/colorado
 onos_ovs_pkg=package_ovs_rpm3.tar.gz
index dd03864..59fcb19 100755 (executable)
@@ -69,7 +69,6 @@ $LIB/undercloud-functions.sh
 $LIB/overcloud-deploy-functions.sh
 $LIB/post-install-functions.sh
 $LIB/utility-functions.sh
-$LIB/installer/onos/onos_gw_mac_update.sh
 )
 for lib_file in ${lib_files[@]}; do
   if ! source $lib_file; then
@@ -252,14 +251,6 @@ main() {
       echo -e "${blue}INFO: Post Install Configuration Complete${reset}"
     fi
   fi
-  if [[ "${deploy_options_array['sdn_controller']}" == 'onos' ]]; then
-    if ! onos_update_gw_mac ${external_cidr} ${external_gateway}; then
-      echo -e "${red}ERROR:ONOS Post Install Configuration Failed, Exiting.${reset}"
-      exit 1
-    else
-      echo -e "${blue}INFO: ONOS Post Install Configuration Complete${reset}"
-    fi
-  fi
 }
 
 main "$@"
diff --git a/lib/installer/onos/onos_gw_mac_update.sh b/lib/installer/onos/onos_gw_mac_update.sh
deleted file mode 100644 (file)
index 3b3b072..0000000
+++ /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
-
-}
index 0ed98fb..f30e875 100755 (executable)
@@ -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}" \