626a65060ceaaac37dd017719294901aa68c3921
[releng.git] / jjb / fuel / fuel-deploy-virtual.sh
1 #!/bin/bash
2 set -o errexit
3 set -o nounset
4 set -o pipefail
5
6 # source the file so we get OPNFV vars
7 source latest.properties
8
9 # echo the info about artifact that is used during the deployment
10 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment"
11
12 # create TMPDIR if it doesn't exist
13 export TMPDIR=$HOME/tmpdir
14 [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
15
16 # change permissions down to TMPDIR
17 chmod a+x $HOME
18 chmod a+x $TMPDIR
19
20 # set CONFDIR, BRIDGE
21 CONFDIR=$WORKSPACE/deploy/templates/virtual_environment_noha/conf
22 BRIDGE=pxebr
23
24 # log info to console
25 echo "Starting the deployment for a merged change using $INSTALLER. This could take some time..."
26 echo "--------------------------------------------------------"
27 echo
28
29 # start the deployment
30 echo "Issuing command"
31 echo "sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh"
32
33 sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh
34
35 echo
36 echo "--------------------------------------------------------"
37 echo "Virtual deployment is done! Removing the intermediate files from artifact repo"
38
39 PROPERTIES_FILE=$(echo $OPNFV_ARTIFACT_URL | sed 's/iso/properties/')
40 gsutil rm gs://$OPNFV_ARTIFACT_URL
41 gsutil rm gs://$PROPERTIES_FILE