diff options
Diffstat (limited to 'jjb/apex/apex-deploy.sh')
-rwxr-xr-x | jjb/apex/apex-deploy.sh | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index b0ff7bded..24ed84840 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -4,6 +4,7 @@ set -o nounset set -o pipefail APEX_PKGS="common undercloud opendaylight-sfc onos" +IPV6_FLAG=False # log info to console echo "Starting the Apex virtual deployment." @@ -71,6 +72,7 @@ if [[ "$BUILD_DIRECTORY" == *verify* ]]; then DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy" NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network" DEPLOY_CMD="$(pwd)/deploy.sh" + UTIL_CMD="$(pwd)/util.sh" RESOURCES="${WORKSPACE}/build/images/" CONFIG="${WORKSPACE}/build" LIB="${WORKSPACE}/lib" @@ -128,6 +130,7 @@ else DEPLOY_CMD=opnfv-deploy DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/" + UTIL_CMD=opnfv-util NETWORK_SETTINGS_DIR="/etc/opnfv-apex/" RESOURCES="/var/opt/opnfv/images" CONFIG="/var/opt/opnfv" @@ -136,6 +139,7 @@ fi # set env vars to deploy cmd DEPLOY_CMD="CONFIG=${CONFIG} RESOURCES=${RESOURCES} LIB=${LIB} ${DEPLOY_CMD}" +UTIL_CMD="CONFIG=${CONFIG} RESOURCES=${RESOURCES} LIB=${LIB} ${UTIL_CMD}" if [ "$OPNFV_CLEAN" == 'yes' ]; then if [[ "$BUILD_DIRECTORY" == *verify* ]]; then @@ -145,6 +149,12 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then fi fi +if echo ${DEPLOY_SCENARIO} | grep ipv6; then + IPV6_FLAG=True + DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-ipv6//') + echo "INFO: IPV6 Enabled" +fi + echo "Deploy Scenario set to ${DEPLOY_SCENARIO}" DEPLOY_FILE="${DEPLOY_SETTINGS_DIR}/${DEPLOY_SCENARIO}.yaml" @@ -154,11 +164,19 @@ fi if [[ "$JOB_NAME" == *virtual* ]]; then # settings for virtual deployment - NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml" + 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" else # settings for bare metal deployment - NETWORK_FILE="/root/network/network_settings.yaml" + if [ "$IPV6_FLAG" == "True" ]; then + NETWORK_FILE="/root/network/network_settings_v6.yaml" + else + NETWORK_FILE="/root/network/network_settings.yaml" + fi INVENTORY_FILE="/root/inventory/pod_settings.yaml" if ! sudo test -e "$INVENTORY_FILE"; then @@ -175,8 +193,12 @@ if ! sudo test -e "$NETWORK_FILE"; then exit 1 fi +# mock detached state for deploy +sudo $UTIL_CMD mock-detached on # start deployment sudo ${DEPLOY_CMD} -d ${DEPLOY_FILE} -n ${NETWORK_FILE} --debug +# turn of mock detached state +sudo $UTIL_CMD mock-detached off echo echo "--------------------------------------------------------" |