blob: 7e36027de8b20e201626010a0a4fe812b04c0836 [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
Oleksii Butenko8be76f62018-03-30 13:35:26 +0300105- description: Install cinder
106 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
107 -C 'I@cinder:controller' state.sls cinder -b 1
108 node_name: {{ HOSTNAME_CFG01 }}
109 retry: {count: 1, delay: 5}
110 skip_fail: false
111
112- description: Check cinder list
113 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
114 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
115 node_name: {{ HOSTNAME_CFG01 }}
116 retry: {count: 1, delay: 5}
117 skip_fail: false
118
119
120- description: Install neutron service
121 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
122 -C 'I@neutron:server' state.sls neutron -b 1
123 node_name: {{ HOSTNAME_CFG01 }}
124 retry: {count: 1, delay: 5}
125 skip_fail: false
126
127- description: Install neutron on gtw node
128 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
129 -C 'I@neutron:gateway' state.sls neutron
130 node_name: {{ HOSTNAME_CFG01 }}
131 retry: {count: 1, delay: 5}
132 skip_fail: false
133
134# isntall designate
135- description: Install powerdns
136 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
137 -C 'I@powerdns:server' state.sls powerdns.server
138 node_name: {{ HOSTNAME_CFG01 }}
139 retry: {count: 1, delay: 5}
140 skip_fail: false
141
142- description: Install designate
143 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
144 -C 'I@designate:server' state.sls designate -b 1
145 node_name: {{ HOSTNAME_CFG01 }}
146 retry: {count: 5, delay: 10}
147 skip_fail: false
148
149- description: Check neutron agent-list
150 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
151 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
152 node_name: {{ HOSTNAME_CFG01 }}
153 retry: {count: 1, delay: 5}
154 skip_fail: false
155
156- description: Install heat service
157 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
158 -C 'I@heat:server' state.sls heat -b 1
159 node_name: {{ HOSTNAME_CFG01 }}
160 retry: {count: 1, delay: 5}
161 skip_fail: false
162
163- description: Check heat service
164 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
165 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
166 node_name: {{ HOSTNAME_CFG01 }}
167 retry: {count: 5, delay: 10}
168 skip_fail: false
169
170
171- description: Deploy horizon dashboard
172 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
173 -C 'I@horizon:server' state.sls horizon
174 node_name: {{ HOSTNAME_CFG01 }}
175 retry: {count: 1, delay: 5}
176 skip_fail: false
177
178# Install DogTag server service
179- description: Install DogTag server service
180 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
181 -C 'I@dogtag:server and *01*' state.sls dogtag.server
182 node_name: {{ HOSTNAME_CFG01 }}
183 retry: {count: 1, delay: 5}
184 skip_fail: false
185
186- description: Install DogTag server service
187 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
188 -C 'I@dogtag:server' state.sls dogtag.server
189 node_name: {{ HOSTNAME_CFG01 }}
190 retry: {count: 1, delay: 5}
191 skip_fail: false
192
193# Install Barbican server service
194- description: Install Barbican server service
195 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
196 -C 'I@barbican:server and *01*' state.sls barbican.server
197 node_name: {{ HOSTNAME_CFG01 }}
198 retry: {count: 1, delay: 5}
199 skip_fail: false
200
201- description: Install Barbican server service
202 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
203 -C 'I@barbican:server' state.sls barbican.server
204 node_name: {{ HOSTNAME_CFG01 }}
205 retry: {count: 1, delay: 5}
206 skip_fail: false
207
208- description: Install Barbican client
209 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
210 -C 'I@barbican:client' state.sls barbican.client
211 node_name: {{ HOSTNAME_CFG01 }}
212 retry: {count: 1, delay: 5}
213 skip_fail: True
214
215# Install compute node
216
217- description: Apply formulas for compute node
218 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
219 node_name: {{ HOSTNAME_CFG01 }}
220 retry: {count: 1, delay: 5}
221 skip_fail: true
222
223- description: Re-apply(as in doc) formulas for compute node
224 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
225 node_name: {{ HOSTNAME_CFG01 }}
226 retry: {count: 1, delay: 5}
227 skip_fail: false
228
229- description: Check IP on computes
230 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
231 'ip a'
232 node_name: {{ HOSTNAME_CFG01 }}
233 retry: {count: 10, delay: 30}
234 skip_fail: false
235
Oleksii Butenko8be76f62018-03-30 13:35:26 +0300236- description: Create net04_external
237 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
238 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
239 node_name: {{ HOSTNAME_CFG01 }}
240 retry: {count: 1, delay: 30}
241 skip_fail: false
242
243- description: Create subnet_external
244 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
245 '. /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'
246 node_name: {{ HOSTNAME_CFG01 }}
247 retry: {count: 1, delay: 30}
248 skip_fail: false
249
250- description: Create net04
251 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
252 '. /root/keystonercv3; neutron net-create net04'
253 node_name: {{ HOSTNAME_CFG01 }}
254 retry: {count: 1, delay: 30}
255 skip_fail: false
256
257- description: Create subnet_net04
258 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
259 '. /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'
260 node_name: {{ HOSTNAME_CFG01 }}
261 retry: {count: 1, delay: 30}
262 skip_fail: false
263
264- description: Create router
265 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
266 '. /root/keystonercv3; neutron router-create net04_router01'
267 node_name: {{ HOSTNAME_CFG01 }}
268 retry: {count: 1, delay: 30}
269 skip_fail: false
270
271- description: Set geteway
272 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
273 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
274 node_name: {{ HOSTNAME_CFG01 }}
275 retry: {count: 1, delay: 30}
276 skip_fail: false
277
278- description: Add interface
279 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
280 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
281 node_name: {{ HOSTNAME_CFG01 }}
282 retry: {count: 1, delay: 30}
283 skip_fail: false
284
Oleksii Butenko8be76f62018-03-30 13:35:26 +0300285- description: sync time
286 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
287 'service ntp stop; ntpd -gq; service ntp start'
288 node_name: {{ HOSTNAME_CFG01 }}
289 retry: {count: 1, delay: 30}
290 skip_fail: false
291
sgudz3fd44542018-04-02 11:45:49 +0300292- description: Install manila-api on first node
293 cmd: |
294 salt -C 'I@manila:api and *01*' state.sls manila.api;
295 node_name: {{ HOSTNAME_CFG01 }}
296 retry: {count: 1, delay: 5}
297 skip_fail: false
298
299- description: Install manila-api on other nodes
300 cmd: |
301 salt -C 'I@manila:api and not *01*' state.sls manila.api;
302 node_name: {{ HOSTNAME_CFG01 }}
303 retry: {count: 1, delay: 5}
304 skip_fail: false
305
306- description: Install manila-scheduler
307 cmd: |
308 salt -C 'I@manila:scheduler' state.sls manila.scheduler;
309 node_name: {{ HOSTNAME_CFG01 }}
310 retry: {count: 1, delay: 5}
311 skip_fail: false
312
313- description: Install manila-share
314 cmd: |
315 salt -C 'I@manila:share' state.sls manila.share;
316 node_name: {{ HOSTNAME_CFG01 }}
317 retry: {count: 1, delay: 5}
318 skip_fail: false
319
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300320- description: WR https://mirantis.jira.com/browse/PROD-19012
321 cmd: |
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300322 salt 'ctl*' cmd.run 'systemctl restart apache2'
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300323 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenkoa947bc02018-05-22 11:40:48 +0300324 retry: {count: 1, delay: 15}
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300325 skip_fail: false
326
sgudz3fd44542018-04-02 11:45:49 +0300327- description: Check manila-services
328 cmd: |
329 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list'
330 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko3deb90e2018-04-06 15:34:38 +0300331 retry: {count: 3, delay: 5}
sgudz3fd44542018-04-02 11:45:49 +0300332 skip_fail: false
333
Maksym Shalamovae15a772018-07-20 13:13:29 +0300334- description: Create manila type
335 cmd: |
336 salt 'cfg01*' state.sls manila.client
337 node_name: {{ HOSTNAME_CFG01 }}
338 retry: {count: 1, delay: 5}
339 skip_fail: false
340
sgudz3fd44542018-04-02 11:45:49 +0300341- description: Create CIFS and NFS share and check it status
342 cmd: |
343 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default';
344 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default';
345 sleep 5;
346 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list';
347 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenkoa561a8a2018-05-08 15:12:26 +0300348 retry: {count: 3, delay: 5}
sgudz3fd44542018-04-02 11:45:49 +0300349 skip_fail: false
Oleksii Butenko5cd0a162018-06-14 18:18:10 +0300350
351{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
Oleksii Butenko5cd0a162018-06-14 18:18:10 +0300352