blob: 89fd596b1a2f2ad16103dab3d24162886d882227 [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
Tatyana Leontovich47dbd3a2017-06-22 17:36:53 +03002{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %}
Tatyana Leontovichac38bac2017-07-17 14:05:33 +03005{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
Tatyana Leontovich6238ba52017-06-22 19:31:56 +03006{% from 'virtual-mcp-ocata-ovs/salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'virtual-mcp-ocata-ovs/salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Tatyana Leontovichf51eb2e2017-07-25 17:39:27 +03008{% set PATTERN = os_env('PATTERN', 'smoke') %}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +03009
10# Install OpenStack control services
11
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030012- 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)
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030020 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 }}
Tatyana Leontovichd4f1fd32017-04-21 13:31:44 +030023 retry: {count: 2, delay: 15}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030024 skip_fail: false
25
Tatyana Leontovichfa7ae4d2017-04-25 13:46:14 +030026- 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
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030038- 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
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030052- 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 }}
56 retry: {count: 1, delay: 5}
57 skip_fail: false
58
59- description: Check keystone service-list
60 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb8b02d82017-04-21 14:07:33 +030061 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack service list'
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030062 node_name: {{ HOSTNAME_CFG01 }}
63 retry: {count: 1, delay: 5}
64 skip_fail: false
65
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030066- 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 }}
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030078 retry: {count: 2, delay: 5}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030079 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 service-list'
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 1, 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
96- description: Check cinder list
97 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
98 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
99 node_name: {{ HOSTNAME_CFG01 }}
100 retry: {count: 1, delay: 5}
101 skip_fail: false
102
103
104- description: Install neutron service
105 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
106 -C 'I@neutron:server' state.sls neutron -b 1
107 node_name: {{ HOSTNAME_CFG01 }}
108 retry: {count: 1, delay: 5}
109 skip_fail: false
110
111- description: Install neutron on gtw node
112 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
113 -C 'I@neutron:gateway' state.sls neutron
114 node_name: {{ HOSTNAME_CFG01 }}
115 retry: {count: 1, delay: 5}
116 skip_fail: false
117
Tatyana Leontovich85e822a2017-06-15 11:52:01 +0300118# isntall designate
119- description: Install bind
120 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovich033aac02017-06-15 15:01:21 +0300121 -C 'I@bind:server' state.sls bind
Tatyana Leontovich85e822a2017-06-15 11:52:01 +0300122 node_name: {{ HOSTNAME_CFG01 }}
123 retry: {count: 1, delay: 5}
124 skip_fail: false
125
126- description: Install designate
127 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovich033aac02017-06-15 15:01:21 +0300128 -C 'I@designate:server' state.sls designate -b 1
Tatyana Leontovich85e822a2017-06-15 11:52:01 +0300129 node_name: {{ HOSTNAME_CFG01 }}
130 retry: {count: 5, delay: 10}
131 skip_fail: false
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300132
133- description: Check neutron agent-list
134 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
135 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
136 node_name: {{ HOSTNAME_CFG01 }}
137 retry: {count: 1, delay: 5}
138 skip_fail: false
139
140
141- description: Install heat service
142 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
143 -C 'I@heat:server' state.sls heat -b 1
144 node_name: {{ HOSTNAME_CFG01 }}
145 retry: {count: 1, delay: 5}
146 skip_fail: false
147
148- description: Check heat service
149 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300150 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack orchestration resource type list'
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300151 node_name: {{ HOSTNAME_CFG01 }}
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300152 retry: {count: 5, delay: 10}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300153 skip_fail: false
154
155
156- description: Deploy horizon dashboard
157 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
158 -C 'I@horizon:server' state.sls horizon
159 node_name: {{ HOSTNAME_CFG01 }}
160 retry: {count: 1, delay: 5}
161 skip_fail: true
162
163- description: Deploy nginx proxy
164 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
165 -C 'I@nginx:server' state.sls nginx
166 node_name: {{ HOSTNAME_CFG01 }}
167 retry: {count: 1, delay: 5}
168 skip_fail: true
169
170
171# Install compute node
172
173- description: Apply formulas for compute node
174 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
175 node_name: {{ HOSTNAME_CFG01 }}
176 retry: {count: 1, delay: 5}
177 skip_fail: true
178
179- description: Re-apply(as in doc) formulas for compute node
180 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
181 node_name: {{ HOSTNAME_CFG01 }}
182 retry: {count: 1, delay: 5}
183 skip_fail: true
184
185- description: Check IP on computes
186 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
187 'ip a'
188 node_name: {{ HOSTNAME_CFG01 }}
189 retry: {count: 10, delay: 30}
190 skip_fail: false
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300191
192
193 # Upload cirros image
194
195- description: Upload cirros image on ctl01
196 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
197 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
198 node_name: {{ HOSTNAME_CFG01 }}
199 retry: {count: 2, delay: 30}
200 skip_fail: false
201
202- description: Register image in glance
203 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
204 '. /root/keystonercv3; glance image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
205 node_name: {{ HOSTNAME_CFG01 }}
206 retry: {count: 1, delay: 30}
207 skip_fail: false
208
209- description: Create net04_external
210 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovich674abf82017-07-20 15:44:15 +0300211 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300212 node_name: {{ HOSTNAME_CFG01 }}
213 retry: {count: 1, delay: 30}
214 skip_fail: false
215
216- description: Create subnet_external
217 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
218 '. /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'
219 node_name: {{ HOSTNAME_CFG01 }}
220 retry: {count: 1, delay: 30}
221 skip_fail: false
222
223- description: Create net04
224 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
225 '. /root/keystonercv3; neutron net-create net04'
226 node_name: {{ HOSTNAME_CFG01 }}
227 retry: {count: 1, delay: 30}
228 skip_fail: false
229
230- description: Create subnet_net04
231 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
232 '. /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'
233 node_name: {{ HOSTNAME_CFG01 }}
234 retry: {count: 1, delay: 30}
235 skip_fail: false
236
237- description: Create router
238 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
239 '. /root/keystonercv3; neutron router-create net04_router01'
240 node_name: {{ HOSTNAME_CFG01 }}
241 retry: {count: 1, delay: 30}
242 skip_fail: false
243
244- description: Set geteway
245 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
246 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
247 node_name: {{ HOSTNAME_CFG01 }}
248 retry: {count: 1, delay: 30}
249 skip_fail: false
250
251- description: Add interface
252 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
253 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
254 node_name: {{ HOSTNAME_CFG01 }}
255 retry: {count: 1, delay: 30}
256 skip_fail: false
257
258- description: Allow all tcp
259 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
260 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
261 node_name: {{ HOSTNAME_CFG01 }}
262 retry: {count: 1, delay: 30}
263 skip_fail: false
264
265- description: Allow all icmp
266 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
267 '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
268 node_name: {{ HOSTNAME_CFG01 }}
269 retry: {count: 1, delay: 30}
270 skip_fail: false
271
Tatyana Leontovich07bc6ed2017-07-25 13:26:48 +0300272- description: sync time
273 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
274 'service ntp stop; ntpd -gq; service ntp start'
275 node_name: {{ HOSTNAME_CFG01 }}
276 retry: {count: 1, delay: 30}
277 skip_fail: false
278
279- description: Temp workaround of PROD-13167
280 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run
281 'apt-get install python-pymysql -y'
282 node_name: {{ HOSTNAME_CFG01 }}
283 retry: {count: 1, delay: 30}
284 skip_fail: false
285
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300286# Configure cinder-volume salt-call
287- description: Set disks 01
288 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
Tatyana Leontovich135d8152017-06-27 16:10:42 +0300289 node_name: {{ HOSTNAME_CTL01 }}
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300290 retry: {count: 1, delay: 30}
291 skip_fail: false
292
293- description: Set disks 02
294 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
295 node_name: {{ HOSTNAME_CTL02 }}
296 retry: {count: 1, delay: 30}
297 skip_fail: false
298
299- description: Set disks 03
300 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
301 node_name: {{ HOSTNAME_CTL03 }}
302 retry: {count: 1, delay: 30}
303 skip_fail: false
304
305- description: Create partitions 01
306 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
307 node_name: {{ HOSTNAME_CTL01 }}
308 retry: {count: 1, delay: 30}
309 skip_fail: false
310
311- description: Create partitions 02
312 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
313 node_name: {{ HOSTNAME_CTL01 }}
314 retry: {count: 1, delay: 30}
315 skip_fail: false
316
317- description: Create partitions 03
318 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
319 node_name: {{ HOSTNAME_CTL01 }}
320 retry: {count: 1, delay: 30}
Tatyana Leontovichac38bac2017-07-17 14:05:33 +0300321 skip_fail: false
322
323- description: create volume_group
324 cmd: salt "ctl*" cmd.run 'vgcreate cinder-volumes /dev/vdb1'
325 node_name: {{ HOSTNAME_CFG01 }}
326 retry: {count: 1, delay: 30}
327 skip_fail: false
328
329- description: Install cinder-volume
330 cmd: salt 'ctl*' cmd.run 'apt-get install cinder-volume -y'
331 node_name: {{ HOSTNAME_CFG01 }}
332 retry: {count: 1, delay: 30}
333 skip_fail: false
334
335- description: Install crudini
336 cmd: salt "ctl*" cmd.run 'apt-get install crudini -y'
337 node_name: {{ HOSTNAME_CFG01 }}
338 retry: {count: 1, delay: 30}
339 skip_fail: false
340
341- description: Temporary WR set enabled backends value 01
342 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
343 node_name: {{ HOSTNAME_CTL01 }}
344 retry: {count: 1, delay: 30}
345 skip_fail: false
346
347- description: Temporary WR set enabled backends value 02
348 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
349 node_name: {{ HOSTNAME_CTL02 }}
350 retry: {count: 1, delay: 30}
351 skip_fail: false
352
353- description: Temporary WR set enabled backends value 03
354 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
355 node_name: {{ HOSTNAME_CTL03 }}
356 retry: {count: 1, delay: 30}
357 skip_fail: false
358
359- description: Install docker.io on gtw
360 cmd: salt-call cmd.run 'apt-get install docker.io -y'
361 node_name: {{ HOSTNAME_GTW01 }}
362 retry: {count: 1, delay: 30}
363 skip_fail: false
364
365- description: create rc file on cfg
366 cmd: scp ctl01:/root/keystonercv3 /root
367 node_name: {{ HOSTNAME_CFG01 }}
368 retry: {count: 1, delay: 30}
369 skip_fail: false
370
371- description: Copy rc file
372 cmd: scp /root/keystonercv3 gtw01:/root
373 node_name: {{ HOSTNAME_CFG01 }}
374 retry: {count: 1, delay: 30}
375 skip_fail: false
376
377- description: Run tests
Tatyana Leontovich07bc6ed2017-07-25 13:26:48 +0300378 cmd: |
Tatyana Leontovichf51eb2e2017-07-25 17:39:27 +0300379 pattern={{ PATTERN }};
Tatyana Leontovich07bc6ed2017-07-25 13:26:48 +0300380 if [[ -n "$pattern" ]]; then
381 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 -e CUSTOM="--pattern $pattern" -v /root/:/home/rally docker-sandbox.sandbox.mirantis.net/rally-tempest/rally-tempest:with_designate >> image.output'
382 else
383 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'
384 fi
385 node_name: {{ HOSTNAME_CFG01 }}
386 retry: {count: 1, delay: 5}
Tatyana Leontovichac38bac2017-07-17 14:05:33 +0300387 skip_fail: false
Dennis Dmitriev2dfb8ef2017-07-21 20:19:38 +0300388
389- description: Download results
390 download:
391 remote_path: /root
392 remote_filename: "report_*.xml"
393 local_path: {{ os_env('PWD') }}
394 node_name: {{ HOSTNAME_GTW01 }}
395 skip_fail: false