blob: c43144a862fc039cc21d9c703823785c7808c367 [file] [log] [blame]
Oleksii Butenko8be76f62018-03-30 13:35:26 +03001{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenko0a38bae2018-04-05 18:23:20 +03006{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import DOMAIN_NAME with context %}
8
Oleksii Butenko8be76f62018-03-30 13:35:26 +03009{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
10{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Oleksii Butenko0a38bae2018-04-05 18:23:20 +030011{% import 'shared-salt.yaml' as SHARED with context %}
12
Oleksii Butenko8be76f62018-03-30 13:35:26 +030013# Install OpenStack control services
14
15- description: Nginx
16 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
17 -C 'I@nginx:server' state.sls salt.minion
18 node_name: {{ HOSTNAME_CFG01 }}
19 retry: {count: 1, delay: 5}
20 skip_fail: true
21
22- description: Deploy nginx proxy
23 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
24 -C 'I@nginx:server' state.sls nginx
25 node_name: {{ HOSTNAME_CFG01 }}
26 retry: {count: 1, delay: 5}
27 skip_fail: true
28
29- description: Install glance on all controllers
30 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
31 -C 'I@glance:server' state.sls glance -b 1
32 node_name: {{ HOSTNAME_CFG01 }}
33 retry: {count: 1, delay: 5}
34 skip_fail: false
35
36- description: Install keystone service (note that different fernet keys are created on different nodes)
37 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
38 -C 'I@keystone:server' state.sls keystone.server -b 1
39 node_name: {{ HOSTNAME_CFG01 }}
40 retry: {count: 2, delay: 15}
41 skip_fail: false
42
43- description: Restart apache due to PROD-10477
44 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 1, delay: 15}
47 skip_fail: false
48
49- description: Check apache status to PROD-10477
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 15}
53 skip_fail: false
54
55- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@glance:server' state.sls glusterfs.client
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
62- description: Update fernet keys for keystone server on the mounted glusterfs volume
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@keystone:server' state.sls keystone.server -b 1
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Populate keystone services/tenants/admins
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@keystone:client' state.sls keystone.client
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 2, delay: 5}
74 skip_fail: false
75
76- description: Check keystone service-list
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
78 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 1, delay: 5}
81 skip_fail: false
82
83- description: Check glance image-list
84 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
85 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
86 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 1, delay: 5}
88 skip_fail: false
89
90
91- description: Install nova on all controllers
92 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
93 -C 'I@nova:controller' state.sls nova -b 1
94 node_name: {{ HOSTNAME_CFG01 }}
95 retry: {count: 2, delay: 5}
96 skip_fail: false
97
98- description: Check nova service-list
99 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
100 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova --debug service-list'
101 node_name: {{ HOSTNAME_CFG01 }}
102 retry: {count: 3, delay: 5}
103 skip_fail: false
104
105
106- description: Install cinder
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
108 -C 'I@cinder:controller' state.sls cinder -b 1
109 node_name: {{ HOSTNAME_CFG01 }}
110 retry: {count: 1, delay: 5}
111 skip_fail: false
112
113- description: Check cinder list
114 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
115 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
116 node_name: {{ HOSTNAME_CFG01 }}
117 retry: {count: 1, delay: 5}
118 skip_fail: false
119
120
121- description: Install neutron service
122 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
123 -C 'I@neutron:server' state.sls neutron -b 1
124 node_name: {{ HOSTNAME_CFG01 }}
125 retry: {count: 1, delay: 5}
126 skip_fail: false
127
128- description: Install neutron on gtw node
129 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
130 -C 'I@neutron:gateway' state.sls neutron
131 node_name: {{ HOSTNAME_CFG01 }}
132 retry: {count: 1, delay: 5}
133 skip_fail: false
134
135# isntall designate
136- description: Install powerdns
137 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
138 -C 'I@powerdns:server' state.sls powerdns.server
139 node_name: {{ HOSTNAME_CFG01 }}
140 retry: {count: 1, delay: 5}
141 skip_fail: false
142
143- description: Install designate
144 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
145 -C 'I@designate:server' state.sls designate -b 1
146 node_name: {{ HOSTNAME_CFG01 }}
147 retry: {count: 5, delay: 10}
148 skip_fail: false
149
150- description: Check neutron agent-list
151 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
152 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
153 node_name: {{ HOSTNAME_CFG01 }}
154 retry: {count: 1, delay: 5}
155 skip_fail: false
156
157- description: Install heat service
158 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
159 -C 'I@heat:server' state.sls heat -b 1
160 node_name: {{ HOSTNAME_CFG01 }}
161 retry: {count: 1, delay: 5}
162 skip_fail: false
163
164- description: Check heat service
165 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
166 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
167 node_name: {{ HOSTNAME_CFG01 }}
168 retry: {count: 5, delay: 10}
169 skip_fail: false
170
171
172- description: Deploy horizon dashboard
173 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
174 -C 'I@horizon:server' state.sls horizon
175 node_name: {{ HOSTNAME_CFG01 }}
176 retry: {count: 1, delay: 5}
177 skip_fail: false
178
179# Install DogTag server service
180- description: Install DogTag server service
181 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
182 -C 'I@dogtag:server and *01*' state.sls dogtag.server
183 node_name: {{ HOSTNAME_CFG01 }}
184 retry: {count: 1, delay: 5}
185 skip_fail: false
186
187- description: Install DogTag server service
188 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
189 -C 'I@dogtag:server' state.sls dogtag.server
190 node_name: {{ HOSTNAME_CFG01 }}
191 retry: {count: 1, delay: 5}
192 skip_fail: false
193
194# Install Barbican server service
195- description: Install Barbican server service
196 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
197 -C 'I@barbican:server and *01*' state.sls barbican.server
198 node_name: {{ HOSTNAME_CFG01 }}
199 retry: {count: 1, delay: 5}
200 skip_fail: false
201
202- description: Install Barbican server service
203 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
204 -C 'I@barbican:server' state.sls barbican.server
205 node_name: {{ HOSTNAME_CFG01 }}
206 retry: {count: 1, delay: 5}
207 skip_fail: false
208
209- description: Install Barbican client
210 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
211 -C 'I@barbican:client' state.sls barbican.client
212 node_name: {{ HOSTNAME_CFG01 }}
213 retry: {count: 1, delay: 5}
214 skip_fail: True
215
216# Install compute node
217
218- description: Apply formulas for compute node
219 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
220 node_name: {{ HOSTNAME_CFG01 }}
221 retry: {count: 1, delay: 5}
222 skip_fail: true
223
224- description: Re-apply(as in doc) formulas for compute node
225 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
226 node_name: {{ HOSTNAME_CFG01 }}
227 retry: {count: 1, delay: 5}
228 skip_fail: false
229
230- description: Check IP on computes
231 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
232 'ip a'
233 node_name: {{ HOSTNAME_CFG01 }}
234 retry: {count: 10, delay: 30}
235 skip_fail: false
236
Oleksii Butenko8be76f62018-03-30 13:35:26 +0300237- description: Create net04_external
238 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
239 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
240 node_name: {{ HOSTNAME_CFG01 }}
241 retry: {count: 1, delay: 30}
242 skip_fail: false
243
244- description: Create subnet_external
245 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
246 '. /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'
247 node_name: {{ HOSTNAME_CFG01 }}
248 retry: {count: 1, delay: 30}
249 skip_fail: false
250
251- description: Create net04
252 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
253 '. /root/keystonercv3; neutron net-create net04'
254 node_name: {{ HOSTNAME_CFG01 }}
255 retry: {count: 1, delay: 30}
256 skip_fail: false
257
258- description: Create subnet_net04
259 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
260 '. /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'
261 node_name: {{ HOSTNAME_CFG01 }}
262 retry: {count: 1, delay: 30}
263 skip_fail: false
264
265- description: Create router
266 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
267 '. /root/keystonercv3; neutron router-create net04_router01'
268 node_name: {{ HOSTNAME_CFG01 }}
269 retry: {count: 1, delay: 30}
270 skip_fail: false
271
272- description: Set geteway
273 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
274 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
275 node_name: {{ HOSTNAME_CFG01 }}
276 retry: {count: 1, delay: 30}
277 skip_fail: false
278
279- description: Add interface
280 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
281 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
282 node_name: {{ HOSTNAME_CFG01 }}
283 retry: {count: 1, delay: 30}
284 skip_fail: false
285
Oleksii Butenko8be76f62018-03-30 13:35:26 +0300286- description: sync time
287 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
288 'service ntp stop; ntpd -gq; service ntp start'
289 node_name: {{ HOSTNAME_CFG01 }}
290 retry: {count: 1, delay: 30}
291 skip_fail: false
292
293# Configure cinder-volume salt-call PROD-13167
294- description: Set disks 01
295 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
296 node_name: {{ HOSTNAME_CTL01 }}
297 retry: {count: 1, delay: 30}
298 skip_fail: false
299
300- description: Set disks 02
301 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
302 node_name: {{ HOSTNAME_CTL02 }}
303 retry: {count: 1, delay: 30}
304 skip_fail: false
305
306- description: Set disks 03
307 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
308 node_name: {{ HOSTNAME_CTL03 }}
309 retry: {count: 1, delay: 30}
310 skip_fail: false
311
312- description: Create partitions 01
313 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
314 node_name: {{ HOSTNAME_CTL01 }}
315 retry: {count: 1, delay: 30}
316 skip_fail: false
317
318- description: Create partitions 02
319 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
320 node_name: {{ HOSTNAME_CTL02 }}
321 retry: {count: 1, delay: 30}
322 skip_fail: false
323
324- description: Create partitions 03
325 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
326 node_name: {{ HOSTNAME_CTL03 }}
327 retry: {count: 1, delay: 30}
328 skip_fail: false
329
330- description: create volume_group
331 cmd: salt "ctl*" cmd.run 'vgcreate cinder-volumes /dev/vdb1'
332 node_name: {{ HOSTNAME_CFG01 }}
333 retry: {count: 1, delay: 30}
334 skip_fail: false
335
336- description: Install cinder-volume
337 cmd: salt 'ctl*' cmd.run 'apt-get install cinder-volume -y'
338 node_name: {{ HOSTNAME_CFG01 }}
339 retry: {count: 1, delay: 30}
340 skip_fail: false
341
342- description: Install crudini
343 cmd: salt "ctl*" cmd.run 'apt-get install crudini -y'
344 node_name: {{ HOSTNAME_CFG01 }}
345 retry: {count: 1, delay: 30}
346 skip_fail: false
347
348- description: Temporary WR set enabled backends value 01
349 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
350 node_name: {{ HOSTNAME_CTL01 }}
351 retry: {count: 1, delay: 30}
352 skip_fail: false
353
354- description: Temporary WR set enabled backends value 02
355 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
356 node_name: {{ HOSTNAME_CTL02 }}
357 retry: {count: 1, delay: 30}
358 skip_fail: false
359
360- description: Temporary WR set enabled backends value 03
361 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
362 node_name: {{ HOSTNAME_CTL03 }}
363 retry: {count: 1, delay: 30}
364 skip_fail: false
365
366- description: Install docker.io on gtw
367 cmd: salt-call cmd.run 'apt-get install docker.io -y'
368 node_name: {{ HOSTNAME_GTW01 }}
369 retry: {count: 1, delay: 30}
370 skip_fail: false
371
372- description: Enable forward policy
373 cmd: iptables --policy FORWARD ACCEPT
374 node_name: {{ HOSTNAME_GTW01 }}
375 retry: {count: 1, delay: 30}
376 skip_fail: false
377
378- description: Restart cinder volume
379 cmd: |
380 salt -C 'I@cinder:controller' service.restart cinder-volume;
381 node_name: {{ HOSTNAME_CFG01 }}
382 retry: {count: 2, delay: 5}
383 skip_fail: false
384
385- description: create rc file on cfg
386 cmd: scp ctl01:/root/keystonercv3 /root
387 node_name: {{ HOSTNAME_CFG01 }}
388 retry: {count: 1, delay: 30}
389 skip_fail: false
390
391- description: Copy rc file
392 cmd: scp /root/keystonercv3 gtw01:/root
393 node_name: {{ HOSTNAME_CFG01 }}
394 retry: {count: 1, delay: 30}
395 skip_fail: false
sgudz3fd44542018-04-02 11:45:49 +0300396
397- description: Install manila-api on first node
398 cmd: |
399 salt -C 'I@manila:api and *01*' state.sls manila.api;
400 node_name: {{ HOSTNAME_CFG01 }}
401 retry: {count: 1, delay: 5}
402 skip_fail: false
403
404- description: Install manila-api on other nodes
405 cmd: |
406 salt -C 'I@manila:api and not *01*' state.sls manila.api;
407 node_name: {{ HOSTNAME_CFG01 }}
408 retry: {count: 1, delay: 5}
409 skip_fail: false
410
411- description: Install manila-scheduler
412 cmd: |
413 salt -C 'I@manila:scheduler' state.sls manila.scheduler;
414 node_name: {{ HOSTNAME_CFG01 }}
415 retry: {count: 1, delay: 5}
416 skip_fail: false
417
418- description: Install manila-share
419 cmd: |
420 salt -C 'I@manila:share' state.sls manila.share;
421 node_name: {{ HOSTNAME_CFG01 }}
422 retry: {count: 1, delay: 5}
423 skip_fail: false
424
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300425- description: WR https://mirantis.jira.com/browse/PROD-19012
426 cmd: |
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300427 salt 'ctl*' cmd.run 'systemctl restart apache2'
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300428 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300429 retry: {count: 3, delay: 15}
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300430 skip_fail: false
431
sgudz3fd44542018-04-02 11:45:49 +0300432- description: Check manila-services
433 cmd: |
434 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list'
435 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko3deb90e2018-04-06 15:34:38 +0300436 retry: {count: 3, delay: 5}
sgudz3fd44542018-04-02 11:45:49 +0300437 skip_fail: false
438
439- description: Create manila type
440 cmd: |
sgudz1d658402018-04-06 11:59:48 +0300441 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila type-create default false --create_share_from_snapshot_support true --revert_to_snapshot_support true --mount_snapshot_support true --snapshot_support true --is_public true'
sgudz3fd44542018-04-02 11:45:49 +0300442 node_name: {{ HOSTNAME_CFG01 }}
443 retry: {count: 1, delay: 5}
444 skip_fail: false
445
446- description: Create CIFS and NFS share and check it status
447 cmd: |
448 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default';
449 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default';
450 sleep 5;
451 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list';
452 node_name: {{ HOSTNAME_CFG01 }}
453 retry: {count: 1, delay: 5}
454 skip_fail: false
Oleksii Butenko0a38bae2018-04-05 18:23:20 +0300455
456{{ SHARED.RUN_NEW_TEMPEST() }}