blob: a5c23832c85e5c795bae05efff08cbd4fc4af24c [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp11-dvr/underlay.yaml' import HOSTNAME_CFG01 with context %}
Tatyana Leontovich397a8ba2017-07-25 02:34:46 +03002{% from 'virtual-mcp11-dvr/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp11-dvr/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp11-dvr/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp11-dvr/underlay.yaml' import HOSTNAME_GTW01 with context %}
Sergii Golovatiuk50f91892017-08-04 18:11:06 +02006{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +03008
9# Install OpenStack control services
10
Dennis Dmitriev45396db2017-04-26 15:29:47 +030011- description: Install glance on all controllers
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@glance:server' state.sls glance -b 1
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 5}
16 skip_fail: false
17
18- description: Install keystone service (note that different fernet keys are created on different nodes)
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030019 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@keystone:server' state.sls keystone.server -b 1
21 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovichd4f1fd32017-04-21 13:31:44 +030022 retry: {count: 2, delay: 15}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030023 skip_fail: false
24
Tatyana Leontovich966af4d2017-04-24 14:08:12 +030025- description: Restart apache due to PROD-10477
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
27 node_name: {{ HOSTNAME_CFG01 }}
28 retry: {count: 1, delay: 15}
29 skip_fail: false
30
31- description: Check apache status to PROD-10477
32 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
33 node_name: {{ HOSTNAME_CFG01 }}
34 retry: {count: 1, delay: 15}
35 skip_fail: false
36
Dennis Dmitriev45396db2017-04-26 15:29:47 +030037- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
38 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
39 -C 'I@glance:server' state.sls glusterfs.client
40 node_name: {{ HOSTNAME_CFG01 }}
41 retry: {count: 1, delay: 5}
42 skip_fail: false
43
44- description: Update fernet keys for keystone server on the mounted glusterfs volume
45 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
46 -C 'I@keystone:server' state.sls keystone.server -b 1
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 5}
49 skip_fail: false
50
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030051- description: Populate keystone services/tenants/admins
52 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
53 -C 'I@keystone:client' state.sls keystone.client
54 node_name: {{ HOSTNAME_CFG01 }}
55 retry: {count: 1, delay: 5}
56 skip_fail: false
57
58- description: Check keystone service-list
59 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb8b02d82017-04-21 14:07:33 +030060 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack service list'
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030061 node_name: {{ HOSTNAME_CFG01 }}
62 retry: {count: 1, delay: 5}
63 skip_fail: false
64
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030065- description: Check glance image-list
66 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
67 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
68 node_name: {{ HOSTNAME_CFG01 }}
69 retry: {count: 1, delay: 5}
70 skip_fail: false
71
72
73- description: Install nova on all controllers
74 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
75 -C 'I@nova:controller' state.sls nova -b 1
76 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030077 retry: {count: 2, delay: 5}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030078 skip_fail: false
79
80- description: Check nova service-list
81 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
82 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list'
83 node_name: {{ HOSTNAME_CFG01 }}
84 retry: {count: 1, delay: 5}
85 skip_fail: false
86
87
88- description: Install cinder
89 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
90 -C 'I@cinder:controller' state.sls cinder -b 1
91 node_name: {{ HOSTNAME_CFG01 }}
92 retry: {count: 1, delay: 5}
93 skip_fail: false
94
95- description: Check cinder list
96 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
97 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
98 node_name: {{ HOSTNAME_CFG01 }}
99 retry: {count: 1, delay: 5}
100 skip_fail: false
101
102
103- description: Install neutron service
104 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
105 -C 'I@neutron:server' state.sls neutron -b 1
106 node_name: {{ HOSTNAME_CFG01 }}
107 retry: {count: 1, delay: 5}
108 skip_fail: false
109
110- description: Install neutron on gtw node
111 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
112 -C 'I@neutron:gateway' state.sls neutron
113 node_name: {{ HOSTNAME_CFG01 }}
114 retry: {count: 1, delay: 5}
115 skip_fail: false
116
117
118- description: Check neutron agent-list
119 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
120 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
121 node_name: {{ HOSTNAME_CFG01 }}
122 retry: {count: 1, delay: 5}
123 skip_fail: false
124
125
126- description: Install heat service
127 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
128 -C 'I@heat:server' state.sls heat -b 1
129 node_name: {{ HOSTNAME_CFG01 }}
130 retry: {count: 1, delay: 5}
131 skip_fail: false
132
133- description: Check heat service
134 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300135 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack orchestration resource type list'
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +0300136 node_name: {{ HOSTNAME_CFG01 }}
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300137 retry: {count: 5, delay: 10}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +0300138 skip_fail: false
139
140
141- description: Deploy horizon dashboard
142 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
143 -C 'I@horizon:server' state.sls horizon
144 node_name: {{ HOSTNAME_CFG01 }}
145 retry: {count: 1, delay: 5}
146 skip_fail: true
147
148- description: Deploy nginx proxy
149 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
150 -C 'I@nginx:server' state.sls nginx
151 node_name: {{ HOSTNAME_CFG01 }}
152 retry: {count: 1, delay: 5}
153 skip_fail: true
154
155
156# Install compute node
157
158- description: Apply formulas for compute node
159 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
160 node_name: {{ HOSTNAME_CFG01 }}
161 retry: {count: 1, delay: 5}
162 skip_fail: true
163
164- description: Re-apply(as in doc) 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: Check IP on computes
171 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
172 'ip a'
173 node_name: {{ HOSTNAME_CFG01 }}
174 retry: {count: 10, delay: 30}
175 skip_fail: false
Tatyana Leontovich397a8ba2017-07-25 02:34:46 +0300176
177
178 # Upload cirros image
179
180- description: Upload cirros image on ctl01
181 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
182 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
183 node_name: {{ HOSTNAME_CFG01 }}
184 retry: {count: 2, delay: 30}
185 skip_fail: false
186
187- description: Register image in glance
188 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
189 '. /root/keystonercv3; glance image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
190 node_name: {{ HOSTNAME_CFG01 }}
191 retry: {count: 1, delay: 30}
192 skip_fail: false
193
194- description: Create net04_external
195 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
196 '. /root/keystonercv3; neutron net-create net04_ext --shared --router:external True --provider:physical_network physnet1 --provider:network_type flat'
197 node_name: {{ HOSTNAME_CFG01 }}
198 retry: {count: 1, delay: 30}
199 skip_fail: false
200
201- description: Create subnet_external
202 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
203 '. /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'
204 node_name: {{ HOSTNAME_CFG01 }}
205 retry: {count: 1, delay: 30}
206 skip_fail: false
207
208- description: Create net04
209 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
210 '. /root/keystonercv3; neutron net-create net04'
211 node_name: {{ HOSTNAME_CFG01 }}
212 retry: {count: 1, delay: 30}
213 skip_fail: false
214
215- description: Create subnet_net04
216 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
217 '. /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'
218 node_name: {{ HOSTNAME_CFG01 }}
219 retry: {count: 1, delay: 30}
220 skip_fail: false
221
222- description: Create router
223 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
224 '. /root/keystonercv3; neutron router-create net04_router01'
225 node_name: {{ HOSTNAME_CFG01 }}
226 retry: {count: 1, delay: 30}
227 skip_fail: false
228
229- description: Set geteway
230 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
231 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
232 node_name: {{ HOSTNAME_CFG01 }}
233 retry: {count: 1, delay: 30}
234 skip_fail: false
235
236- description: Add interface
237 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
238 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
239 node_name: {{ HOSTNAME_CFG01 }}
240 retry: {count: 1, delay: 30}
241 skip_fail: false
242
243- description: Allow all tcp
244 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
245 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
246 node_name: {{ HOSTNAME_CFG01 }}
247 retry: {count: 1, delay: 30}
248 skip_fail: false
249
250- description: Allow all icmp
251 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
252 '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
253 node_name: {{ HOSTNAME_CFG01 }}
254 retry: {count: 1, delay: 30}
255 skip_fail: false
256
257- description: sync time
258 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
259 'service ntp stop; ntpd -gq; service ntp start'
260 node_name: {{ HOSTNAME_CFG01 }}
261 retry: {count: 1, delay: 30}
262 skip_fail: false
263
264- description: Temp workaround of PROD-13167
265 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run
266 'apt-get install python-pymysql -y'
267 node_name: {{ HOSTNAME_CFG01 }}
268 retry: {count: 1, delay: 30}
269 skip_fail: false
270
271# Configure cinder-volume salt-call PROD-13167
272- description: Set disks 01
273 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
274 node_name: {{ HOSTNAME_CTL01 }}
275 retry: {count: 1, delay: 30}
276 skip_fail: false
277
278- description: Set disks 02
279 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
280 node_name: {{ HOSTNAME_CTL02 }}
281 retry: {count: 1, delay: 30}
282 skip_fail: false
283
284- description: Set disks 03
285 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
286 node_name: {{ HOSTNAME_CTL03 }}
287 retry: {count: 1, delay: 30}
288 skip_fail: false
289
290- description: Create partitions 01
291 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
292 node_name: {{ HOSTNAME_CTL01 }}
293 retry: {count: 1, delay: 30}
294 skip_fail: false
295
296- description: Create partitions 02
297 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
298 node_name: {{ HOSTNAME_CTL01 }}
299 retry: {count: 1, delay: 30}
300 skip_fail: false
301
302- description: Create partitions 03
303 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
304 node_name: {{ HOSTNAME_CTL01 }}
305 retry: {count: 1, delay: 30}
306 skip_fail: false
307
308- description: create volume_group
309 cmd: salt "ctl*" cmd.run 'vgcreate cinder-volumes /dev/vdb1'
310 node_name: {{ HOSTNAME_CFG01 }}
311 retry: {count: 1, delay: 30}
312 skip_fail: false
313
314- description: Install cinder-volume
315 cmd: salt 'ctl*' cmd.run 'apt-get install cinder-volume -y'
316 node_name: {{ HOSTNAME_CFG01 }}
317 retry: {count: 1, delay: 30}
318 skip_fail: false
319
320- description: Install crudini
321 cmd: salt "ctl*" cmd.run 'apt-get install crudini -y'
322 node_name: {{ HOSTNAME_CFG01 }}
323 retry: {count: 1, delay: 30}
324 skip_fail: false
325
326- description: Temporary WR set enabled backends value 01
327 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
328 node_name: {{ HOSTNAME_CTL01 }}
329 retry: {count: 1, delay: 30}
330 skip_fail: false
331
332- description: Temporary WR set enabled backends value 02
333 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
334 node_name: {{ HOSTNAME_CTL02 }}
335 retry: {count: 1, delay: 30}
336 skip_fail: false
337
338- description: Temporary WR set enabled backends value 03
339 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
340 node_name: {{ HOSTNAME_CTL03 }}
341 retry: {count: 1, delay: 30}
342 skip_fail: false
343
344- description: Install docker.io on gtw
345 cmd: salt-call cmd.run 'apt-get install docker.io -y'
346 node_name: {{ HOSTNAME_GTW01 }}
347 retry: {count: 1, delay: 30}
348 skip_fail: false
349
350- description: create rc file on cfg
351 cmd: scp ctl01:/root/keystonercv3 /root
352 node_name: {{ HOSTNAME_CFG01 }}
353 retry: {count: 1, delay: 30}
354 skip_fail: false
355
356- description: Copy rc file
357 cmd: scp /root/keystonercv3 gtw01:/root
358 node_name: {{ HOSTNAME_CFG01 }}
359 retry: {count: 1, delay: 30}
360 skip_fail: false
361
362- description: Run tests
363 cmd: salt-call cmd.run "docker run --rm --net=host -e TEMPEST_CONF=lvm_mcp.conf -e SKIP_LIST=mcp_skip.list -e SOURCE_FILE=keystonercv3 -v /root/:/home/rally docker-sandbox.sandbox.mirantis.net/rally-tempest/rally-tempest:with_designate >> image.output"
364 node_name: {{ HOSTNAME_GTW01 }}
365 retry: {count: 1, delay: 30}
366 skip_fail: false
367
Tatyana Leontovich902f1b42017-07-27 17:00:19 +0300368- description: Download xml results
Tatyana Leontovich397a8ba2017-07-25 02:34:46 +0300369 download:
370 remote_path: /root
371 remote_filename: "report_*.xml"
372 local_path: {{ os_env('PWD') }}
373 node_name: {{ HOSTNAME_GTW01 }}
Tatyana Leontovich902f1b42017-07-27 17:00:19 +0300374 skip_fail: true
375
376- description: Download html results
377 download:
378 remote_path: /root
379 remote_filename: "report_*.html"
380 local_path: {{ os_env('PWD') }}
381 node_name: {{ HOSTNAME_GTW01 }}
382 skip_fail: true