Add orange pod1
[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     'orangepod1' )
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.1.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.11.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         # Use host for public API for Orange pod2
31         # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
32          ;;
33     'orangepod2' )
34         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
35          sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
36         # choose the correct interface to use for data network
37          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.12.0\/24/g' ./bundles.yaml
38         # Choose the external port to go out from gateway to use.
39          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
40         # Use host for public API for Orange pod2
41         # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
42          ;;
43      'intelpod6' )
44         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
45          sed -i -- 's/10.4.1.1/10.6.1.2/g' ./bundles.yaml
46         # choose the correct interface to use for data network
47          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.6.12.0\/24/g' ./bundles.yaml
48         # Choose the external port to go out from gateway to use.
49          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
50         # Provide the gateway MAC to route the traffic externally.
51          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
52          ;;
53      'intelpod5' )
54         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
55          sed -i -- 's/10.4.1.1/10.5.1.2/g' ./bundles.yaml
56         # choose the correct interface to use for data network
57          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.5.12.0\/24/g' ./bundles.yaml
58         # Choose the external port to go out from gateway to use.
59          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
60         # Provide the gateway MAC to route the traffic externally.
61          sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
62         ;;
63      'attvirpod1' )
64         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
65          sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
66         # Choose the external port to go out from gateway to use.
67          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
68         ;;
69      'cengnlynxpod1' )
70         # Chose the hard drive(s) to use for CEPH OSD
71          sed -i -- 's|osd-devices: /srv|osd-devices: /dev/sdb|g' ./bundles.yaml
72         # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
73          sed -i -- 's/10.4.1.1/10.120.0.1/g' ./bundles.yaml
74         # choose the correct interface to use for data network
75          sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 172.16.121.0\/24/g' ./bundles.yaml
76         # Choose the external port to go out from gateway to use.
77          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1.1202"/g' ./bundles.yaml
78         ;;
79      'juniperpod1' )
80          sed -i -- 's/10.4.1.1/172.16.50.1/g' ./bundles.yaml
81          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
82          ;;
83      'ravellodemopod' )
84          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth2"/g' ./bundles.yaml
85         ;;
86      'custom' )
87          sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
88          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
89         ;;
90      'default' )
91          sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml
92          sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
93         ;;
94 esac
95
96 case "$5" in
97     'ipv6' )
98          sed -i -- 's/#prefer-ipv6: true/prefer-ipv6: true/g' ./bundles.yaml
99         ;;
100     'dvr' )
101          sed -i -- 's/#enable-dvr: true/enable-dvr: true/g' ./bundles.yaml
102          sed -i -- 's/#l2-population: true/l2-population: true/g' ./bundles.yaml
103         ;;
104     'sfc' )
105          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-sfc"/g' ./bundles.yaml
106         ;;
107     'vpn' )
108          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-vpn"/g' ./bundles.yaml
109         ;;
110     'odl_l3' )
111          sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-l3"/g' ./bundles.yaml
112         ;;
113 esac
114
115 echo "... Deployment Started ...."
116 case "$1" in
117     'nonha' )
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     'ha' )
122         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
123         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
124         ;;
125     'tip' )
126         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
127         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
128         ;;
129     * )
130         juju-deployer -vW -d -t 3600 -c bundles.yaml trusty-"$2"-nodes
131         juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml trusty-"$2"
132         ;;
133 esac
134
135 #case "$4" in
136 #    'onos' )
137 #         echo "... onos prepare test ..."
138 #         sleep 180s
139 #         sh onos/juju_test_prepare.sh "$3"
140 #        ;;
141 #esac