blob: 786a9e57a04d7e72369412fe0ae6e3eec03065ae [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 %}
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +03005{% from 'virtual-mcp-ocata-dvr/salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
6{% from 'virtual-mcp-ocata-dvr/salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +03007
8# Install OpenStack control services
9
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030010- description: Install glance on all controllers
11 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
12 -C 'I@glance:server' state.sls glance -b 1
13 node_name: {{ HOSTNAME_CFG01 }}
14 retry: {count: 1, delay: 5}
15 skip_fail: false
16
17- description: Install keystone service (note that different fernet keys are created on different nodes)
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030018 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
19 -C 'I@keystone:server' state.sls keystone.server -b 1
20 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovichd4f1fd32017-04-21 13:31:44 +030021 retry: {count: 2, delay: 15}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030022 skip_fail: false
23
Tatyana Leontovichfa7ae4d2017-04-25 13:46:14 +030024- description: Restart apache due to PROD-10477
25 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
26 node_name: {{ HOSTNAME_CFG01 }}
27 retry: {count: 1, delay: 15}
28 skip_fail: false
29
30- description: Check apache status to PROD-10477
31 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
32 node_name: {{ HOSTNAME_CFG01 }}
33 retry: {count: 1, delay: 15}
34 skip_fail: false
35
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030036- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
37 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
38 -C 'I@glance:server' state.sls glusterfs.client
39 node_name: {{ HOSTNAME_CFG01 }}
40 retry: {count: 1, delay: 5}
41 skip_fail: false
42
43- description: Update fernet keys for keystone server on the mounted glusterfs volume
44 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
45 -C 'I@keystone:server' state.sls keystone.server -b 1
46 node_name: {{ HOSTNAME_CFG01 }}
47 retry: {count: 1, delay: 5}
48 skip_fail: false
49
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030050- description: Populate keystone services/tenants/admins
51 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
52 -C 'I@keystone:client' state.sls keystone.client
53 node_name: {{ HOSTNAME_CFG01 }}
54 retry: {count: 1, delay: 5}
55 skip_fail: false
56
57- description: Check keystone service-list
58 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb8b02d82017-04-21 14:07:33 +030059 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack service list'
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030060 node_name: {{ HOSTNAME_CFG01 }}
61 retry: {count: 1, delay: 5}
62 skip_fail: false
63
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030064- description: Check glance image-list
65 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
66 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
67 node_name: {{ HOSTNAME_CFG01 }}
68 retry: {count: 1, delay: 5}
69 skip_fail: false
70
71
72- description: Install nova on all controllers
73 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
74 -C 'I@nova:controller' state.sls nova -b 1
75 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030076 retry: {count: 2, delay: 5}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030077 skip_fail: false
78
79- description: Check nova service-list
80 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
81 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list'
82 node_name: {{ HOSTNAME_CFG01 }}
83 retry: {count: 1, delay: 5}
84 skip_fail: false
85
86
87- description: Install cinder
88 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
89 -C 'I@cinder:controller' state.sls cinder -b 1
90 node_name: {{ HOSTNAME_CFG01 }}
91 retry: {count: 1, delay: 5}
92 skip_fail: false
93
94- description: Check cinder list
95 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
96 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
97 node_name: {{ HOSTNAME_CFG01 }}
98 retry: {count: 1, delay: 5}
99 skip_fail: false
100
101
102- description: Install neutron service
103 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
104 -C 'I@neutron:server' state.sls neutron -b 1
105 node_name: {{ HOSTNAME_CFG01 }}
106 retry: {count: 1, delay: 5}
107 skip_fail: false
108
109- description: Install neutron on gtw node
110 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
111 -C 'I@neutron:gateway' state.sls neutron
112 node_name: {{ HOSTNAME_CFG01 }}
113 retry: {count: 1, delay: 5}
114 skip_fail: false
115
116
117- description: Check neutron agent-list
118 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
119 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
120 node_name: {{ HOSTNAME_CFG01 }}
121 retry: {count: 1, delay: 5}
122 skip_fail: false
123
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300124- description: Install heat service
125 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
126 -C 'I@heat:server' state.sls heat -b 1
127 node_name: {{ HOSTNAME_CFG01 }}
128 retry: {count: 1, delay: 5}
129 skip_fail: false
130
131- description: Check heat service
132 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300133 -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack orchestration resource type list'
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300134 node_name: {{ HOSTNAME_CFG01 }}
Igor Yozhikov8ec6d2f2017-05-23 16:17:29 +0300135 retry: {count: 5, delay: 10}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300136 skip_fail: false
137
138
139- description: Deploy horizon dashboard
140 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
141 -C 'I@horizon:server' state.sls horizon
142 node_name: {{ HOSTNAME_CFG01 }}
143 retry: {count: 1, delay: 5}
144 skip_fail: true
145
146- description: Deploy nginx proxy
147 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
148 -C 'I@nginx:server' state.sls nginx
149 node_name: {{ HOSTNAME_CFG01 }}
150 retry: {count: 1, delay: 5}
151 skip_fail: true
152
153
154# Install compute node
155
156- description: Apply formulas for compute node
157 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
158 node_name: {{ HOSTNAME_CFG01 }}
159 retry: {count: 1, delay: 5}
160 skip_fail: true
161
162- description: Re-apply(as in doc) formulas for compute node
163 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
164 node_name: {{ HOSTNAME_CFG01 }}
165 retry: {count: 1, delay: 5}
166 skip_fail: true
167
168- description: Check IP on computes
169 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
170 'ip a'
171 node_name: {{ HOSTNAME_CFG01 }}
172 retry: {count: 10, delay: 30}
173 skip_fail: false
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300174
175
176 # Upload cirros image
177
178- description: Upload cirros image on ctl01
179 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
180 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
181 node_name: {{ HOSTNAME_CFG01 }}
182 retry: {count: 2, delay: 30}
183 skip_fail: false
184
185- description: Register image in glance
186 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
187 '. /root/keystonercv3; glance image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
188 node_name: {{ HOSTNAME_CFG01 }}
189 retry: {count: 1, delay: 30}
190 skip_fail: false
191
192- description: Create net04_external
193 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
194 '. /root/keystonercv3; neutron net-create net04_ext --shared --router:external True --provider:physical_network physnet1 --provider:network_type flat'
195 node_name: {{ HOSTNAME_CFG01 }}
196 retry: {count: 1, delay: 30}
197 skip_fail: false
198
199- description: Create subnet_external
200 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
201 '. /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'
202 node_name: {{ HOSTNAME_CFG01 }}
203 retry: {count: 1, delay: 30}
204 skip_fail: false
205
206- description: Create net04
207 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
208 '. /root/keystonercv3; neutron net-create net04'
209 node_name: {{ HOSTNAME_CFG01 }}
210 retry: {count: 1, delay: 30}
211 skip_fail: false
212
213- description: Create subnet_net04
214 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
215 '. /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'
216 node_name: {{ HOSTNAME_CFG01 }}
217 retry: {count: 1, delay: 30}
218 skip_fail: false
219
220- description: Create router
221 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
222 '. /root/keystonercv3; neutron router-create net04_router01'
223 node_name: {{ HOSTNAME_CFG01 }}
224 retry: {count: 1, delay: 30}
225 skip_fail: false
226
227- description: Set geteway
228 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
229 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
230 node_name: {{ HOSTNAME_CFG01 }}
231 retry: {count: 1, delay: 30}
232 skip_fail: false
233
234- description: Add interface
235 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
236 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
237 node_name: {{ HOSTNAME_CFG01 }}
238 retry: {count: 1, delay: 30}
239 skip_fail: false
240
241- description: Allow all tcp
242 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
243 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
244 node_name: {{ HOSTNAME_CFG01 }}
245 retry: {count: 1, delay: 30}
246 skip_fail: false
247
248- description: Allow all icmp
249 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
250 '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
251 node_name: {{ HOSTNAME_CFG01 }}
252 retry: {count: 1, delay: 30}
253 skip_fail: false
254
255# Configure cinder-volume salt-call
256- description: Set disks 01
257 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
258 node_name: {{ HOSTNAME_CTL01 }}
259 retry: {count: 1, delay: 30}
260 skip_fail: false
261
262- description: Set disks 02
263 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
264 node_name: {{ HOSTNAME_CTL02 }}
265 retry: {count: 1, delay: 30}
266 skip_fail: false
267
268- description: Set disks 03
269 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
270 node_name: {{ HOSTNAME_CTL03 }}
271 retry: {count: 1, delay: 30}
272 skip_fail: false
273
274- description: Create partitions 01
275 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
276 node_name: {{ HOSTNAME_CTL01 }}
277 retry: {count: 1, delay: 30}
278 skip_fail: false
279
280- description: Create partitions 02
281 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
282 node_name: {{ HOSTNAME_CTL01 }}
283 retry: {count: 1, delay: 30}
284 skip_fail: false
285
286- description: Create partitions 03
287 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
288 node_name: {{ HOSTNAME_CTL01 }}
289 retry: {count: 1, delay: 30}
290 skip_fail: false