X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fdeploy.sh;h=bc1463059c3722258a43bd845b980fcaa5353bb6;hb=320c0ccb146a27ecaa9338e0f51de3eee64602c9;hp=d61e3bad56a90e7bea37e7af5a8fc282283838df;hpb=4d1467c15dd67cc97a4fde31785993fe1b0bd58f;p=joid.git diff --git a/ci/deploy.sh b/ci/deploy.sh index d61e3bad..bc146305 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -6,7 +6,7 @@ set -ex # Below parameters are the default and we can according the release opnfvsdn=nosdn -opnfvtype=nonha +opnfvtype=noha openstack=ocata opnfvlab=default opnfvrel=e @@ -14,6 +14,7 @@ opnfvfeature=none opnfvdistro=xenial opnfvarch=amd64 opnfvmodel=openstack +virtinstall=0 jujuver=`juju --version` @@ -26,16 +27,17 @@ read_config() { } usage() { echo "Usage: $0 [-s ] - [-t ] + [-t ] [-o ] [-l ] [-f ] [-d ] [-a ] [-m ] + [-i <0|1>] [-r ]" 1>&2 exit 1; } -while getopts ":s:t:o:l:h:r:f:d:a:m:" opt; do +while getopts ":s:t:o:l:h:r:f:d:a:m:i:" opt; do case "${opt}" in s) opnfvsdn=${OPTARG} @@ -64,6 +66,9 @@ while getopts ":s:t:o:l:h:r:f:d:a:m:" opt; do m) opnfvmodel=${OPTARG} ;; + i) + virtinstall=${OPTARG} + ;; h) usage ;; @@ -77,7 +82,7 @@ createresource() { # TODO: make sure this function run with the same parameters used in 03-maasdeploy.sh PROFILE=${PROFILE:-ubuntu} MAAS_IP=$(grep " ip_address" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //') - API_SERVER="http://$MAAS_IP/MAAS/api/2.0" + API_SERVER="http://$MAAS_IP:5240/MAAS/api/2.0" API_KEY=`sudo maas-region apikey --username=ubuntu` maas login $PROFILE $API_SERVER $API_KEY @@ -204,6 +209,11 @@ check_status() { echo "...... deployment finishing ......." } +# In the case of a virtual deployment +if [ "$virtinstall" -eq 1 ]; then + ./clean.sh || true +fi + echo "...... deployment started ......" deploy