diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2016-10-17 00:08:32 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2016-10-17 06:37:56 -0500 |
commit | 7ae91a059f2b498ebacc66440f5de21eea99033c (patch) | |
tree | e3113ebff9adc945155a4013b66629d70b45a17e /ci | |
parent | f1dfc0776d32dea2a2fe7e2cb2b15b1836a6b666 (diff) |
more changes needed for juju 2.0
Change-Id: I30a1703bdd0dbfc72d0a35c2bee39a1f1b57b52a
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/00-maasdeploy.sh | 2 | ||||
-rwxr-xr-x | ci/01-bootstrap.sh | 2 | ||||
-rwxr-xr-x | ci/02-deploybundle.sh | 2 | ||||
-rwxr-xr-x | ci/clean.sh | 5 | ||||
-rwxr-xr-x | ci/deploy.sh | 13 |
5 files changed, 17 insertions, 7 deletions
diff --git a/ci/00-maasdeploy.sh b/ci/00-maasdeploy.sh index 0f47feca..6bd22583 100755 --- a/ci/00-maasdeploy.sh +++ b/ci/00-maasdeploy.sh @@ -361,7 +361,7 @@ fi # Add the cloud and controller credentials for MAAS for that lab. jujuver=`juju --version` -if [ "$jujuver" -ge "2" ]; then +if [ "$jujuver" > "2" ]; then addcloud addcredential fi diff --git a/ci/01-bootstrap.sh b/ci/01-bootstrap.sh index 4a20ca23..5ec5e68e 100755 --- a/ci/01-bootstrap.sh +++ b/ci/01-bootstrap.sh @@ -6,7 +6,7 @@ set -ex jujuver=`juju --version` -if [ "$jujuver" -lt "2" ]; then +if [ "$jujuver" < "2" ]; then juju bootstrap --debug --to bootstrap.maas sleep 5 #disable juju gui until xenial charms are in charm store. diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh index e561b39e..d08dae6c 100755 --- a/ci/02-deploybundle.sh +++ b/ci/02-deploybundle.sh @@ -103,7 +103,7 @@ if [ "$osdomname" != "None" ]; then var=$var"_"publicapi fi -if [ "$jujuver" -lt "2" ]; then +if [ "$jujuver" < "2" ]; then #lets generate the bundle for all target using genBundle.py python genBundle.py -j 1 -l deployconfig.yaml -s $var > bundles.yaml #keep the back in cloud for later debugging. diff --git a/ci/clean.sh b/ci/clean.sh index 4c507b25..3c0a71e4 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -3,12 +3,13 @@ set -ex if [ ! -d environments.yaml ]; then - cp ~/joid_config/environments.yaml ./environments.yaml + cp ~/joid_config/environments.yaml ./environments.yaml || true + cp ~/.juju/environments.yaml ./environments.yaml || true fi jujuver=`juju --version` -if [ "$jujuver" -ge "2" ]; then +if [ "$jujuver" > "2" ]; then controllername=`awk 'NR==1{print $2}' environments.yaml` cloudname=`awk 'NR==1{print $2}' environments.yaml` juju kill-controller $controllername --timeout 10s -y || true diff --git a/ci/deploy.sh b/ci/deploy.sh index 15f6e476..66a9e8f8 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -14,6 +14,8 @@ opnfvfeature=none opnfvdistro=xenial opnfvarch=amd64 +jujuver=`juju --version` + read_config() { opnfvrel=`grep release: deploy.yaml | cut -d ":" -f2` openstack=`grep openstack: deploy.yaml | cut -d ":" -f2` @@ -176,8 +178,15 @@ echo "...... deployment finished ......." ./openstack.sh "$opnfvsdn" "$opnfvlab" "$opnfvdistro" "$openstack" || true # creating heat domain after puching the public API into /etc/hosts -status=`juju action do heat/0 domain-setup` -echo $status + +if [ "$jujuver" > "2" ]; then + status=`juju run-action do heat/0 domain-setup` + echo $status +else + status=`juju action do heat/0 domain-setup` + echo $status +fi + sudo ../juju/get-cloud-images || true ../juju/joid-configure-openstack || true |