blob: a125b874d22d0addfe09fa2ba09647e3890be889 [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CFG01 with context %}
Tatyana Leontovich6238ba52017-06-22 19:31:56 +03002{% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CTL03 with context %}
Tatyana Leontovich7c97e802017-07-19 17:08:39 +03005{% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +03006{% from 'virtual-mcp-ocata-dvr/salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'virtual-mcp-ocata-dvr/salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +03008
9# Install OpenStack control services
10
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +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 Leontovich38be41b2017-04-12 14:45:23 +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 Leontovich38be41b2017-04-12 14:45:23 +030023 skip_fail: false
24
Tatyana Leontovichfa7ae4d2017-04-25 13:46:14 +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 Dmitriev4ab889c2017-04-27 14:11:04 +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 Leontovich38be41b2017-04-12 14:45:23 +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 Leontovich38be41b2017-04-12 14:45:23 +030061 node_name: {{ HOSTNAME_CFG01 }}
62 retry: {count: 1, delay: 5}
63 skip_fail: false
64
Tatyana Leontovich38be41b2017-04-12 14:45:23 +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 Leontovich38be41b2017-04-12 14:45:23 +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
Tatyana Leontovichc33be1f2017-07-19 17:38:30 +0300117# isntall designate
118- description: Install powerdns
119 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
120 -C 'ctl*' state.sls powerdns
121 node_name: {{ HOSTNAME_CFG01 }}
122 retry: {count: 1, delay: 5}
123 skip_fail: false
124
125- description: Install designate
126 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
127 -C 'I@designate:server' state.sls designate -b 1
128 node_name: {{ HOSTNAME_CFG01 }}
129 retry: {count: 5, delay: 10}
130 skip_fail: false
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300131
132- description: Check neutron agent-list
133 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
134 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
135 node_name: {{ HOSTNAME_CFG01 }}
136 retry: {count: 1, delay: 5}
137 skip_fail: false
138
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300139- description: Install heat service
140 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
141 -C 'I@heat:server' state.sls heat -b 1
142 node_name: {{ HOSTNAME_CFG01 }}
143 retry: {count: 1, delay: 5}
144 skip_fail: false
145
146- description: Check heat service
147 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300148 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack orchestration resource type list'
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300149 node_name: {{ HOSTNAME_CFG01 }}
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300150 retry: {count: 5, delay: 10}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300151 skip_fail: false
152
153
154- description: Deploy horizon dashboard
155 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
156 -C 'I@horizon:server' state.sls horizon
157 node_name: {{ HOSTNAME_CFG01 }}
158 retry: {count: 1, delay: 5}
159 skip_fail: true
160
161- description: Deploy nginx proxy
162 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
163 -C 'I@nginx:server' state.sls nginx
164 node_name: {{ HOSTNAME_CFG01 }}
165 retry: {count: 1, delay: 5}
166 skip_fail: true
167
168
169# Install compute node
170
171- description: Apply formulas for compute node
172 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
173 node_name: {{ HOSTNAME_CFG01 }}
174 retry: {count: 1, delay: 5}
175 skip_fail: true
176
177- description: Re-apply(as in doc) formulas for compute node
178 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
179 node_name: {{ HOSTNAME_CFG01 }}
180 retry: {count: 1, delay: 5}
181 skip_fail: true
182
183- description: Check IP on computes
184 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
185 'ip a'
186 node_name: {{ HOSTNAME_CFG01 }}
187 retry: {count: 10, delay: 30}
188 skip_fail: false
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300189
190
191 # Upload cirros image
192
193- description: Upload cirros image on ctl01
194 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
195 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
196 node_name: {{ HOSTNAME_CFG01 }}
197 retry: {count: 2, delay: 30}
198 skip_fail: false
199
200- description: Register image in glance
201 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
202 '. /root/keystonercv3; glance image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
203 node_name: {{ HOSTNAME_CFG01 }}
204 retry: {count: 1, delay: 30}
205 skip_fail: false
206
207- description: Create net04_external
208 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovich674abf82017-07-20 15:44:15 +0300209 '. /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 +0300210 node_name: {{ HOSTNAME_CFG01 }}
211 retry: {count: 1, delay: 30}
212 skip_fail: false
213
214- description: Create subnet_external
215 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
216 '. /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'
217 node_name: {{ HOSTNAME_CFG01 }}
218 retry: {count: 1, delay: 30}
219 skip_fail: false
220
221- description: Create net04
222 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
223 '. /root/keystonercv3; neutron net-create net04'
224 node_name: {{ HOSTNAME_CFG01 }}
225 retry: {count: 1, delay: 30}
226 skip_fail: false
227
228- description: Create subnet_net04
229 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
230 '. /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'
231 node_name: {{ HOSTNAME_CFG01 }}
232 retry: {count: 1, delay: 30}
233 skip_fail: false
234
235- description: Create router
236 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
237 '. /root/keystonercv3; neutron router-create net04_router01'
238 node_name: {{ HOSTNAME_CFG01 }}
239 retry: {count: 1, delay: 30}
240 skip_fail: false
241
242- description: Set geteway
243 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
244 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
245 node_name: {{ HOSTNAME_CFG01 }}
246 retry: {count: 1, delay: 30}
247 skip_fail: false
248
249- description: Add interface
250 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
251 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
252 node_name: {{ HOSTNAME_CFG01 }}
253 retry: {count: 1, delay: 30}
254 skip_fail: false
255
256- description: Allow all tcp
257 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
258 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
259 node_name: {{ HOSTNAME_CFG01 }}
260 retry: {count: 1, delay: 30}
261 skip_fail: false
262
263- description: Allow all icmp
264 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
265 '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
266 node_name: {{ HOSTNAME_CFG01 }}
267 retry: {count: 1, delay: 30}
268 skip_fail: false
269
270# Configure cinder-volume salt-call
271- description: Set disks 01
272 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
273 node_name: {{ HOSTNAME_CTL01 }}
274 retry: {count: 1, delay: 30}
275 skip_fail: false
276
277- description: Set disks 02
278 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
279 node_name: {{ HOSTNAME_CTL02 }}
280 retry: {count: 1, delay: 30}
281 skip_fail: false
282
283- description: Set disks 03
284 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
285 node_name: {{ HOSTNAME_CTL03 }}
286 retry: {count: 1, delay: 30}
287 skip_fail: false
288
289- description: Create partitions 01
290 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
291 node_name: {{ HOSTNAME_CTL01 }}
292 retry: {count: 1, delay: 30}
293 skip_fail: false
294
295- description: Create partitions 02
296 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
297 node_name: {{ HOSTNAME_CTL01 }}
298 retry: {count: 1, delay: 30}
299 skip_fail: false
300
301- description: Create partitions 03
302 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
303 node_name: {{ HOSTNAME_CTL01 }}
304 retry: {count: 1, delay: 30}
Tatyana Leontovich7c97e802017-07-19 17:08:39 +0300305 skip_fail: false
306
307- description: create volume_group
308 cmd: salt "ctl*" cmd.run 'vgcreate cinder-volumes /dev/vdb1'
309 node_name: {{ HOSTNAME_CFG01 }}
310 retry: {count: 1, delay: 30}
311 skip_fail: false
312
313- description: Install cinder-volume
314 cmd: salt 'ctl*' cmd.run 'apt-get install cinder-volume -y'
315 node_name: {{ HOSTNAME_CFG01 }}
316 retry: {count: 1, delay: 30}
317 skip_fail: false
318
319- description: Install crudini
320 cmd: salt "ctl*" cmd.run 'apt-get install crudini -y'
321 node_name: {{ HOSTNAME_CFG01 }}
322 retry: {count: 1, delay: 30}
323 skip_fail: false
324
325- description: Temporary WR set enabled backends value 01
326 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
327 node_name: {{ HOSTNAME_CTL01 }}
328 retry: {count: 1, delay: 30}
329 skip_fail: false
330
331- description: Temporary WR set enabled backends value 02
332 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
333 node_name: {{ HOSTNAME_CTL02 }}
334 retry: {count: 1, delay: 30}
335 skip_fail: false
336
337- description: Temporary WR set enabled backends value 03
338 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
339 node_name: {{ HOSTNAME_CTL03 }}
340 retry: {count: 1, delay: 30}
341 skip_fail: false
342
343- description: Install docker.io on gtw
344 cmd: salt-call cmd.run 'apt-get install docker.io -y'
345 node_name: {{ HOSTNAME_GTW01 }}
346 retry: {count: 1, delay: 30}
347 skip_fail: false
348
349- description: create rc file on cfg
350 cmd: scp ctl01:/root/keystonercv3 /root
351 node_name: {{ HOSTNAME_CFG01 }}
352 retry: {count: 1, delay: 30}
353 skip_fail: false
354
355- description: Copy rc file
356 cmd: scp /root/keystonercv3 gtw01:/root
357 node_name: {{ HOSTNAME_CFG01 }}
358 retry: {count: 1, delay: 30}
359 skip_fail: false
360
361- description: Run tests
362 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 -e CUSTOM='--pattern smoke' -v /root/:/home/rally docker-sandbox.sandbox.mirantis.net/rally-tempest/rally-tempest:with_designate >> image.output"
363 node_name: {{ HOSTNAME_GTW01 }}
364 retry: {count: 1, delay: 30}
365 skip_fail: false