added the SR1 OpenDayLight build for Beryllium.
[joid.git] / ci / 01-deploybundle.sh
1 #!/bin/bash
2 #placeholder for deployment script.
3 set -ex
4
5 case "$1" in
6     'nonha' )
7         cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml
8         ;;
9     'ha' )
10         cp $4/juju-deployer/ovs-$4-ha.yaml ./bundles.yaml
11         ;;
12     'tip' )
13         cp $4/juju-deployer/ovs-$4-tip.yaml ./bundles.yaml
14         cp common/source/* ./
15         sed -i -- "s|branch: master|branch: stable/$2|g" ./*.yaml
16         ;;
17     * )
18         cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml
19         ;;
20 esac
21
22 case "$3" in
23     'orangepod2' )
24         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
25          sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
26         # choose the correct interface to use for data network
27          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.12.0\/24/g' ./bundles.yaml
28         # Choose the external port to go out from gateway to use.
29          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
30          ;;
31      'intelpod6' )
32         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
33          sed -i -- 's/10.4.1.1/10.6.1.2/g' ./bundles.yaml
34         # choose the correct interface to use for data network
35          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.6.12.0\/24/g' ./bundles.yaml
36         # Choose the external port to go out from gateway to use.
37          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
38         # Provide the gateway MAC to route the traffic externally.
39          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
40          ;;
41      'intelpod5' )
42         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
43          sed -i -- 's/10.4.1.1/10.5.1.2/g' ./bundles.yaml
44         # choose the correct interface to use for data network
45          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.5.12.0\/24/g' ./bundles.yaml
46         # Choose the external port to go out from gateway to use.
47          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
48         # Provide the gateway MAC to route the traffic externally.
49          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
50         ;;
51      'attvirpod1' )
52         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
53          sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
54         # Choose the external port to go out from gateway to use.
55          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
56         ;;
57      'cengnlynxpod1' )
58         # Chose the hard drive(s) to use for CEPH OSD
59          sed -i -- 's|osd-devices: /srv|osd-devices: /dev/sdb|g' ./bundles.yaml
60         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
61          sed -i -- 's/10.4.1.1/10.120.0.1/g' ./bundles.yaml
62         # choose the correct interface to use for data network
63          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 172.16.121.0\/24/g' ./bundles.yaml
64         # Choose the external port to go out from gateway to use.
65          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1.1202"/g' ./bundles.yaml
66         ;;
67      'juniperpod1' )
68          sed -i -- 's/10.4.1.1/172.16.50.1/g' ./bundles.yaml
69          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
70          ;;
71      'ravellodemopod' )
72          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth2"/g' ./bundles.yaml
73         ;;
74      'custom' )
75          sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
76          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
77         ;;
78      'default' )
79          sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
80          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
81         ;;
82 esac
83
84 case "$5" in
85     'ipv6' )
86          sed -i -- 's/#prefer-ipv6: true/prefer-ipv6: true/g' ./bundles.yaml
87         ;;
88     'dvr' )
89          sed -i -- 's/#enable-dvr: true/enable-dvr: true/g' ./bundles.yaml
90          sed -i -- 's/#l2-population: true/l2-population: true/g' ./bundles.yaml
91         ;;
92     'sfc' )
93          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-sfc"/g' ./bundles.yaml
94         ;;
95     'vpn' )
96          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-vpn"/g' ./bundles.yaml
97         ;;
98     'odl_l3' )
99          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-l3"/g' ./bundles.yaml
100         ;;
101 esac
102
103 echo "... Deployment Started ...."
104 case "$1" in
105     'nonha' )
106         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
107         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
108         ;;
109     'ha' )
110         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
111         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
112         ;;
113     'tip' )
114         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
115         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
116         ;;
117     * )
118         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
119         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
120         ;;
121 esac
122
123 #case "$4" in
124 #    'onos' )
125 #         echo "... onos prepare test ..."
126 #         sleep 180s
127 #         sh onos/juju_test_prepare.sh "$3"
128 #        ;;
129 #esac