blob: c6e1c0492112912fef1f31be9736b9e8d2137b81 [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
sgudz09e9aa92018-04-12 12:31:53 +03006{% from 'virtual-mcp-pike-ovs/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'virtual-mcp-pike-ovs/underlay.yaml' import DOMAIN_NAME with context %}
Oleksii Butenkoc05c9f62018-04-19 19:00:02 +03008{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
9{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
sgudz09e9aa92018-04-12 12:31:53 +030010{% import 'shared-salt.yaml' as SHARED with context %}
Tatyana Leontovich4f613672018-06-12 21:41:19 +030011{% import 'shared-backup-restore.yaml' as BACKUP with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020012# Install OpenStack control services
13
14- description: Install glance on all controllers
15 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
16 -C 'I@glance:server' state.sls glance -b 1
17 node_name: {{ HOSTNAME_CFG01 }}
18 retry: {count: 1, delay: 5}
19 skip_fail: false
20
21- description: Install keystone service (note that different fernet keys are created on different nodes)
22 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
23 -C 'I@keystone:server' state.sls keystone.server -b 1
24 node_name: {{ HOSTNAME_CFG01 }}
25 retry: {count: 2, delay: 15}
26 skip_fail: false
27
28- description: Restart apache due to PROD-10477
29 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
30 node_name: {{ HOSTNAME_CFG01 }}
31 retry: {count: 1, delay: 15}
32 skip_fail: false
33
34- description: Check apache status to PROD-10477
35 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 15}
38 skip_fail: false
39
40- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
41 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
42 -C 'I@glance:server' state.sls glusterfs.client
43 node_name: {{ HOSTNAME_CFG01 }}
44 retry: {count: 1, delay: 5}
45 skip_fail: false
46
47- description: Update fernet keys for keystone server on the mounted glusterfs volume
48 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
49 -C 'I@keystone:server' state.sls keystone.server -b 1
50 node_name: {{ HOSTNAME_CFG01 }}
51 retry: {count: 1, delay: 5}
52 skip_fail: false
53
54- description: Populate keystone services/tenants/admins
55 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
56 -C 'I@keystone:client' state.sls keystone.client
57 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievf073e6f2018-02-06 23:45:15 +020058 retry: {count: 2, delay: 5}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020059 skip_fail: false
60
61- description: Check keystone service-list
62 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
63 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
64 node_name: {{ HOSTNAME_CFG01 }}
65 retry: {count: 1, delay: 5}
66 skip_fail: false
67
68- description: Check glance image-list
69 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020070 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +020071 node_name: {{ HOSTNAME_CFG01 }}
72 retry: {count: 1, delay: 5}
73 skip_fail: false
74
75
76- description: Install nova on all controllers
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
78 -C 'I@nova:controller' state.sls nova -b 1
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 2, delay: 5}
81 skip_fail: false
82
83- description: Check nova service-list
84 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020085 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova --debug service-list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +020086 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 3, delay: 5}
88 skip_fail: false
89
90
91- description: Install cinder
92 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
93 -C 'I@cinder:controller' state.sls cinder -b 1
94 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020095 retry: {count: 1, delay: 5}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020096 skip_fail: false
97
98- description: Check cinder list
99 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200100 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200101 node_name: {{ HOSTNAME_CFG01 }}
102 retry: {count: 1, delay: 5}
103 skip_fail: false
104
105
106- description: Install neutron service
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
108 -C 'I@neutron:server' state.sls neutron -b 1
109 node_name: {{ HOSTNAME_CFG01 }}
110 retry: {count: 1, delay: 5}
111 skip_fail: false
112
113- description: Install neutron on gtw node
114 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
115 -C 'I@neutron:gateway' state.sls neutron
116 node_name: {{ HOSTNAME_CFG01 }}
117 retry: {count: 1, delay: 5}
118 skip_fail: false
119
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200120# isntall designate
121- description: Install bind
122 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
123 -C 'I@bind:server' state.sls bind
124 node_name: {{ HOSTNAME_CFG01 }}
125 retry: {count: 1, delay: 5}
126 skip_fail: false
127
128- description: Install designate
129 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
130 -C 'I@designate:server' state.sls designate -b 1
131 node_name: {{ HOSTNAME_CFG01 }}
132 retry: {count: 5, delay: 10}
133 skip_fail: false
134
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200135- description: Check neutron agent-list
136 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200137 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200138 node_name: {{ HOSTNAME_CFG01 }}
139 retry: {count: 1, delay: 5}
140 skip_fail: false
141
142
143- description: Install heat service
144 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
145 -C 'I@heat:server' state.sls heat -b 1
146 node_name: {{ HOSTNAME_CFG01 }}
147 retry: {count: 1, delay: 5}
148 skip_fail: false
149
150- description: Check heat service
151 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
152 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
153 node_name: {{ HOSTNAME_CFG01 }}
154 retry: {count: 5, delay: 10}
155 skip_fail: false
156
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +0200157# Install Telemetry services (mdb nodes)
158- description: Install redis service
159 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:cluster:role:master' state.sls redis &&
160 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:server' state.sls redis
161 node_name: {{ HOSTNAME_CFG01 }}
162 retry: {count: 1, delay: 5}
163 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200164
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +0200165- description: Install gnocchi server
166 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server and *01*' state.sls gnocchi.server &&
167 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server' state.sls gnocchi.server
168 node_name: {{ HOSTNAME_CFG01 }}
169 retry: {count: 1, delay: 5}
170 skip_fail: false
171
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +0200172- description: Install panko server
173 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server and *01*' state.sls panko &&
174 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server' state.sls panko
175 node_name: {{ HOSTNAME_CFG01 }}
176 retry: {count: 1, delay: 5}
177 skip_fail: false
178
Tatyana Leontovich51644ec2018-03-22 13:13:31 +0200179- description: Install ceilometer server on first node
180 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server and *01*' state.sls ceilometer
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +0200181 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovich51644ec2018-03-22 13:13:31 +0200182 retry: {count: 2, delay: 5}
183 skip_fail: false
184
185- description: Install ceilometer server on other nodes
186 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server' state.sls ceilometer
187 node_name: {{ HOSTNAME_CFG01 }}
188 retry: {count: 2, delay: 5}
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +0200189 skip_fail: false
190
191- description: Install aodh server
192 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server and *01*' state.sls aodh &&
193 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server' state.sls aodh
194 node_name: {{ HOSTNAME_CFG01 }}
195 retry: {count: 1, delay: 5}
196 skip_fail: false
197
198# Install OpenStack dashboard and proxy services
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200199- description: Deploy horizon dashboard
200 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
201 -C 'I@horizon:server' state.sls horizon
202 node_name: {{ HOSTNAME_CFG01 }}
203 retry: {count: 1, delay: 5}
204 skip_fail: true
205
206- description: Deploy nginx proxy
207 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
208 -C 'I@nginx:server' state.sls nginx
209 node_name: {{ HOSTNAME_CFG01 }}
210 retry: {count: 1, delay: 5}
211 skip_fail: true
212
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200213# Install compute node
214
215- description: Apply formulas for compute node
216 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
217 node_name: {{ HOSTNAME_CFG01 }}
218 retry: {count: 1, delay: 5}
219 skip_fail: true
220
221- description: Re-apply(as in doc) formulas for compute node
222 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
223 node_name: {{ HOSTNAME_CFG01 }}
224 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200225 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200226
227- description: Check IP on computes
228 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
229 'ip a'
230 node_name: {{ HOSTNAME_CFG01 }}
231 retry: {count: 10, delay: 30}
232 skip_fail: false
233
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200234- description: Create net04_external
235 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
236 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
237 node_name: {{ HOSTNAME_CFG01 }}
238 retry: {count: 1, delay: 30}
239 skip_fail: false
240
241- description: Create subnet_external
242 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
243 '. /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'
244 node_name: {{ HOSTNAME_CFG01 }}
245 retry: {count: 1, delay: 30}
246 skip_fail: false
247
248- description: Create net04
249 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
250 '. /root/keystonercv3; neutron net-create net04'
251 node_name: {{ HOSTNAME_CFG01 }}
252 retry: {count: 1, delay: 30}
253 skip_fail: false
254
255- description: Create subnet_net04
256 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovich7305c412018-04-27 00:26:27 +0300257 '. /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 }}.180'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200258 node_name: {{ HOSTNAME_CFG01 }}
259 retry: {count: 1, delay: 30}
260 skip_fail: false
261
262- description: Create router
263 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
264 '. /root/keystonercv3; neutron router-create net04_router01'
265 node_name: {{ HOSTNAME_CFG01 }}
266 retry: {count: 1, delay: 30}
267 skip_fail: false
268
269- description: Set geteway
270 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
271 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
272 node_name: {{ HOSTNAME_CFG01 }}
273 retry: {count: 1, delay: 30}
274 skip_fail: false
275
276- description: Add interface
277 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
278 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
279 node_name: {{ HOSTNAME_CFG01 }}
280 retry: {count: 1, delay: 30}
281 skip_fail: false
282
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200283- description: sync time
284 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
285 'service ntp stop; ntpd -gq; service ntp start'
286 node_name: {{ HOSTNAME_CFG01 }}
287 retry: {count: 1, delay: 30}
288 skip_fail: false
289
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200290- description: Install docker.io on gtw
291 cmd: salt-call cmd.run 'apt-get install docker.io -y'
292 node_name: {{ HOSTNAME_GTW01 }}
293 retry: {count: 1, delay: 30}
294 skip_fail: false
295
Tatyana Leontovichd6bcbc92018-03-23 15:02:28 +0200296- description: Enable forward policy
297 cmd: iptables --policy FORWARD ACCEPT
298 node_name: {{ HOSTNAME_GTW01 }}
299 retry: {count: 1, delay: 30}
300 skip_fail: false
301
sgudzbe155c22018-03-22 13:12:13 +0200302- description: Install manila-api on first node
303 cmd: |
304 salt -C 'I@manila:api and *01*' state.sls manila.api;
305 node_name: {{ HOSTNAME_CFG01 }}
306 retry: {count: 1, delay: 5}
307 skip_fail: false
308
309- description: Install manila-api on other nodes
310 cmd: |
311 salt -C 'I@manila:api and not *01*' state.sls manila.api;
312 node_name: {{ HOSTNAME_CFG01 }}
313 retry: {count: 1, delay: 5}
314 skip_fail: false
315
316- description: Install manila-scheduler
317 cmd: |
318 salt -C 'I@manila:scheduler' state.sls manila.scheduler;
319 node_name: {{ HOSTNAME_CFG01 }}
320 retry: {count: 1, delay: 5}
321 skip_fail: false
322
323- description: Install manila-share
324 cmd: |
325 salt -C 'I@manila:share' state.sls manila.share;
326 node_name: {{ HOSTNAME_CFG01 }}
327 retry: {count: 1, delay: 5}
328 skip_fail: false
329
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300330- description: WR https://mirantis.jira.com/browse/PROD-19012
331 cmd: |
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300332 salt 'ctl*' cmd.run 'systemctl restart apache2'
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300333 node_name: {{ HOSTNAME_CFG01 }}
334 retry: {count: 1, delay: 5}
335 skip_fail: false
336
sgudzbe155c22018-03-22 13:12:13 +0200337- description: Check manila-services
338 cmd: |
339 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list'
340 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300341 retry: {count: 3, delay: 15}
sgudzbe155c22018-03-22 13:12:13 +0200342 skip_fail: false
343
344- description: Create manila type
345 cmd: |
sgudz1d658402018-04-06 11:59:48 +0300346 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'
sgudzbe155c22018-03-22 13:12:13 +0200347 node_name: {{ HOSTNAME_CFG01 }}
348 retry: {count: 1, delay: 5}
349 skip_fail: false
350
351- description: Create CIFS and NFS share and check it status
352 cmd: |
353 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default';
354 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default';
355 sleep 5;
356 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list';
357 node_name: {{ HOSTNAME_CFG01 }}
358 retry: {count: 1, delay: 5}
359 skip_fail: false
sgudz09e9aa92018-04-12 12:31:53 +0300360
Tatyana Leontovich4f613672018-06-12 21:41:19 +0300361{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
362{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}