enabling Intel podp for EMC scalio
[joid.git] / ci / 01-deploybundle.sh
1 #!/bin/bash
2 #placeholder for deployment script.
3 set -ex
4
5 #    ./01-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro
6
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|trusty|$6|g" ./fetch-charms.sh
11     sh ./fetch-charms.sh
12
13
14 case "$1" in
15     'nonha' )
16         cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml
17         ;;
18     'ha' )
19         cp $4/juju-deployer/ovs-$4-ha.yaml ./bundles.yaml
20         ;;
21     'tip' )
22         cp $4/juju-deployer/ovs-$4-tip.yaml ./bundles.yaml
23         cp common/source/* ./
24         sed -i -- "s|branch: master|branch: stable/$2|g" ./*.yaml
25         ;;
26     * )
27         cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml
28         ;;
29 esac
30
31 #changing the target to the openstack release we want to deploy. 
32 sed -i -- "s|mitaka|$2|g" ./bundles.yaml
33
34 #changing the target to the ubuntu distro we want to deploy. 
35 sed -i -- "s|trusty|$6|g" ./bundles.yaml
36
37 case "$3" in
38     'orangepod1' )
39         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
40          sed -i -- 's/10.4.1.1/192.168.1.2/g' ./bundles.yaml
41         # choose the correct interface to use for data network
42          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.11.0\/24/g' ./bundles.yaml
43         # Choose the external port to go out from gateway to use.
44          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
45         # Use host for public API for Orange pod2
46         # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
47          ;;
48     'orangepod2' )
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.2.2/g' ./bundles.yaml
51         # choose the correct interface to use for data network
52          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.12.0\/24/g' ./bundles.yaml
53         # Choose the external port to go out from gateway to use.
54          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
55         # Use host for public API for Orange pod2
56         # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
57          ;;
58      'intelpod9' )
59         # As per your lab vip address list be deafult uses 10.9.1.11 - 10.9.1.20
60          sed -i -- 's/10.4.1.1/10.9.1.2/g' ./bundles.yaml
61         # choose the correct interface to use for data network
62          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.9.12.0\/24/g' ./bundles.yaml
63         # Choose the external port to go out from gateway to use.
64          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
65         # Provide the gateway MAC to route the traffic externally.
66          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
67          ;;
68      'intelpod6' )
69         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
70          sed -i -- 's/10.4.1.1/10.6.1.2/g' ./bundles.yaml
71         # choose the correct interface to use for data network
72          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.6.12.0\/24/g' ./bundles.yaml
73         # Choose the external port to go out from gateway to use.
74          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
75         # Provide the gateway MAC to route the traffic externally.
76          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
77          ;;
78      'intelpod5' )
79         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
80          sed -i -- 's/10.4.1.1/10.5.1.2/g' ./bundles.yaml
81         # choose the correct interface to use for data network
82          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.5.12.0\/24/g' ./bundles.yaml
83         # Choose the external port to go out from gateway to use.
84          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
85         # Provide the gateway MAC to route the traffic externally.
86          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
87         ;;
88      'attvirpod1' )
89         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
90          sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
91         # Choose the external port to go out from gateway to use.
92          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
93         ;;
94      'cengnlynxpod1' )
95         # Chose the hard drive(s) to use for CEPH OSD
96          sed -i -- 's|osd-devices: /srv|osd-devices: /dev/sdb|g' ./bundles.yaml
97         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
98          sed -i -- 's/10.4.1.1/10.120.0.1/g' ./bundles.yaml
99         # choose the correct interface to use for data network
100          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 172.16.121.0\/24/g' ./bundles.yaml
101         # Choose the external port to go out from gateway to use.
102          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1.1202"/g' ./bundles.yaml
103         ;;
104      'juniperpod1' )
105          sed -i -- 's/10.4.1.1/172.16.50.1/g' ./bundles.yaml
106          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
107          ;;
108      'ravellodemopod' )
109          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth2"/g' ./bundles.yaml
110         ;;
111      'custom' )
112          sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
113          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
114         ;;
115      'default' )
116          sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
117          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
118         ;;
119 esac
120
121 case "$5" in
122     'ipv6' )
123          sed -i -- 's/#prefer-ipv6: true/prefer-ipv6: true/g' ./bundles.yaml
124         ;;
125     'dvr' )
126          sed -i -- 's/#enable-dvr: true/enable-dvr: true/g' ./bundles.yaml
127          sed -i -- 's/#l2-population: true/l2-population: true/g' ./bundles.yaml
128         ;;
129     'sfc' )
130          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-sfc"/g' ./bundles.yaml
131         ;;
132     'vpn' )
133          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-vpn"/g' ./bundles.yaml
134         ;;
135     'odl_l3' )
136          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-l3"/g' ./bundles.yaml
137         ;;
138 esac
139
140 echo "... Deployment Started ...."
141         juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
142         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"
143