summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex/apex-deploy.sh')
-rwxr-xr-xjjb/apex/apex-deploy.sh65
1 files changed, 48 insertions, 17 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh
index 8d5c4cb13..c91e3ee82 100755
--- a/jjb/apex/apex-deploy.sh
+++ b/jjb/apex/apex-deploy.sh
@@ -3,7 +3,7 @@ set -o errexit
set -o nounset
set -o pipefail
-APEX_PKGS="common undercloud onos"
+APEX_PKGS="common undercloud" # removed onos for danube
IPV6_FLAG=False
# log info to console
@@ -15,7 +15,7 @@ if ! rpm -q wget > /dev/null; then
sudo yum -y install wget
fi
-if [[ $BUILD_DIRECTORY == *verify* ]]; then
+if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then
# Build is from a verify, use local build artifacts (not RPMs)
cd $WORKSPACE/../${BUILD_DIRECTORY}
WORKSPACE=$(pwd)
@@ -62,10 +62,25 @@ fi
if [ -z "$DEPLOY_SCENARIO" ]; then
echo "Deploy scenario not set!"
exit 1
+elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then
+ echo "Detecting Gating scenario..."
+ if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then
+ echo "ERROR: Gate job triggered without comment!"
+ exit 1
+ else
+ DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$')
+ if [ -z "$DEPLOY_SCENARIO" ]; then
+ echo "ERROR: Unable to detect scenario in Gerrit Comment!"
+ echo "Format of comment to trigger gate should be 'start-gate-scenario: <scenario>'"
+ exit 1
+ else
+ echo "Gate scenario detected: ${DEPLOY_SCENARIO}"
+ fi
+ fi
fi
-# use local build for verify
-if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
+# use local build for verify and promote
+if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then
if [ ! -e "${WORKSPACE}/build/lib" ]; then
ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib
fi
@@ -144,7 +159,7 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then
else
clean_opts=''
fi
- if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
+ if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then
sudo CONFIG=${CONFIG} LIB=${LIB} ./clean.sh ${clean_opts}
else
sudo CONFIG=${CONFIG} LIB=${LIB} opnfv-clean ${clean_opts}
@@ -166,21 +181,19 @@ fi
if [[ "$JOB_NAME" == *virtual* ]]; then
# settings for virtual deployment
- if [ "$IPV6_FLAG" == "True" ]; then
- NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml"
- else
- NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml"
- fi
DEPLOY_CMD="${DEPLOY_CMD} -v"
+ if [[ "${DEPLOY_SCENARIO}" =~ fdio|ovs ]]; then
+ DEPLOY_CMD="${DEPLOY_CMD} --virtual-default-ram 14 --virtual-compute-ram 8"
+ fi
+ if [[ "$JOB_NAME" == *csit* ]]; then
+ DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml"
+ fi
+ if [[ "$JOB_NAME" == *promote* ]]; then
+ DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2"
+ fi
else
# settings for bare metal deployment
- if [ "$IPV6_FLAG" == "True" ]; then
- NETWORK_FILE="/root/network/network_settings_v6.yaml"
- elif [[ "$JOB_NAME" == *master* ]]; then
- NETWORK_FILE="/root/network/network_settings-master.yaml"
- else
- NETWORK_FILE="/root/network/network_settings.yaml"
- fi
+ NETWORK_SETTINGS_DIR="/root/network"
INVENTORY_FILE="/root/inventory/pod_settings.yaml"
if ! sudo test -e "$INVENTORY_FILE"; then
@@ -191,6 +204,14 @@ else
DEPLOY_CMD="${DEPLOY_CMD} -i ${INVENTORY_FILE}"
fi
+if [ "$IPV6_FLAG" == "True" ]; then
+ NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml"
+elif echo ${DEPLOY_SCENARIO} | grep fdio; then
+ NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_vpp.yaml"
+else
+ NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml"
+fi
+
# Check that network settings file exists
if ! sudo test -e "$NETWORK_FILE"; then
echo "ERROR: Required settings file missing: Network Settings file ${NETWORK_FILE}"
@@ -200,6 +221,16 @@ fi
# start deployment
sudo ${DEPLOY_CMD} -d ${DEPLOY_FILE} -n ${NETWORK_FILE} --debug
+if [[ "$JOB_NAME" == *csit* ]]; then
+ echo "CSIT job: setting host route for floating ip routing"
+ # csit route to allow docker container to reach floating ips
+ UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo "[0-9\.]+{3}[0-9]+")
+ if sudo route | grep 192.168.37.128 > /dev/null; then
+ sudo route del -net 192.168.37.128 netmask 255.255.255.128
+ fi
+ sudo route add -net 192.168.37.128 netmask 255.255.255.128 gw ${UNDERCLOUD}
+fi
+
echo
echo "--------------------------------------------------------"
echo "Done!"