summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-10-12 10:52:27 -0400
committerDan Radez <dradez@redhat.com>2016-10-13 13:14:13 +0000
commitfc141a3b62cc1c4de6c322eb47d2153440623791 (patch)
tree5ce5fb5c3830687538354ee693449b6448dfff31
parentf8da17969ca068b13dd5cdf628f530e111269d8d (diff)
Conditionally install OVS NSH in ONOS deployment
OVS with NSH should be installed only if we're enabling SFC in an ONOS deployment JIRA: APEX-331 Change-Id: I54826bb2d62b20c42f00c856d8458444f2f795e5 Signed-off-by: Dan Radez <dradez@redhat.com> (cherry picked from commit 8c30286eba760e1c2dc3c6a9812d7be5a02de47d)
-rwxr-xr-xbuild/overcloud-onos.sh6
-rwxr-xr-xci/deploy.sh3
-rwxr-xr-xlib/overcloud-deploy-functions.sh8
3 files changed, 10 insertions, 7 deletions
diff --git a/build/overcloud-onos.sh b/build/overcloud-onos.sh
index b695983..2b3e522 100755
--- a/build/overcloud-onos.sh
+++ b/build/overcloud-onos.sh
@@ -18,12 +18,6 @@ cp -f overcloud-full.qcow2 overcloud-full-onos_build.qcow2
##### Adding ONOS to overcloud #####
#######################################
-# upgrade ovs into ovs 2.5.90 with NSH function
-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}" \
- -a overcloud-full-onos_build.qcow2
-
-
# get the onos files
rm -rf puppet-onos
populate_cache "$onos_release_uri/$onos_release_file"
diff --git a/ci/deploy.sh b/ci/deploy.sh
index a041a92..6ab3bb9 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -30,6 +30,9 @@ net_isolation_arg=""
post_config="TRUE"
debug="FALSE"
+ovs_rpm_name=openvswitch-2.5.90-1.el7.centos.x86_64.rpm
+ovs_kmod_rpm_name=openvswitch-kmod-2.5.90-1.el7.centos.x86_64.rpm
+
declare -i CNT
declare UNDERCLOUD
declare -A deploy_options_array
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 60d5e14..0f588b2 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -67,7 +67,6 @@ function overcloud_deploy {
# Make sure the correct overcloud image is available
if [ ! -f $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
echo "${red} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
- echo "Both ONOS and OpenDaylight are currently deployed from this image."
echo "Please install the opnfv-apex package to provide this overcloud image for deployment.${reset}"
exit 1
fi
@@ -117,6 +116,13 @@ EOF
--run-command "sed -i 's/\\(^\\s\\+\\)\\(start_daemon "$OVS_VSWITCHD_PRIORITY"\\)/\\1umask 0002 \\&\\& \\2/' /usr/share/openvswitch/scripts/ovs-ctl" \
-a overcloud-full.qcow2
fi
+
+ if [ "${deploy_options_array['sdn_controller']}" == 'onos' && "${deploy_options_array['sfc']}" == 'True' ]; then
+ # upgrade ovs into ovs 2.5.90 with NSH function
+ 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}" \
+ -a overcloud-full.qcow2
+ fi
EOI
elif [ "${deploy_options_array['dataplane']}" != 'ovs' ]; then