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