modfied to support xenial and mutiple architecture. 11/13811/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Tue, 10 May 2016 04:01:06 +0000 (22:01 -0600)
committerNarinder Gupta <narinder.gupta@canonical.com>
Tue, 10 May 2016 04:02:14 +0000 (22:02 -0600)
Change-Id: I48e693a34ac777bdfbcb56c3cd4512699f1eb664
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/01-deploybundle.sh
ci/deploy.sh

index a4c47df..6640ef0 100755 (executable)
@@ -2,8 +2,12 @@
 #placeholder for deployment script.
 set -ex
 
-#copy and download charms
+#    ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro
+
+    #copy and download charms
     cp $4/fetch-charms.sh ./fetch-charms.sh
+    #modify the ubuntu series wants to deploy
+    sed -i -- "s|trusty|$6|g" ./fetch-charms.sh
     sh ./fetch-charms.sh
 
 
@@ -27,6 +31,9 @@ esac
 #changing the target to the openstack release we want to deploy. 
 sed -i -- "s|mitaka|$2|g" ./bundles.yaml
 
+#changing the target to the ubuntu distro we want to deploy. 
+sed -i -- "s|trusty|$6|g" ./bundles.yaml
+
 case "$3" in
     'orangepod1' )
         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
@@ -121,29 +128,6 @@ case "$5" in
 esac
 
 echo "... Deployment Started ...."
-case "$1" in
-    'nonha' )
-        juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
-        juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
-        ;;
-    'ha' )
-        juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
-        juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
-        ;;
-    'tip' )
-        juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
-        juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
-        ;;
-    * )
-        juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
-        juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
-        ;;
-esac
+        juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
+        juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"
 
-#case "$4" in
-#    'onos' )
-#         echo "... onos prepare test ..."
-#         sleep 180s
-#         sh onos/juju_test_prepare.sh "$3"
-#        ;;
-#esac
index 6e82d08..75e896d 100755 (executable)
@@ -11,6 +11,8 @@ openstack=liberty
 opnfvlab=default
 opnfvrel=b
 opnfvfeature=odl_l2
+opnfvdistro=trusty
+opnfvarch=amd64
 
 read_config() {
     opnfvrel=`grep release: deploy.yaml | cut -d ":" -f2`
@@ -25,6 +27,8 @@ usage() { echo "Usage: $0 [-s <nosdn|odl|opencontrail>]
                          [-o <juno|liberty>]
                          [-l <default|intelpod5>]
                          [-f <ipv6|l2|l3|dvr>]
+                         [-d <trusty|xenial>]
+                         [-a <amd64>]
                          [-r <a|b>]" 1>&2 exit 1; } 
 
 while getopts ":s:t:o:l:h:r:f:" opt; do
@@ -47,6 +51,12 @@ while getopts ":s:t:o:l:h:r:f:" opt; do
         f)
             opnfvfeature=${OPTARG}
             ;;
+        d)
+            opnfvdistro=${OPTARG}
+            ;;
+        a)
+            opnfvarch=${OPTARG}
+            ;;
         h)
             usage
             ;;
@@ -102,7 +112,7 @@ deploy() {
     echo "        enable-os-refresh-update: false" >> environments.yaml
     echo "        enable-os-upgrade: false" >> environments.yaml
     echo "        admin-secret: admin" >> environments.yaml
-    echo "        default-series: trusty" >> environments.yaml
+    echo "        default-series: $opnfvdistro" >> environments.yaml
 
     cp environments.yaml ~/.juju/
 
@@ -110,11 +120,11 @@ deploy() {
         createresource
     fi
 
-    #cp ./$opnfvsdn/01-deploybundle.sh ./01-deploybundle.sh
+    #bootstrap the node
     ./00-bootstrap.sh
 
-    #case default:
-    ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature
+    #case default deploy the opnfv platform:
+    ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro
 }
 
 #check whether charms are still executing the code even juju-deployer says installed.