Added execute permission on clean.sh and deploy.sh 77/1377/2
authorNarinder Gupta <narinder.gupta@canoncial.com>
Tue, 1 Sep 2015 18:19:55 +0000 (13:19 -0500)
committerNarinder Gupta <narinder.gupta@canoncial.com>
Tue, 1 Sep 2015 19:32:36 +0000 (14:32 -0500)
Added the command line parameters in deply.sh for having various
options in the deploy script. Options are -s "sdn type" -t
"deploy type" -o "openstack" -l "lab"

Based on options aboe we can deploy any combination using the same
script.

Change-Id: Ia888e97fc9630e9416ebf59747de7ffd79f416ae

ci/01-deploybundle.sh
ci/clean.sh [changed mode: 0644->0755]
ci/deploy.sh [changed mode: 0644->0755]
ci/odl/01-deploybundle.sh
ci/opencontrail/01-deploybundle.sh

index f88cf86..5f64119 100755 (executable)
@@ -1,14 +1,26 @@
 #!/bin/bash
+#!/bin/bash
 #placeholder for deployment script.
 set -ex
 
-cp odl/juju-deployer/ovs-odl.yaml ./
+case "$1" in
+    'nonha' )
+        cp opencontrail/juju-deployer/contrail.yaml ./bundles.yaml
+        ;;
+    'ha' )
+        cp opencontrail/juju-deployer/contrail-ha.yaml ./bundles.yaml
+        ;;
+    'tip' )
+        cp opencontrail/juju-deployer/contrail-tip.yaml ./bundles.yaml
+        ;;
+    * )
+        cp opencontrail/juju-deployer/contrail.yaml ./bundles.yaml
+        ;;
+esac
 
 echo "... Deployment Started ...."
 
-JUJU_REPOSITORY=
-juju set-constraints tags=
-
-juju-deployer -d -r 13 -c ovs-odl.yaml trusty-kilo
+echo juju-deployer -d -r 13 -c bundles.yaml trusty-"$2"-contrail
 
 echo "... Deployment finished ...."
+
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 9f263f3..9721a4b
@@ -1,38 +1,46 @@
 #!/bin/bash
-<<<<<<< HEAD
-#placeholder for deployment script.
-set -ex
-
-cp intel/pod5/kilo/odl/nonha/deploy.sh ./deployopnfv.sh
-
-echo "bootstrap started"
-juju bootstrap --debug --to bootstrap.maas
-sleep 15
-juju deploy juju-gui --to 0
-
-echo "bootstrap finished"
-
-./deployopnfv.sh
-
-=======
 
 set -ex
 ./01-bootstrap.sh
 
 #need to put mutiple cases here where decide this bundle to deploy by default use the odl bundle.
-
-#case deploy opencontrail 
-#cp ./opencontrail/01-deploybundle.sh ./01-deploybundle.sh
-
-#case deploy ODL bundle
-cp ./odl/01-deploybundle.sh ./01-deploybundle.sh
+# Below parameters are the default and we can according the release
+
+opnfvsdn=odl
+opnfvtype=nonha
+openstack=kilo
+opnfvlab=intelpod5
+
+usage() { echo "Usage: $0 [-s <odl|opencontrail>]
+                         [-t <nonha|ha|tip>] 
+                         [-o <juno|kilo|liberty>]
+                         [-l <intelpod5>]" 1>&2 exit 1;}
+
+while getopts ":s:t:o:l:h:" opt; do
+    case "${opt}" in
+        s)
+            opnfvsdn=${OPTARG}
+            ;;
+        t)
+            opnfvtype=${OPTARG}
+            ;;
+        o)
+            openstack=${OPTARG}
+            ;;
+        l)
+            opnfvlab=${OPTARG}
+            ;;
+        h)
+            usage
+            ;;
+        *)
+            ;;
+    esac
+done
+
+#copy the script which needs to get deployed as part of ofnfv release
+cp ./$opnfvsdn/01-deploybundle.sh ./01-deploybundle.sh
 
 #case default:
-./01-deploybundle.sh
-
-#case ha:
-#./01-deploybundle.sh ha
+./01-deploybundle.sh $opnfvtype $openstack $opnfvlab
 
-#case tip
-#./01-deploybundle.sh tip
->>>>>>> 3b30953... Added a script to have a openstack with odl bundle.
index 4d5da31..3a6c10f 100755 (executable)
@@ -2,18 +2,24 @@
 #placeholder for deployment script.
 set -ex
 
-cp odl/juju-deployer/ovs-odl.yaml ./
+case "$1" in
+    'nonha' )
+        cp odl/juju-deployer/ovs-odl.yaml ./bundles.yaml
+        ;;
+    'ha' )
+        cp odl/juju-deployer/ovs-odl-ha.yaml ./bundles.yaml
+        ;;
+    'tip' )
+        cp odl/juju-deployer/ovs-odl-tip.yaml ./bundles.yaml
+        ;;
+    * )
+        cp odl/juju-deployer/ovs-odl.yaml ./bundles.yaml
+        ;;
+esac
 
 echo "... Deployment Started ...."
 
 #case openstack kilo with odl
-juju-deployer -d -r 13 -c ovs-odl.yaml trusty-kilo
-
-#case openstack kilo with odl ha
-#juju-deployer -d -r 13 -c ovs-odl-ha.yaml trusty-kilo
-
-#case openstack master tip git tree with odl
-#cp -R odl/juju-deployer/source/*.yaml ./
-#juju-deployer -d -r 13 -c ovs-odl-tip.yaml trusty-master-kilo
+juju-deployer -d -r 13 -c bundles.yaml trusty-"$2"
 
 echo "... Deployment finished ...."
index 0736578..9e9dfee 100755 (executable)
@@ -1,19 +1,26 @@
 #!/bin/bash
+#!/bin/bash
 #placeholder for deployment script.
 set -ex
 
-cp opencontrail/juju-deployer/contrail.yaml ./
+case "$1" in
+    'nonha' )
+        cp opencontrail/juju-deployer/contrail.yaml ./bundles.yaml
+        ;;
+    'ha' )
+        cp opencontrail/juju-deployer/contrail-ha.yaml ./bundles.yaml
+        ;;
+    'tip' )
+        cp opencontrail/juju-deployer/contrail-tip.yaml ./bundles.yaml
+        ;;
+    * )
+        cp opencontrail/juju-deployer/contrail.yaml ./bundles.yaml
+        ;;
+esac
 
 echo "... Deployment Started ...."
 
-#case openstack kilo with odl
-juju-deployer -d -r 13 -c contrail.yaml trusty-juno-contrail
-
-#case openstack kilo with odl ha
-#juju-deployer -d -r 13 -c contrail-ha.yaml trusty-juno-contrail
-
-#case openstack master tip git tree with odl
-#cp -R odl/juju-deployer/source/*.yaml ./
-#juju-deployer -d -r 13 -c contrail-tip.yaml trusty-juno-contrail
+juju-deployer -d -r 13 -c bundles.yaml trusty-"$2"-contrail
 
 echo "... Deployment finished ...."
+