diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2017-02-05 08:24:01 -0600 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2017-02-05 08:55:45 -0600 |
commit | fe8f6531947ae65939e977117f9b281fbe14bed3 (patch) | |
tree | f6a45dac9d3870bef73cc0cf46a39ab43f1a1323 /ci/deploy.sh | |
parent | edf35e6c820e613ae73999189ed7e4b98c3a4e7d (diff) |
cleanup task.
Change-Id: I287e80899225c611752117ab29f079de7ba25f58
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-x | ci/deploy.sh | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index f92f5032..99be542d 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -74,7 +74,7 @@ done #by default maas creates two VMs in case of three more VM needed. createresource() { - maas_ip=`grep " ip_address" deployment.yaml | cut -d " " -f 10` + maas_ip=`grep " ip_address" deployconfig.yaml | cut -d " " -f 10` apikey=`grep maas-oauth: environments.yaml | cut -d "'" -f 2` maas login maas http://${maas_ip}/MAAS/api/1.0 ${apikey} @@ -105,37 +105,34 @@ createresource() { #copy the files and create extra resources needed for HA deployment # in case of default VM labs. deploy() { - if [ ! -f ./deployment.yaml ] && [ -e ~/.juju/deployment.yaml ]; then - cp ~/.juju/deployment.yaml ./deployment.yaml - elif [ ! -f ./deployment.yaml ] && [ -e ~/joid_config/deployment.yaml ]; then - cp ~/joid_config/deployment.yaml ./deployment.yaml - fi - - if [[ "$jujuver" > "2" ]]; then - if [ ! -f ./labconfig.yaml ] && [ -e ~/joid_config/labconfig.yaml ]; then - cp ~/joid_config/labconfig.yaml ./labconfig.yaml - fi - if [ ! -f ./deployconfig.yaml ] && [ -e ~/joid_config/deployconfig.yaml ]; then - cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml - fi - else - if [ ! -f ./environments.yaml ] && [ -e ~/.juju/environments.yaml ]; then - cp ~/.juju/environments.yaml ./environments.yaml - elif [ ! -f ./environments.yaml ] && [ -e ~/joid_config/environments.yaml ]; then - cp ~/joid_config/environments.yaml ./environments.yaml + if [[ "$jujuver" > "2" ]]; then + if [ ! -f ./labconfig.yaml ] && [ -e ~/joid_config/labconfig.yaml ]; then + cp ~/joid_config/labconfig.yaml ./labconfig.yaml + + if [ ! -f ./deployconfig.yaml ] && [ -e ~/joid_config/deployconfig.yaml ]; then + cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml + else + python genDeploymentConfig.py -l labconfig.yaml > deployconfig.yaml + fi + else + echo " MAAS not deployed please deploy MAAS first." + fi + else + if [ ! -f ./environments.yaml ] && [ -e ~/.juju/environments.yaml ]; then + cp ~/.juju/environments.yaml ./environments.yaml + elif [ ! -f ./environments.yaml ] && [ -e ~/joid_config/environments.yaml ]; then + cp ~/joid_config/environments.yaml ./environments.yaml + fi + #copy the script which needs to get deployed as part of ofnfv release + echo "...... deploying now ......" + echo " " >> environments.yaml + echo " enable-os-refresh-update: false" >> environments.yaml + echo " enable-os-upgrade: false" >> environments.yaml + echo " admin-secret: admin" >> environments.yaml + echo " default-series: $opnfvdistro" >> environments.yaml + cp environments.yaml ~/.juju/ + cp environments.yaml ~/joid_config/ fi - #copy the script which needs to get deployed as part of ofnfv release - echo "...... deploying now ......" - echo " " >> environments.yaml - echo " enable-os-refresh-update: false" >> environments.yaml - echo " enable-os-upgrade: false" >> environments.yaml - echo " admin-secret: admin" >> environments.yaml - echo " default-series: $opnfvdistro" >> environments.yaml - cp environments.yaml ~/.juju/ - cp environments.yaml ~/joid_config/ - fi - - if [[ "$opnfvtype" = "ha" && "$opnfvlab" = "default" ]]; then createresource |