blob: b8982b9b2373f1aef73e9edc54c8d1fab3bcafbe [file] [log] [blame]
Sergii Golovatiuk50f91892017-08-04 18:11:06 +02001{% from 'virtual-mcp10-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp10-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp10-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp10-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp10-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
6{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +03008
9# Install OpenStack control services
10
11- description: Install keystone service
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@keystone:server' state.sls keystone.server -b 1
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 5}
16 skip_fail: false
17
18- description: Populate keystone services/tenants/admins
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@keystone:client' state.sls keystone.client
21 node_name: {{ HOSTNAME_CFG01 }}
22 retry: {count: 1, delay: 5}
23 skip_fail: false
24
25- description: Check keystone service-list
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
27 -C 'I@keystone:server' cmd.run '. /root/keystonerc; keystone service-list'
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 5}
30 skip_fail: false
31
32
33- description: Install glance on all controllers
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
35 -C 'I@glance:server' state.sls glance -b 1
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: false
39
40- description: Configure glusterfs.client on all controllers
41 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
42 -C 'I@glance:server' state.sls glusterfs.client
43 node_name: {{ HOSTNAME_CFG01 }}
44 retry: {count: 1, delay: 5}
45 skip_fail: false
46
47- description: Update fernet tokens for keystone server
48 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
49 -C 'I@keystone:server' state.sls keystone.server -b 1
50 node_name: {{ HOSTNAME_CFG01 }}
51 retry: {count: 1, delay: 5}
52 skip_fail: false
53
54- description: Check glance image-list
55 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
56 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
57 node_name: {{ HOSTNAME_CFG01 }}
58 retry: {count: 1, delay: 5}
59 skip_fail: false
60
61
62- description: Install nova on all controllers
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@nova:controller' state.sls nova -b 1
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Check nova service-list
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list'
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76
77- description: Install cinder
78 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
79 -C 'I@cinder:controller' state.sls cinder -b 1
80 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 1, delay: 5}
82 skip_fail: false
83
84- description: Check cinder list
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 5}
89 skip_fail: false
90
91
92- description: Install neutron service
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@neutron:server' state.sls neutron -b 1
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 1, delay: 5}
97 skip_fail: false
98
99- description: Install neutron on gtw node
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@neutron:gateway' state.sls neutron
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 5}
104 skip_fail: false
105
106
107- description: Check neutron agent-list
108 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
109 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
110 node_name: {{ HOSTNAME_CFG01 }}
111 retry: {count: 1, delay: 5}
112 skip_fail: false
113
114
115- description: Install heat service
116 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
117 -C 'I@heat:server' state.sls heat -b 1
118 node_name: {{ HOSTNAME_CFG01 }}
119 retry: {count: 1, delay: 5}
120 skip_fail: false
121
122- description: Check heat service
123 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
124 -C 'I@keystone:server' cmd.run '. /root/keystonerc; heat resource-type-list'
125 node_name: {{ HOSTNAME_CFG01 }}
126 retry: {count: 1, delay: 5}
127 skip_fail: false
128
129
130- description: Deploy horizon dashboard
131 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
132 -C 'I@horizon:server' state.sls horizon
133 node_name: {{ HOSTNAME_CFG01 }}
134 retry: {count: 1, delay: 5}
135 skip_fail: true
136
137- description: Deploy nginx proxy
138 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
139 -C 'I@nginx:server' state.sls nginx
140 node_name: {{ HOSTNAME_CFG01 }}
141 retry: {count: 1, delay: 5}
142 skip_fail: true
143
144
145# Install compute node
146
147- description: Apply formulas for compute node
148 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
149 node_name: {{ HOSTNAME_CFG01 }}
150 retry: {count: 1, delay: 5}
151 skip_fail: true
152
153- description: Re-apply(as in doc) formulas for compute node
154 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
155 node_name: {{ HOSTNAME_CFG01 }}
156 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200157 skip_fail: false
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +0300158
159- description: Check IP on computes
160 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
161 'ip a'
162 node_name: {{ HOSTNAME_CFG01 }}
163 retry: {count: 10, delay: 30}
164 skip_fail: false
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300165
166
167 # Upload cirros image
168
169- description: Upload cirros image on ctl01
170 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
171 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 2, delay: 30}
174 skip_fail: false
175
176- description: Register image in glance
177 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Dmitry Tyzhnenko30f58042017-11-28 17:00:40 +0200178 '. /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'
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300179 node_name: {{ HOSTNAME_CFG01 }}
180 retry: {count: 1, delay: 30}
181 skip_fail: false
182
183- description: Create net04_external
184 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Alexey Stupnikove1577092017-08-10 20:59:31 +0300185 '. /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 +0300186 node_name: {{ HOSTNAME_CFG01 }}
187 retry: {count: 1, delay: 30}
188 skip_fail: false
189
190- description: Create subnet_external
191 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
192 '. /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'
193 node_name: {{ HOSTNAME_CFG01 }}
194 retry: {count: 1, delay: 30}
195 skip_fail: false
196
197- description: Create net04
198 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
199 '. /root/keystonercv3; neutron net-create net04'
200 node_name: {{ HOSTNAME_CFG01 }}
201 retry: {count: 1, delay: 30}
202 skip_fail: false
203
204- description: Create subnet_net04
205 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
206 '. /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'
207 node_name: {{ HOSTNAME_CFG01 }}
208 retry: {count: 1, delay: 30}
209 skip_fail: false
210
211- description: Create router
212 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
213 '. /root/keystonercv3; neutron router-create net04_router01'
214 node_name: {{ HOSTNAME_CFG01 }}
215 retry: {count: 1, delay: 30}
216 skip_fail: false
217
218- description: Set geteway
219 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
220 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
221 node_name: {{ HOSTNAME_CFG01 }}
222 retry: {count: 1, delay: 30}
223 skip_fail: false
224
225- description: Add interface
226 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
227 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
228 node_name: {{ HOSTNAME_CFG01 }}
229 retry: {count: 1, delay: 30}
230 skip_fail: false
231
232- description: Allow all tcp
233 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
234 '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0'
235 node_name: {{ HOSTNAME_CFG01 }}
236 retry: {count: 1, delay: 30}
237 skip_fail: false
238
239- description: Allow all icmp
240 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
241 '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0'
242 node_name: {{ HOSTNAME_CFG01 }}
243 retry: {count: 1, delay: 30}
244 skip_fail: false
245
246# Configure cinder-volume salt-call
247- description: Set disks 01
248 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
249 node_name: {{ HOSTNAME_CTL01 }}
250 retry: {count: 1, delay: 30}
251 skip_fail: false
252
253- description: Set disks 02
254 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
255 node_name: {{ HOSTNAME_CTL02 }}
256 retry: {count: 1, delay: 30}
257 skip_fail: false
258
259- description: Set disks 03
260 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
261 node_name: {{ HOSTNAME_CTL03 }}
262 retry: {count: 1, delay: 30}
263 skip_fail: false
264
265- description: Create partitions 01
266 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
267 node_name: {{ HOSTNAME_CTL01 }}
268 retry: {count: 1, delay: 30}
269 skip_fail: false
270
271- description: Create partitions 02
272 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
sgudz2e393392017-10-17 12:51:26 +0300273 node_name: {{ HOSTNAME_CTL02 }}
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300274 retry: {count: 1, delay: 30}
275 skip_fail: false
276
277- description: Create partitions 03
278 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
sgudz2e393392017-10-17 12:51:26 +0300279 node_name: {{ HOSTNAME_CTL03 }}
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300280 retry: {count: 1, delay: 30}
Alexey Stupnikove1577092017-08-10 20:59:31 +0300281 skip_fail: false