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
11 sh ./fetch-charms.sh $6
16 cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml
19 cp $4/juju-deployer/ovs-$4-ha.yaml ./bundles.yaml
22 cp $4/juju-deployer/ovs-$4-tip.yaml ./bundles.yaml
24 sed -i -- "s|branch: master|branch: stable/$2|g" ./*.yaml
27 cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml
32 #read the value from deployment.yaml
33 if [ -e ~/.juju/deployment.yaml ]; then
34 extport=`grep "ext-port" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
35 sed --i "s@#ext-port: \"eth1\"@ext-port: \"$extport\"@g" ./bundles.yaml
37 datanet=`grep "dataNetwork" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
38 sed --i "s@#os-data-network: 10.4.8.0/21@os-data-network: $datanet@g" ./bundles.yaml
40 admnet=`grep "admNetwork" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
41 sed --i "s@10.4.1.1@$admnet@g" ./bundles.yaml
43 cephdisk=`grep "disk" deployment.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
44 sed --i "s@osd-devices: /srv@osd-devices: $cephdisk@g" ./bundles.yaml
49 # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
50 sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
51 # Choose the external port to go out from gateway to use.
52 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
55 # Chose the hard drive(s) to use for CEPH OSD
56 sed -i -- 's|osd-devices: /srv|osd-devices: /dev/sdb|g' ./bundles.yaml
57 # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
58 sed -i -- 's/10.4.1.1/10.120.0.1/g' ./bundles.yaml
59 # choose the correct interface to use for data network
60 sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 172.16.121.0\/24/g' ./bundles.yaml
61 # Choose the external port to go out from gateway to use.
62 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1.1202"/g' ./bundles.yaml
65 sed -i -- 's/10.4.1.1/172.16.50.1/g' ./bundles.yaml
66 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
69 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth2"/g' ./bundles.yaml
72 sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
73 sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
77 # lets put the if seperateor as "," as this will save me from world.
83 sed -i -- 's/#prefer-ipv6: true/prefer-ipv6: true/g' ./bundles.yaml
86 sed -i -- 's/#enable-dvr: true/enable-dvr: true/g' ./bundles.yaml
87 sed -i -- 's/#l2-population: true/l2-population: true/g' ./bundles.yaml
90 sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-sfc"/g' ./bundles.yaml
93 sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-vpn"/g' ./bundles.yaml
96 sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-l3"/g' ./bundles.yaml
99 sed -i -- 's/#enable-dpdk: true/enable-dpdk: true/g' ./bundles.yaml
100 sed -i -- 's/#hugepages: "50%"/hugepages: "50%"/g' ./bundles.yaml
103 sed -i -- 's/#- - nova-compute:lxd/- - nova-compute:lxd/g' ./bundles.yaml
104 sed -i -- 's/#- lxd:lxd/- lxd:lxd/g' ./bundles.yaml
105 sed -i -- 's/#virt-type: lxd/virt-type: lxd/g' ./bundles.yaml
106 # adding the lxd subordinate charm
107 echo " lxd:" >> ./bundles.yaml
108 echo " charm: local:xenial/lxd" >> ./bundles.yaml
113 #changing the target to the openstack release we want to deploy.
114 sed -i -- "s|mitaka|$2|g" ./bundles.yaml
116 #update source if trusty is target distribution
119 sed -i -- "s|#source|source|g" ./bundles.yaml
122 #changing the target to the ubuntu distro we want to deploy.
123 sed -i -- "s|trusty|$6|g" ./bundles.yaml
127 echo "... Deployment Started ...."
128 juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
129 juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"