variable directly.
Change-Id: I234b53010a32c3b1f0daef507585dde4652616eb
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
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`
if [ $count -lt 10 ]; then
rm -rf labconfig.yaml
else
- python deploy.py
+ python genmaasconfig.py
fi
fi
'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
'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
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
#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=''
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
# 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
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
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'
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
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.