summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-09-12 13:04:44 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2017-09-12 13:04:44 -0500
commit2f8308425637ba4c5c2c3213fdd5d1283db62f21 (patch)
tree288aab777fc386d06e73dde6963bfdc268dfae78 /ci
parentb633be500f32bb803ed6c89744f2c1bc512bc466 (diff)
make sure MAAS gets deployed first before calling juju command.
Change-Id: Ib9e122416d45625883ff1967e9089ec2ab4812a2 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index b722d2ae..d4c30d9d 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -20,8 +20,6 @@ opnfvmodel=openstack
virtinstall=0
maasinstall=0
-jujuver=`juju --version`
-
usage() { echo "Usage: $0
[-s|--sdn <nosdn|odl|opencontrail>]
[-t|--type <noha|ha|tip>]
@@ -33,7 +31,7 @@ usage() { echo "Usage: $0
[-m|--model <openstack|kubernetes>]
[-i|--virtinstall <0|1>]
[--maasinstall <0|1>]
- [--labfile <labvonfig.yaml file>]
+ [--labfile <labconfig.yaml file>]
[-r|--release <e>]" 1>&2 exit 1;
}
@@ -199,14 +197,14 @@ deploy() {
python genDeploymentConfig.py -l labconfig.yaml > deployconfig.yaml
fi
else
- echo_error "MAAS not deployed please deploy MAAS first."
+ if [ "$maasinstall" -eq 0 ]; then
+ echo_error "MAAS not deployed please deploy MAAS first."
+ else
+ echo_info "MAAS not deployed this will deploy MAAS first."
+ fi
fi
fi
- #create json file which is missing in case of new deployment after maas and git tree cloned freshly.
- python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < labconfig.yaml > labconfig.json
- python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < deployconfig.yaml > deployconfig.json
-
# Install MAAS and expecting the labconfig.yaml at local directory.
if [ "$maasinstall" -eq 1 ]; then
@@ -254,6 +252,10 @@ deploy() {
fi
fi
+ #create json file which is missing in case of new deployment after maas and git tree cloned freshly.
+ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < labconfig.yaml > labconfig.json
+ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < deployconfig.yaml > deployconfig.json
+
if [[ "$opnfvtype" = "ha" && "$opnfvlab" = "default" ]]; then
createresource
fi
@@ -315,6 +317,8 @@ juju status --format=tabular
# translate bundle.yaml to json
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < bundles.yaml > bundles.json
+jujuver=`juju --version`
+
# Configuring deployment
if ([ $opnfvmodel == "openstack" ]); then
echo_info "Configuring OpenStack deployment"