2 #placeholder for deployment script.
5 # ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro
7 #copy and download charms
8 cp $4/fetch-charms.sh ./fetch-charms.sh
9 #modify the ubuntu series wants to deploy
10 sed -i -- "s|distro=trusty|distro=$6|g" ./fetch-charms.sh
15 #check whether charms are still executing the code even juju-deployer says installed.
19 while [ $retval -eq 0 ]; do
21 juju status > status.txt
22 if [ "$(grep -c "executing" status.txt )" -ge 2 ]; then
23 echo " still executing the reltionship within charms ..."
24 if [ $timeoutiter -ge 60 ]; then
27 timeoutiter=$((timeoutiter+1))
32 echo "...... deployment finishing ......."
35 #read the value from deployment.yaml
36 if [ -e ~/.juju/deployment.yaml ]; then
37 cp ~/.juju/deployment.yaml ./deployment.yaml
38 if [ -e ~/.juju/deployconfig.yaml ]; then
39 cp ~/.juju/deployconfig.yaml ./deployconfig.yaml
40 extport=`grep "ext-port" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
41 datanet=`grep "dataNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
42 admnet=`grep "admNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
43 cephdisk=`grep "ceph-disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
44 osdomname=`grep "os-domain-name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
50 sed -i -- 's/10.4.1.1/172.16.50.1/g' ./bundles.yaml
51 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
54 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth2"/g' ./bundles.yaml
58 # lets put the if seperateor as "," as this will save me from world.
62 if [ "$fea" == "" ]; then
69 #update source if trusty is target distribution
70 var=os-$4-$fea-$1"-"$6"_"$2
72 if [ "$osdomname" != "''" ]; then
76 #lets generate the bundle for all target using genBundle.py
77 python genBundle.py -l deployconfig.yaml -s $var > bundles.yaml
79 echo "... Deployment Started ...."
80 juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"-nodes
81 juju ssh nodes/0 "echo 512 | sudo tee /proc/sys/fs/inotify/max_user_instances"
82 juju ssh nodes/1 "echo 512 | sudo tee /proc/sys/fs/inotify/max_user_instances"
83 juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"