blob: f64d8ca85a92afbff08129535664e4de9ce89231 [file] [log] [blame]
Oleksii Butenko7d9671c2017-11-01 17:27:23 +02001{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_GTW01 with context %}
4#{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_GTW02 with context %}
Oleksii Butenko7c48def2017-10-03 12:41:05 +03005{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
6{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Oleksii Butenko9f2cf512017-12-19 14:03:41 +02007{% set PATTERN = os_env('PATTERN', 'false') %}
8{% set RUN_TEMPEST = os_env('RUN_TEMPEST', 'false') %}
Oleksii Butenko7c48def2017-10-03 12:41:05 +03009
10# Install OpenStack control services
11
12- description: Install glance on all controllers
13 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
14 -C 'I@glance:server' state.sls glance -b 1
15 node_name: {{ HOSTNAME_CFG01 }}
16 retry: {count: 1, delay: 5}
17 skip_fail: false
18
19- description: Install keystone service (note that different fernet keys are created on different nodes)
20 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
21 -C 'I@keystone:server' state.sls keystone.server -b 1
22 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020023 retry: {count: 2, delay: 15}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030024 skip_fail: false
25
26- description: Restart apache due to PROD-10477
27 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 15}
30 skip_fail: false
31
32- description: Check apache status to PROD-10477
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
34 node_name: {{ HOSTNAME_CFG01 }}
35 retry: {count: 1, delay: 15}
36 skip_fail: false
37
38- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
39 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
40 -C 'I@glance:server' state.sls glusterfs.client
41 node_name: {{ HOSTNAME_CFG01 }}
42 retry: {count: 1, delay: 5}
43 skip_fail: false
44
45- description: Update fernet keys for keystone server on the mounted glusterfs volume
46 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
47 -C 'I@keystone:server' state.sls keystone.server -b 1
48 node_name: {{ HOSTNAME_CFG01 }}
49 retry: {count: 1, delay: 5}
50 skip_fail: false
51
52- description: Populate keystone services/tenants/admins
53 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
54 -C 'I@keystone:client' state.sls keystone.client
55 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievf073e6f2018-02-06 23:45:15 +020056 retry: {count: 2, delay: 5}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030057 skip_fail: false
58
59- description: Check keystone service-list
60 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
61 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
62 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020063 retry: {count: 1, delay: 5}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030064 skip_fail: false
65
66- description: Check glance image-list
67 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
68 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
69 node_name: {{ HOSTNAME_CFG01 }}
70 retry: {count: 1, delay: 5}
71 skip_fail: false
72
73
74- description: Install nova on all controllers
75 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
76 -C 'I@nova:controller' state.sls nova -b 1
77 node_name: {{ HOSTNAME_CFG01 }}
78 retry: {count: 2, delay: 5}
79 skip_fail: false
80
81- description: Check nova service-list
82 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
83 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova --debug service-list'
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 3, delay: 5}
86 skip_fail: false
87
88
89- description: Install cinder
90 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
91 -C 'I@cinder:controller' state.sls cinder -b 1
92 node_name: {{ HOSTNAME_CFG01 }}
93 retry: {count: 1, delay: 5}
94 skip_fail: false
95
Oleksii Butenko9f2cf512017-12-19 14:03:41 +020096- description: Install cinder volume
97 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
98 -C 'I@cinder:volume' state.sls cinder
99 node_name: {{ HOSTNAME_CFG01 }}
100 retry: {count: 1, delay: 5}
101 skip_fail: false
102
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300103- description: Check cinder list
104 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
105 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
106 node_name: {{ HOSTNAME_CFG01 }}
107 retry: {count: 1, delay: 5}
108 skip_fail: false
109
110
111- description: Install neutron service
112 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
113 -C 'I@neutron:server' state.sls neutron -b 1
114 node_name: {{ HOSTNAME_CFG01 }}
115 retry: {count: 1, delay: 5}
116 skip_fail: false
117
118- description: Install neutron on gtw node
119 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
120 -C 'I@neutron:gateway' state.sls neutron
121 node_name: {{ HOSTNAME_CFG01 }}
122 retry: {count: 1, delay: 5}
123 skip_fail: false
124
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300125- description: Check neutron agent-list
126 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
127 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
128 node_name: {{ HOSTNAME_CFG01 }}
129 retry: {count: 1, delay: 5}
130 skip_fail: false
131
132- description: Install heat service
133 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
134 -C 'I@heat:server' state.sls heat -b 1
135 node_name: {{ HOSTNAME_CFG01 }}
136 retry: {count: 1, delay: 5}
137 skip_fail: false
138
139- description: Check heat service
140 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
141 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
142 node_name: {{ HOSTNAME_CFG01 }}
143 retry: {count: 5, delay: 10}
144 skip_fail: false
145
146
147- description: Deploy horizon dashboard
148 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
149 -C 'I@horizon:server' state.sls horizon
150 node_name: {{ HOSTNAME_CFG01 }}
151 retry: {count: 1, delay: 5}
152 skip_fail: true
153
154- description: Deploy nginx proxy
155 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
156 -C 'I@nginx:server' state.sls nginx
157 node_name: {{ HOSTNAME_CFG01 }}
158 retry: {count: 1, delay: 5}
159 skip_fail: true
160
161
162# Install compute node
163
164- description: Apply formulas for compute node
165 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
166 node_name: {{ HOSTNAME_CFG01 }}
167 retry: {count: 1, delay: 5}
168 skip_fail: true
169
170- description: Re-apply(as in doc) formulas for compute node
171 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200174 skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300175
176- description: Check IP on computes
177 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
178 'ip a'
179 node_name: {{ HOSTNAME_CFG01 }}
180 retry: {count: 10, delay: 30}
181 skip_fail: false
182
183
184 # Upload cirros image
185
186- description: Upload cirros image on ctl01
187 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
188 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
189 node_name: {{ HOSTNAME_CFG01 }}
190 retry: {count: 2, delay: 30}
191 skip_fail: false
192
193- description: Register image in glance
194 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Dmitry Tyzhnenko30f58042017-11-28 17:00:40 +0200195 '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300196 node_name: {{ HOSTNAME_CFG01 }}
197 retry: {count: 1, delay: 30}
198 skip_fail: false
199
200- description: Create net04_external
201 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
202 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
203 node_name: {{ HOSTNAME_CFG01 }}
204 retry: {count: 1, delay: 30}
205 skip_fail: false
206
207- description: Create subnet_external
208 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
209 '. /root/keystonercv3; neutron subnet-create net04_ext {{ IPV4_NET_EXTERNAL_PREFIX }}.0/24 --name net04_ext__subnet --disable-dhcp --allocation-pool start={{ IPV4_NET_EXTERNAL_PREFIX }}.150,end={{ IPV4_NET_EXTERNAL_PREFIX }}.180 --gateway {{ IPV4_NET_EXTERNAL_PREFIX }}.1'
210 node_name: {{ HOSTNAME_CFG01 }}
211 retry: {count: 1, delay: 30}
212 skip_fail: false
213
214- description: Create net04
215 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
216 '. /root/keystonercv3; neutron net-create net04'
217 node_name: {{ HOSTNAME_CFG01 }}
218 retry: {count: 1, delay: 30}
219 skip_fail: false
220
221- description: Create subnet_net04
222 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
223 '. /root/keystonercv3; neutron subnet-create net04 {{ IPV4_NET_TENANT_PREFIX }}.0/24 --name net04__subnet --allocation-pool start={{ IPV4_NET_TENANT_PREFIX }}.120,end={{ IPV4_NET_TENANT_PREFIX }}.240'
224 node_name: {{ HOSTNAME_CFG01 }}
225 retry: {count: 1, delay: 30}
226 skip_fail: false
227
228- description: Create router
229 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
230 '. /root/keystonercv3; neutron router-create net04_router01'
231 node_name: {{ HOSTNAME_CFG01 }}
232 retry: {count: 1, delay: 30}
233 skip_fail: false
234
235- description: Set geteway
236 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
237 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
238 node_name: {{ HOSTNAME_CFG01 }}
239 retry: {count: 1, delay: 30}
240 skip_fail: false
241
242- description: Add interface
243 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
244 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
245 node_name: {{ HOSTNAME_CFG01 }}
246 retry: {count: 1, delay: 30}
247 skip_fail: false
248
Oleksii Butenkob7211002018-01-24 17:41:47 +0200249#- description: Allow all tcp
250# cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
251# '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
252# node_name: {{ HOSTNAME_CFG01 }}
253# retry: {count: 1, delay: 30}
254# skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300255
Oleksii Butenkoc3bb16b2018-01-23 12:11:42 +0200256#- description: Allow all icmp
257# cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
258# '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
259# node_name: {{ HOSTNAME_CFG01 }}
260# retry: {count: 1, delay: 30}
261# skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300262
Oleksii Butenkoc3bb16b2018-01-23 12:11:42 +0200263#- description: sync time
Oleksii Butenkob7211002018-01-24 17:41:47 +0200264# cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
265# 'service ntp stop; ntpd -gq; service ntp start'
266# node_name: {{ HOSTNAME_CFG01 }}
267# retry: {count: 1, delay: 30}
268# skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300269
270- description: Temp workaround of PROD-13167
271 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run
272 'apt-get install python-pymysql -y'
273 node_name: {{ HOSTNAME_CFG01 }}
274 retry: {count: 1, delay: 30}
275 skip_fail: false
276
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300277- description: Install docker.io on gtw
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +0300278 cmd: salt 'gtw01*' cmd.run 'apt-get install docker.io -y'
279 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300280 retry: {count: 1, delay: 30}
281 skip_fail: false
282
Tatyana Leontovichd6bcbc92018-03-23 15:02:28 +0200283- description: Enable forward policy
284 cmd: salt "gtw01*" cmd.run 'iptables --policy FORWARD ACCEPT'
285 node_name: {{ HOSTNAME_CFG01 }}
286 retry: {count: 1, delay: 30}
287 skip_fail: false
288
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300289- description: create rc file on cfg
290 cmd: scp ctl01:/root/keystonercv3 /root
291 node_name: {{ HOSTNAME_CFG01 }}
292 retry: {count: 1, delay: 30}
293 skip_fail: false
294
295- description: Copy rc file
296 cmd: scp /root/keystonercv3 gtw01:/root
297 node_name: {{ HOSTNAME_CFG01 }}
298 retry: {count: 1, delay: 30}
299 skip_fail: false