blob: 4b744332dbf1c3bc6bee90b1ae783b990333be19 [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenkoc05c9f62018-04-19 19:00:02 +03006{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import DOMAIN_NAME with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02008{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
9{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Oleksii Butenkoc05c9f62018-04-19 19:00:02 +030010{% import 'shared-salt.yaml' as SHARED with context %}
11
Tatyana Leontovich56005da2017-12-11 13:16:51 +020012
13# Install OpenStack control services
14
15- description: Install glance on all controllers
16 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
17 -C 'I@glance:server' state.sls glance -b 1
18 node_name: {{ HOSTNAME_CFG01 }}
19 retry: {count: 1, delay: 5}
20 skip_fail: false
21
22- description: Install keystone service (note that different fernet keys are created on different nodes)
23 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
24 -C 'I@keystone:server' state.sls keystone.server -b 1
25 node_name: {{ HOSTNAME_CFG01 }}
26 retry: {count: 2, delay: 15}
27 skip_fail: false
28
29- description: Restart apache due to PROD-10477
30 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 15}
33 skip_fail: false
34
35- description: Check apache status to PROD-10477
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 1, delay: 15}
39 skip_fail: false
40
41- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
42 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
43 -C 'I@glance:server' state.sls glusterfs.client
44 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 1, delay: 5}
46 skip_fail: false
47
48- description: Update fernet keys for keystone server on the mounted glusterfs volume
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@keystone:server' state.sls keystone.server -b 1
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Populate keystone services/tenants/admins
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@keystone:client' state.sls keystone.client
58 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievf073e6f2018-02-06 23:45:15 +020059 retry: {count: 2, delay: 5}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020060 skip_fail: false
61
62- description: Check keystone service-list
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Check glance image-list
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; glance image-list'
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76
77- description: Install nova on all controllers
78 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
79 -C 'I@nova:controller' state.sls nova -b 1
80 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 2, delay: 5}
82 skip_fail: false
83
84- description: Check nova service-list
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; nova --debug service-list'
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 3, delay: 5}
89 skip_fail: false
90
91
92- description: Install cinder
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@cinder:controller' state.sls cinder -b 1
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 2, delay: 5}
97 skip_fail: false
98
99- description: Check cinder list
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; cinder list'
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 5}
104 skip_fail: false
105
106
107- description: Install neutron service
108 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
109 -C 'I@neutron:server' state.sls neutron -b 1
110 node_name: {{ HOSTNAME_CFG01 }}
111 retry: {count: 1, delay: 5}
112 skip_fail: false
113
114- description: Install neutron on gtw node
115 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
116 -C 'I@neutron:gateway' state.sls neutron
117 node_name: {{ HOSTNAME_CFG01 }}
118 retry: {count: 1, delay: 5}
119 skip_fail: false
120
121- description: Check neutron agent-list
122 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
123 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; neutron agent-list'
124 node_name: {{ HOSTNAME_CFG01 }}
125 retry: {count: 1, delay: 5}
126 skip_fail: false
127
128
129- description: Install heat service
130 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
131 -C 'I@heat:server' state.sls heat -b 1
132 node_name: {{ HOSTNAME_CFG01 }}
133 retry: {count: 1, delay: 5}
134 skip_fail: false
135
136- description: Check heat service
137 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
138 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
139 node_name: {{ HOSTNAME_CFG01 }}
140 retry: {count: 5, delay: 10}
141 skip_fail: false
142
143
144- description: Deploy horizon dashboard
145 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
146 -C 'I@horizon:server' state.sls horizon
147 node_name: {{ HOSTNAME_CFG01 }}
148 retry: {count: 1, delay: 5}
149 skip_fail: true
150
151- description: Deploy nginx proxy
152 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
153 -C 'I@nginx:server' state.sls nginx
154 node_name: {{ HOSTNAME_CFG01 }}
155 retry: {count: 1, delay: 5}
156 skip_fail: true
157
158
159# Install compute node
160
161- description: Apply formulas for compute node
162 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
163 node_name: {{ HOSTNAME_CFG01 }}
164 retry: {count: 1, delay: 5}
165 skip_fail: true
166
167- description: Re-apply(as in doc) formulas for compute node
168 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
169 node_name: {{ HOSTNAME_CFG01 }}
170 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200171 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200172
173- description: Check IP on computes
174 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
175 'ip a'
176 node_name: {{ HOSTNAME_CFG01 }}
177 retry: {count: 10, delay: 30}
178 skip_fail: false
179
180
181 # Upload cirros image
182
183- description: Upload cirros image on ctl01
184 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
185 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
186 node_name: {{ HOSTNAME_CFG01 }}
187 retry: {count: 2, delay: 30}
188 skip_fail: false
189
190- description: Create net04_external
191 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
192 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
193 node_name: {{ HOSTNAME_CFG01 }}
194 retry: {count: 1, delay: 30}
195 skip_fail: false
196
197- description: Create subnet_external
198 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
199 '. /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'
200 node_name: {{ HOSTNAME_CFG01 }}
201 retry: {count: 1, delay: 30}
202 skip_fail: false
203
204- description: Create net04
205 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
206 '. /root/keystonercv3; neutron net-create net04'
207 node_name: {{ HOSTNAME_CFG01 }}
208 retry: {count: 1, delay: 30}
209 skip_fail: false
210
211- description: Create subnet_net04
212 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
213 '. /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'
214 node_name: {{ HOSTNAME_CFG01 }}
215 retry: {count: 1, delay: 30}
216 skip_fail: false
217
218- description: Create router
219 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
220 '. /root/keystonercv3; neutron router-create net04_router01'
221 node_name: {{ HOSTNAME_CFG01 }}
222 retry: {count: 1, delay: 30}
223 skip_fail: false
224
225- description: Set geteway
226 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
227 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
228 node_name: {{ HOSTNAME_CFG01 }}
229 retry: {count: 1, delay: 30}
230 skip_fail: false
231
232- description: Add interface
233 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
234 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
235 node_name: {{ HOSTNAME_CFG01 }}
236 retry: {count: 1, delay: 30}
237 skip_fail: false
238
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200239#- description: Allow all tcp
240# cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
241# '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
242# node_name: {{ HOSTNAME_CFG01 }}
243# retry: {count: 1, delay: 30}
244# skip_fail: false
245#
246#- description: Allow all icmp
247# cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
248# '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
249# node_name: {{ HOSTNAME_CFG01 }}
250# retry: {count: 1, delay: 30}
251# skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200252
253- description: sync time
254 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
255 'service ntp stop; ntpd -gq; service ntp start'
256 node_name: {{ HOSTNAME_CFG01 }}
257 retry: {count: 1, delay: 30}
258 skip_fail: false
259
260- description: Install docker.io on gtw
261 cmd: salt-call cmd.run 'apt-get install docker.io -y'
262 node_name: {{ HOSTNAME_GTW01 }}
263 retry: {count: 1, delay: 30}
264 skip_fail: false
265
Tatyana Leontovichd6bcbc92018-03-23 15:02:28 +0200266- description: Enable forward policy
267 cmd: iptables --policy FORWARD ACCEPT
268 node_name: {{ HOSTNAME_GTW01 }}
269 retry: {count: 1, delay: 30}
270 skip_fail: false
271
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200272- description: create rc file on cfg
273 cmd: scp ctl01:/root/keystonercv3 /root
274 node_name: {{ HOSTNAME_CFG01 }}
275 retry: {count: 1, delay: 30}
276 skip_fail: false
277
278- description: Copy rc file
279 cmd: scp /root/keystonercv3 gtw01:/root
280 node_name: {{ HOSTNAME_CFG01 }}
281 retry: {count: 1, delay: 30}
282 skip_fail: false
Oleksii Butenkoc05c9f62018-04-19 19:00:02 +0300283
284{{ SHARED.RUN_NEW_TEMPEST() }}