6 # source the file so we get OPNFV vars
7 source latest.properties
9 # echo the info about artifact that is used during the deployment
10 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment"
12 # checkout the commit that was used for building the downloaded artifact
13 # to make sure the ISO and deployment mechanism uses same versions
14 echo "Checking out $OPNFV_GIT_SHA1"
15 git checkout $OPNFV_GIT_SHA1 --quiet
17 # create TMPDIR if it doesn't exist
18 export TMPDIR=$HOME/tmpdir
21 # change permissions down to TMPDIR
25 # get the lab name from SLAVE_NAME
26 # we currently support ericsson and intel labs
27 LAB_NAME=${NODE_NAME%%-*}
28 if [[ ! "$LAB_NAME" =~ (ericsson|intel) ]]; then
29 echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!"
32 echo "Using configuration for $LAB_NAME"
36 CONFDIR=$WORKSPACE/deploy/templates/$LAB_NAME/virtual_environment/noha/conf
40 echo "Starting the deployment for a merged change using $INSTALLER_TYPE. This could take some time..."
41 echo "--------------------------------------------------------"
44 # start the deployment
45 echo "Issuing command"
46 echo "sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh"
48 sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh
51 echo "--------------------------------------------------------"
52 echo "Virtual deployment is done! Removing the intermediate files from artifact repo"
54 PROPERTIES_FILE=$(echo $OPNFV_ARTIFACT_URL | sed 's/iso/properties/')
55 gsutil rm gs://$OPNFV_ARTIFACT_URL
56 gsutil rm gs://$PROPERTIES_FILE