more changes needed for juju 2.0 13/23213/2
authorNarinder Gupta <narinder.gupta@canonical.com>
Mon, 17 Oct 2016 05:08:32 +0000 (00:08 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Mon, 17 Oct 2016 11:37:56 +0000 (06:37 -0500)
Change-Id: I30a1703bdd0dbfc72d0a35c2bee39a1f1b57b52a
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/00-maasdeploy.sh
ci/01-bootstrap.sh
ci/02-deploybundle.sh
ci/clean.sh
ci/deploy.sh

index 0f47fec..6bd2258 100755 (executable)
@@ -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
index 4a20ca2..5ec5e68 100755 (executable)
@@ -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.
index e561b39..d08dae6 100755 (executable)
@@ -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.
index 4c507b2..3c0a71e 100755 (executable)
@@ -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
index 15f6e47..66a9e8f 100755 (executable)
@@ -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