blob: 804c7f02bffcd8bf0b93c1bcb66e6483f0798d57 [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
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
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300125- description: Install heat service
126 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
127 -C 'I@heat:server' state.sls heat -b 1
128 node_name: {{ HOSTNAME_CFG01 }}
129 retry: {count: 1, delay: 5}
130 skip_fail: false
131
132- description: Check heat service
133 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300134 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack orchestration resource type list'
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300135 node_name: {{ HOSTNAME_CFG01 }}
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300136 retry: {count: 5, delay: 10}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300137 skip_fail: false
138
139
140- description: Deploy horizon dashboard
141 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
142 -C 'I@horizon:server' state.sls horizon
143 node_name: {{ HOSTNAME_CFG01 }}
144 retry: {count: 1, delay: 5}
145 skip_fail: true
146
147- description: Deploy nginx proxy
148 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
149 -C 'I@nginx:server' state.sls nginx
150 node_name: {{ HOSTNAME_CFG01 }}
151 retry: {count: 1, delay: 5}
152 skip_fail: true
153
154
155# Install compute node
156
157- description: Apply formulas for compute node
158 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
159 node_name: {{ HOSTNAME_CFG01 }}
160 retry: {count: 1, delay: 5}
161 skip_fail: true
162
163- description: Re-apply(as in doc) formulas for compute node
164 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
165 node_name: {{ HOSTNAME_CFG01 }}
166 retry: {count: 1, delay: 5}
167 skip_fail: true
168
169- description: Check IP on computes
170 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
171 'ip a'
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 10, delay: 30}
174 skip_fail: false
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300175
176
177 # Upload cirros image
178
179- description: Upload cirros image on ctl01
180 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
181 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
182 node_name: {{ HOSTNAME_CFG01 }}
183 retry: {count: 2, delay: 30}
184 skip_fail: false
185
186- description: Register image in glance
187 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
188 '. /root/keystonercv3; glance image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
189 node_name: {{ HOSTNAME_CFG01 }}
190 retry: {count: 1, delay: 30}
191 skip_fail: false
192
193- description: Create net04_external
194 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
195 '. /root/keystonercv3; neutron net-create net04_ext --shared --router:external True --provider:physical_network physnet1 --provider:network_type flat'
196 node_name: {{ HOSTNAME_CFG01 }}
197 retry: {count: 1, delay: 30}
198 skip_fail: false
199
200- description: Create subnet_external
201 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
202 '. /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'
203 node_name: {{ HOSTNAME_CFG01 }}
204 retry: {count: 1, delay: 30}
205 skip_fail: false
206
207- description: Create net04
208 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
209 '. /root/keystonercv3; neutron net-create net04'
210 node_name: {{ HOSTNAME_CFG01 }}
211 retry: {count: 1, delay: 30}
212 skip_fail: false
213
214- description: Create subnet_net04
215 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
216 '. /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'
217 node_name: {{ HOSTNAME_CFG01 }}
218 retry: {count: 1, delay: 30}
219 skip_fail: false
220
221- description: Create router
222 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
223 '. /root/keystonercv3; neutron router-create net04_router01'
224 node_name: {{ HOSTNAME_CFG01 }}
225 retry: {count: 1, delay: 30}
226 skip_fail: false
227
228- description: Set geteway
229 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
230 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
231 node_name: {{ HOSTNAME_CFG01 }}
232 retry: {count: 1, delay: 30}
233 skip_fail: false
234
235- description: Add interface
236 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
237 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
238 node_name: {{ HOSTNAME_CFG01 }}
239 retry: {count: 1, delay: 30}
240 skip_fail: false
241
242- description: Allow all tcp
243 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
244 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
245 node_name: {{ HOSTNAME_CFG01 }}
246 retry: {count: 1, delay: 30}
247 skip_fail: false
248
249- description: Allow all icmp
250 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
251 '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
252 node_name: {{ HOSTNAME_CFG01 }}
253 retry: {count: 1, delay: 30}
254 skip_fail: false
255
256# Configure cinder-volume salt-call
257- description: Set disks 01
258 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
259 node_name: {{ HOSTNAME_CTL01 }}
260 retry: {count: 1, delay: 30}
261 skip_fail: false
262
263- description: Set disks 02
264 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
265 node_name: {{ HOSTNAME_CTL02 }}
266 retry: {count: 1, delay: 30}
267 skip_fail: false
268
269- description: Set disks 03
270 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
271 node_name: {{ HOSTNAME_CTL03 }}
272 retry: {count: 1, delay: 30}
273 skip_fail: false
274
275- description: Create partitions 01
276 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
277 node_name: {{ HOSTNAME_CTL01 }}
278 retry: {count: 1, delay: 30}
279 skip_fail: false
280
281- description: Create partitions 02
282 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
283 node_name: {{ HOSTNAME_CTL01 }}
284 retry: {count: 1, delay: 30}
285 skip_fail: false
286
287- description: Create partitions 03
288 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
289 node_name: {{ HOSTNAME_CTL01 }}
290 retry: {count: 1, delay: 30}
Tatyana Leontovich7c97e802017-07-19 17:08:39 +0300291 skip_fail: false
292
293- description: create volume_group
294 cmd: salt "ctl*" cmd.run 'vgcreate cinder-volumes /dev/vdb1'
295 node_name: {{ HOSTNAME_CFG01 }}
296 retry: {count: 1, delay: 30}
297 skip_fail: false
298
299- description: Install cinder-volume
300 cmd: salt 'ctl*' cmd.run 'apt-get install cinder-volume -y'
301 node_name: {{ HOSTNAME_CFG01 }}
302 retry: {count: 1, delay: 30}
303 skip_fail: false
304
305- description: Install crudini
306 cmd: salt "ctl*" cmd.run 'apt-get install crudini -y'
307 node_name: {{ HOSTNAME_CFG01 }}
308 retry: {count: 1, delay: 30}
309 skip_fail: false
310
311- description: Temporary WR set enabled backends value 01
312 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
313 node_name: {{ HOSTNAME_CTL01 }}
314 retry: {count: 1, delay: 30}
315 skip_fail: false
316
317- description: Temporary WR set enabled backends value 02
318 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
319 node_name: {{ HOSTNAME_CTL02 }}
320 retry: {count: 1, delay: 30}
321 skip_fail: false
322
323- description: Temporary WR set enabled backends value 03
324 cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
325 node_name: {{ HOSTNAME_CTL03 }}
326 retry: {count: 1, delay: 30}
327 skip_fail: false
328
329- description: Install docker.io on gtw
330 cmd: salt-call cmd.run 'apt-get install docker.io -y'
331 node_name: {{ HOSTNAME_GTW01 }}
332 retry: {count: 1, delay: 30}
333 skip_fail: false
334
335- description: create rc file on cfg
336 cmd: scp ctl01:/root/keystonercv3 /root
337 node_name: {{ HOSTNAME_CFG01 }}
338 retry: {count: 1, delay: 30}
339 skip_fail: false
340
341- description: Copy rc file
342 cmd: scp /root/keystonercv3 gtw01:/root
343 node_name: {{ HOSTNAME_CFG01 }}
344 retry: {count: 1, delay: 30}
345 skip_fail: false
346
347- description: Run tests
348 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"
349 node_name: {{ HOSTNAME_GTW01 }}
350 retry: {count: 1, delay: 30}
351 skip_fail: false