modified to download precise images also as part of MAAS install. 91/2191/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Fri, 2 Oct 2015 05:08:26 +0000 (00:08 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Fri, 2 Oct 2015 05:08:26 +0000 (00:08 -0500)
As opencontrail needs the precise image for cassandra and
opencontrail charms.

Change-Id: I44056819ac342d7a822bb1672404e19b6d727017

ci/02-maasdeploy.sh
ci/deploy.sh

index e9bed10..c90a4eb 100755 (executable)
@@ -43,14 +43,21 @@ fi
 
 sudo apt-add-repository ppa:maas-deployers/stable -y
 sudo apt-add-repository ppa:juju/stable -y
+sudo apt-add-repository ppa:maas/stable -y
 sudo apt-get update -y
-sudo apt-get install maas-deployer juju juju-deployer -y
+sudo apt-get install git maas-deployer juju juju-deployer maas-cli -y
+juju init -f
 
 cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
 maas-deployer -c deployment.yaml -d --force
+
 echo "... Deployment of maas finish ...."
 
-#maas_ip=`grep " ip_address" deployment.yaml | cut -d ":"  -f 2`
+maas_ip=`grep " ip_address" deployment.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}
+maas maas boot-source-selections create 1 os="ubuntu" release="trusty" arches="amd64" subarches="*" labels="*"
+maas maas boot-resources import
 
 #echo "... Deployment of opnfv release Started ...."
 #python deploy.py $maas_ip
index 51d4410..296f7b2 100755 (executable)
@@ -55,13 +55,15 @@ deploy_dep() {
     sudo apt-add-repository ppa:juju/stable -y
     sudo apt-get update
     sudo apt-get install juju juju-deployer -y
-    juju init -y
+    juju init -f
     cp environments.yaml ~/.juju/
 }
 
 deploy() {
     #copy the script which needs to get deployed as part of ofnfv release
     echo "deploying now"
+    cp environments.yaml ~/.juju/
+
     cp ./$opnfvsdn/01-deploybundle.sh ./01-deploybundle.sh
     ./00-bootstrap.sh
 
@@ -75,6 +77,6 @@ if [ "$#" -eq 0 ]; then
 fi
 
 echo "deploying started"
-deploy_dep
+#deploy_dep
 deploy
 echo "deploying finished"