From: Narinder Gupta Date: Tue, 2 Aug 2016 13:56:54 +0000 (-0500) Subject: clenup the naming convention of the scripts and modify not to use X-Git-Tag: colorado.1.0~51 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F17921%2F3;p=joid.git clenup the naming convention of the scripts and modify not to use variable directly. Change-Id: I234b53010a32c3b1f0daef507585dde4652616eb Signed-off-by: Narinder Gupta --- diff --git a/ci/02-maasdeploy.sh b/ci/00-maasdeploy.sh similarity index 97% rename from ci/02-maasdeploy.sh rename to ci/00-maasdeploy.sh index 07acfe2a..f25a36d9 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/00-maasdeploy.sh @@ -23,7 +23,7 @@ sudo apt-get install openssh-server bzr git maas-deployer juju juju-deployer \ if [ "$1" == "custom" ]; then if [ -e $2 ]; then cp $2 ./labconfig.yaml || true - python deploy.py + python genmaasconfig.py else wget $2 -t 3 -T 10 -O ./labconfig.yaml || true count=`wc -l labconfig.yaml | cut -d " " -f 1` @@ -31,7 +31,7 @@ if [ "$1" == "custom" ]; then if [ $count -lt 10 ]; then rm -rf labconfig.yaml else - python deploy.py + python genmaasconfig.py fi fi @@ -46,32 +46,32 @@ else 'intelpod5' ) cp ../labconfig/intel/pod5/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'intelpod6' ) cp ../labconfig/intel/pod6/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'intelpod9' ) cp ../labconfig/intel/pod6/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'orangepod1' ) cp ../labconfig/orange/pod1/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'orangepod2' ) cp ../labconfig/orange/pod1/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'attvirpod1' ) cp ../labconfig/att/virpod1/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'juniperpod1' ) cp maas/juniper/pod1/deployment.yaml ./deployment.yaml @@ -79,12 +79,12 @@ else 'cengnpod1' ) cp ../labconfig/cengn/pod1/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; 'cengnpod2' ) cp ../labconfig/cengn/pod2/labconfig.yaml ./ #to be removed later once converted for all labs. - python deploy.py + python genmaasconfig.py ;; * ) virtinstall=1 @@ -303,8 +303,6 @@ case "$labname" in enableautomodebyname eth0.902 AUTO "10.9.12.0/24" control || true enableautomodebyname eth1.905 AUTO "10.9.15.0/24" control || true ;; - 'juniperpod1' ) - ;; esac enable_if diff --git a/ci/00-bootstrap.sh b/ci/01-bootstrap.sh similarity index 100% rename from ci/00-bootstrap.sh rename to ci/01-bootstrap.sh diff --git a/ci/01-deploybundle.sh b/ci/02-deploybundle.sh similarity index 79% rename from ci/01-deploybundle.sh rename to ci/02-deploybundle.sh index 10be1697..ffacef9f 100755 --- a/ci/01-deploybundle.sh +++ b/ci/02-deploybundle.sh @@ -2,13 +2,22 @@ #placeholder for deployment script. set -ex -# ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro +# ./02-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|distro=trusty|distro=$6|g" ./fetch-charms.sh - ./fetch-charms.sh $6 +opnfvtype=$1 +openstack=$2 +opnfvlab=$3 +opnfvsdn=$4 +opnfvfeature=$5 +opnfvdistro=$6 + +#copy and download charms +cp $opnfvsdn/fetch-charms.sh ./fetch-charms.sh + +#modify the ubuntu series wants to deploy +sed -i -- "s|distro=trusty|distro=$opnfvdistro|g" ./fetch-charms.sh + +./fetch-charms.sh $opnfvdistro osdomname='' @@ -45,7 +54,7 @@ if [ -e ~/.juju/deployment.yaml ]; then fi fi -case "$3" in +case "$opnfvlab" in 'juniperpod1' ) sed -i -- 's/10.4.1.1/172.16.50.1/g' ./bundles.yaml sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml @@ -58,7 +67,7 @@ esac # lets put the if seperateor as "," as this will save me from world. fea="" IFS="," -for feature in $5; do +for feature in $opnfvfeature; do if [ "$fea" == "" ]; then fea=$feature else @@ -67,7 +76,7 @@ for feature in $5; do done #update source if trusty is target distribution -var=os-$4-$fea-$1"-"$6"_"$2 +var=os-$opnfvsdn-$fea-$opnfvtype"-"$opnfvdistro"_"$openstack if [ "$osdomname" != "''" ]; then var=$var"_"publicapi @@ -77,7 +86,7 @@ fi python genBundle.py -l deployconfig.yaml -s $var > bundles.yaml echo "... Deployment Started ...." -juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"-nodes +juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack"-nodes # seeing issue related to number of open files. # juju run --service nodes 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' @@ -90,4 +99,4 @@ while [ $c -lt $count ]; do let c+=1 done -juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2" || true +juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack" || true diff --git a/ci/deploy.sh b/ci/deploy.sh index d5c8cc2d..15aa60e5 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -126,10 +126,10 @@ deploy() { fi #bootstrap the node - ./00-bootstrap.sh + ./01-bootstrap.sh #case default deploy the opnfv platform: - ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro + ./02-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro } #check whether charms are still executing the code even juju-deployer says installed. diff --git a/ci/deploy.py b/ci/genmaasconfig.py similarity index 100% rename from ci/deploy.py rename to ci/genmaasconfig.py