blob: 63e5402d99cfd0ebbfa159bb4d0c4f1adcb0cf85 [file] [log] [blame]
Oleksii Butenko7d9671c2017-11-01 17:27:23 +02001{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_GTW01 with context %}
4#{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_GTW02 with context %}
Oleksii Butenko7c48def2017-10-03 12:41:05 +03005{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
6{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Oleksii Butenko9f2cf512017-12-19 14:03:41 +02007{% set PATTERN = os_env('PATTERN', 'false') %}
8{% set RUN_TEMPEST = os_env('RUN_TEMPEST', 'false') %}
Oleksii Butenko7c48def2017-10-03 12:41:05 +03009
10# Install OpenStack control services
11
12- 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)
20 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 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020023 retry: {count: 2, delay: 15}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030024 skip_fail: false
25
26- 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
38- 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
52- 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
61 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
62 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020063 retry: {count: 1, delay: 5}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030064 skip_fail: false
65
66- 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 }}
78 retry: {count: 2, delay: 5}
79 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 --debug service-list'
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 3, 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
Oleksii Butenko9f2cf512017-12-19 14:03:41 +020096- description: Install cinder volume
97 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
98 -C 'I@cinder:volume' state.sls cinder
99 node_name: {{ HOSTNAME_CFG01 }}
100 retry: {count: 1, delay: 5}
101 skip_fail: false
102
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300103- description: Check cinder list
104 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
105 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
106 node_name: {{ HOSTNAME_CFG01 }}
107 retry: {count: 1, delay: 5}
108 skip_fail: false
109
110
111- description: Install neutron service
112 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
113 -C 'I@neutron:server' state.sls neutron -b 1
114 node_name: {{ HOSTNAME_CFG01 }}
115 retry: {count: 1, delay: 5}
116 skip_fail: false
117
118- description: Install neutron on gtw node
119 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
120 -C 'I@neutron:gateway' state.sls neutron
121 node_name: {{ HOSTNAME_CFG01 }}
122 retry: {count: 1, delay: 5}
123 skip_fail: false
124
Oleksii Butenkoff6fdbb2017-12-28 15:24:57 +0200125# Install designate
126- description: Install powerdns
127 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
128 -C 'ctl*' state.sls powerdns
129 node_name: {{ HOSTNAME_CFG01 }}
130 retry: {count: 1, delay: 5}
131 skip_fail: false
132
133- description: Install designate
134 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
135 -C 'I@designate:server' state.sls designate -b 1
136 node_name: {{ HOSTNAME_CFG01 }}
137 retry: {count: 5, delay: 10}
138 skip_fail: false
139
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300140- description: Check neutron agent-list
141 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
142 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
143 node_name: {{ HOSTNAME_CFG01 }}
144 retry: {count: 1, delay: 5}
145 skip_fail: false
146
147- description: Install heat service
148 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
149 -C 'I@heat:server' state.sls heat -b 1
150 node_name: {{ HOSTNAME_CFG01 }}
151 retry: {count: 1, delay: 5}
152 skip_fail: false
153
154- description: Check heat service
155 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
156 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
157 node_name: {{ HOSTNAME_CFG01 }}
158 retry: {count: 5, delay: 10}
159 skip_fail: false
160
161
162- description: Deploy horizon dashboard
163 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
164 -C 'I@horizon:server' state.sls horizon
165 node_name: {{ HOSTNAME_CFG01 }}
166 retry: {count: 1, delay: 5}
167 skip_fail: true
168
169- description: Deploy nginx proxy
170 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
171 -C 'I@nginx:server' state.sls nginx
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 1, delay: 5}
174 skip_fail: true
175
176
177# Install compute node
178
179- description: Apply 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: Re-apply(as in doc) formulas for compute node
186 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
187 node_name: {{ HOSTNAME_CFG01 }}
188 retry: {count: 1, delay: 5}
189 skip_fail: true
190
191- description: Check IP on computes
192 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
193 'ip a'
194 node_name: {{ HOSTNAME_CFG01 }}
195 retry: {count: 10, delay: 30}
196 skip_fail: false
197
198
199 # Upload cirros image
200
201- description: Upload cirros image on ctl01
202 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
203 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
204 node_name: {{ HOSTNAME_CFG01 }}
205 retry: {count: 2, delay: 30}
206 skip_fail: false
207
208- description: Register image in glance
209 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Dmitry Tyzhnenko30f58042017-11-28 17:00:40 +0200210 '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300211 node_name: {{ HOSTNAME_CFG01 }}
212 retry: {count: 1, delay: 30}
213 skip_fail: false
214
215- description: Create net04_external
216 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
217 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
218 node_name: {{ HOSTNAME_CFG01 }}
219 retry: {count: 1, delay: 30}
220 skip_fail: false
221
222- description: Create subnet_external
223 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
224 '. /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'
225 node_name: {{ HOSTNAME_CFG01 }}
226 retry: {count: 1, delay: 30}
227 skip_fail: false
228
229- description: Create net04
230 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
231 '. /root/keystonercv3; neutron net-create net04'
232 node_name: {{ HOSTNAME_CFG01 }}
233 retry: {count: 1, delay: 30}
234 skip_fail: false
235
236- description: Create subnet_net04
237 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
238 '. /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'
239 node_name: {{ HOSTNAME_CFG01 }}
240 retry: {count: 1, delay: 30}
241 skip_fail: false
242
243- description: Create router
244 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
245 '. /root/keystonercv3; neutron router-create net04_router01'
246 node_name: {{ HOSTNAME_CFG01 }}
247 retry: {count: 1, delay: 30}
248 skip_fail: false
249
250- description: Set geteway
251 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
252 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
253 node_name: {{ HOSTNAME_CFG01 }}
254 retry: {count: 1, delay: 30}
255 skip_fail: false
256
257- description: Add interface
258 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
259 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
260 node_name: {{ HOSTNAME_CFG01 }}
261 retry: {count: 1, delay: 30}
262 skip_fail: false
263
264- description: Allow all tcp
265 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
266 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
267 node_name: {{ HOSTNAME_CFG01 }}
268 retry: {count: 1, delay: 30}
269 skip_fail: false
270
Oleksii Butenkoc3bb16b2018-01-23 12:11:42 +0200271#- description: Allow all icmp
272# cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
273# '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
274# node_name: {{ HOSTNAME_CFG01 }}
275# retry: {count: 1, delay: 30}
276# skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300277
Oleksii Butenkoc3bb16b2018-01-23 12:11:42 +0200278#- description: sync time
279# cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
280# 'service ntp stop; ntpd -gq; service ntp start'
281# node_name: {{ HOSTNAME_CFG01 }}
282# retry: {count: 1, delay: 30}
283# skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300284
285- description: Temp workaround of PROD-13167
286 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run
287 'apt-get install python-pymysql -y'
288 node_name: {{ HOSTNAME_CFG01 }}
289 retry: {count: 1, delay: 30}
290 skip_fail: false
291
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300292- description: Install docker.io on gtw
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +0300293 cmd: salt 'gtw01*' cmd.run 'apt-get install docker.io -y'
294 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300295 retry: {count: 1, delay: 30}
296 skip_fail: false
297
298- description: create rc file on cfg
299 cmd: scp ctl01:/root/keystonercv3 /root
300 node_name: {{ HOSTNAME_CFG01 }}
301 retry: {count: 1, delay: 30}
302 skip_fail: false
303
304- description: Copy rc file
305 cmd: scp /root/keystonercv3 gtw01:/root
306 node_name: {{ HOSTNAME_CFG01 }}
307 retry: {count: 1, delay: 30}
308 skip_fail: false
309
310- description: Run tests
311 cmd: |
312 if [[ {{ PATTERN }} == "false" ]]; then
Oleksii Butenkoff6fdbb2017-12-28 15:24:57 +0200313 docker run --rm --net=host -e SOURCE_FILE=/home/rally/keystonercv3 -e SET=full -e CUSTOM="--pattern tempest --detail" -e CONCURRENCY=2 -e TEMPEST_CONF=lvm_mcp.conf -e SKIP_LIST=mcp_skip.list -e DO_CLEANUP_RESOURCES=false -v /root/keystonercv3:/home/rally/keystonercv3 -v /root/rally_reports:/home/rally/rally_reports -v /etc/ssl/certs/:/etc/ssl/certs/ docker-prod-local.artifactory.mirantis.com/mirantis/oscore/rally-tempest else
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300314 else
Oleksii Butenkoff6fdbb2017-12-28 15:24:57 +0200315 docker run --rm --net=host -e SOURCE_FILE=/home/rally/keystonercv3 -e SET=full -e CUSTOM="--pattern {{ PATTERN }} --detail" -e CONCURRENCY=2 -e TEMPEST_CONF=lvm_mcp.conf -e SKIP_LIST=mcp_skip.list -e DO_CLEANUP_RESOURCES=false -v /root/keystonercv3:/home/rally/keystonercv3 -v /root/rally_reports:/home/rally/rally_reports -v /etc/ssl/certs/:/etc/ssl/certs/ docker-prod-local.artifactory.mirantis.com/mirantis/oscore/rally-tempest else
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300316 fi
317 node_name: {{ HOSTNAME_GTW01 }}
318 retry: {count: 1, delay: 5}
319 skip_fail: false
320
321- description: Download xml results
322 download:
323 remote_path: /root
324 remote_filename: "report_*.xml"
325 local_path: {{ os_env('PWD') }}
326 node_name: {{ HOSTNAME_GTW01 }}
327 skip_fail: true
328
329- description: Download html results
330 download:
331 remote_path: /root
332 remote_filename: "report_*.html"
333 local_path: {{ os_env('PWD') }}
334 node_name: {{ HOSTNAME_GTW01 }}
335 skip_fail: true