blob: 66d7614104a1b3da993af189f2fc9f0bcca5f61d [file] [log] [blame]
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +03001################### Install OpenStack control ##########################
Tatyana Leontovich78b83482017-04-11 18:57:11 +03002
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +03003# // Install horizon dashboard
4# salt.enforceState(saltMaster, 'I@horizon:server', 'horizon', true)
5# salt.enforceState(saltMaster, 'I@nginx:server', 'nginx', true)
Dennis Dmitriev45396db2017-04-26 15:29:47 +03006
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +03007- description: Install Horizon
8 do: enforceState
9 target: I@horizon:server
10 state: horizon
Tatyana Leontovich78b83482017-04-11 18:57:11 +030011
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030012- description: Update certs on nginx servers
13 do: enforceState
14 target: I@nginx:server
15 state: salt.minion.cert
Tatyana Leontovich966af4d2017-04-24 14:08:12 +030016
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030017- description: Install nginx
18 do: enforceState
19 target: I@nginx:server
20 state: nginx
Tatyana Leontovich966af4d2017-04-24 14:08:12 +030021
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030022# // setup keystone service
23# //runSaltProcessStep(saltMaster, 'I@keystone:server', 'state.sls', ['keystone.server'], 1)
24# salt.enforceState(saltMaster, 'I@keystone:server and *01*', 'keystone.server', true)
25# salt.enforceState(saltMaster, 'I@keystone:server', 'keystone.server', true)
26# // populate keystone services/tenants/roles/users
Dennis Dmitriev45396db2017-04-26 15:29:47 +030027
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030028- description: Install Keystone on 01
29 do: enforceState
30 target: I@keystone:server and *01*
31 state: keystone.server
32 retry: {count: 3, delay: 5}
Dennis Dmitriev45396db2017-04-26 15:29:47 +030033
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030034- description: Install Keystone
35 do: enforceState
36 target: I@keystone:server
37 state: keystone.server
38 retry: {count: 3, delay: 5}
Tatyana Leontovich78b83482017-04-11 18:57:11 +030039
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030040# // keystone:client must be called locally
41# //salt.runSaltProcessStep(saltMaster, 'I@keystone:client', 'cmd.run', ['salt-call state.sls keystone.client'], null, true)
42# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'service.restart', ['apache2'])
43# salt.enforceState(saltMaster, 'I@keystone:client', 'keystone.client', true)
44# salt.enforceState(saltMaster, 'I@keystone:client', 'keystone.client', true)
45# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; keystone service-list'], null, true)
Tatyana Leontovich78b83482017-04-11 18:57:11 +030046
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030047# - description: Install Keystone client
48# do: runState
49# target: I@keystone:client
50# state: cmd.run
51# args: ['salt-call state.sls keystone.client']
52
53- description: Restart apache on Keystone servers
54 do: runState
55 target: I@keystone:server
56 state: service.restart
57 args: ['apache2']
58
59- description: Install Keystone Client
60 do: enforceState
61 target: I@keystone:client
62 state: keystone.client
63
64- description: Install Keystone Client
65 do: enforceState
66 target: I@keystone:client
67 state: keystone.client
68
69- description: Show Keystone config
70 do: runState
71 target: I@keystone:server
72 state: cmd.run
73 args: ['. /root/keystonerc; keystone service-list']
Tatyana Leontovich78b83482017-04-11 18:57:11 +030074
75
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030076# // Install glance and ensure glusterfs clusters
77# //runSaltProcessStep(saltMaster, 'I@glance:server', 'state.sls', ['glance.server'], 1)
78# salt.enforceState(saltMaster, 'I@glance:server and *01*', 'glance.server', true)
79# salt.enforceState(saltMaster, 'I@glance:server', 'glance.server', true)
80# salt.enforceState(saltMaster, 'I@glance:server', 'glusterfs.client', true)
81
82
83- description: Install glance on 01
84 do: enforceState
85 target: I@glance:server and *01*
86 state: glance.server
87
88- description: Install glance
89 do: enforceState
90 target: I@glance:server
91 state: glance.server
92
93- description: Install gluster client on glance servers
94 do: enforceState
95 target: I@glance:server
96 state: glusterfs.client
97
98# // Update fernet tokens before doing request on keystone server
99# salt.enforceState(saltMaster, 'I@keystone:server', 'keystone.server', true)
100
101- description: Update fernet tokens
102 do: enforceState
103 target: I@keystone:server
104 state: keystone.server
105
106# // Check glance service
107# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; glance image-list'], null, true)
108
109- description: Show glance images via keystone node
110 do: runState
111 target: I@keystone:server
112 state: cmd.run
113 args: ['. /root/keystonerc; glance image-list']
114
115# // Install and check nova service
116# //runSaltProcessStep(saltMaster, 'I@nova:controller', 'state.sls', ['nova'], 1)
117# salt.enforceState(saltMaster, 'I@nova:controller and *01*', 'nova.controller', true)
118# salt.enforceState(saltMaster, 'I@nova:controller', 'nova.controller', true)
119# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; nova service-list'], null, true)
120
121- description: Install nova on controllers on 01
122 do: enforceState
123 target: I@nova:controller and *01*
124 state: nova.controller
125
126- description: Install Keystone
127 do: enforceState
128 target: I@nova:controller
129 state: nova.controller
130
131- description: Show nova services via keystone node
132 do: runState
133 target: I@keystone:server
134 state: cmd.run
135 args: ['. /root/keystonerc; nova service-list']
136
137
138
139# // Install and check cinder service
140# //runSaltProcessStep(saltMaster, 'I@cinder:controller', 'state.sls', ['cinder'], 1)
141# salt.enforceState(saltMaster, 'I@cinder:controller and *01*', 'cinder', true)
142# salt.enforceState(saltMaster, 'I@cinder:controller', 'cinder', true)
143# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; cinder list'], null, true)
144
145
146- description: Install cinder on controllers on 01
147 do: enforceState
148 target: I@cinder:controller and *01*
149 state: cinder
150
151- description: Install cinder on controllers
152 do: enforceState
153 target: I@cinder:controller
154 state: cinder
155
156- description: Show cinder list via keystone node
157 do: runState
158 target: I@keystone:server
159 state: cmd.run
160 args: ['. /root/keystonerc; nova list']
161
162
163# // Install neutron service
164# //runSaltProcessStep(saltMaster, 'I@neutron:server', 'state.sls', ['neutron'], 1)
165
166# salt.enforceState(saltMaster, 'I@neutron:server and *01*', 'neutron.server', true)
167# salt.enforceState(saltMaster, 'I@neutron:server', 'neutron.server', true)
168# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; neutron agent-list'], null, true)
169
170- description: Install neutron on controllers on 01
171 do: enforceState
172 target: I@neutron:server and *01*
173 state: neutron.server
174
175- description: Install neutron on controllers
176 do: enforceState
177 target: I@neutron:server
178 state: neutron.server
179
180- description: Show neutron agent list via keystone node
181 do: runState
182 target: I@keystone:server
183 state: cmd.run
184 args: ['. /root/keystonerc; neutron agent-list']
185
186# // Install heat service
187# //runSaltProcessStep(saltMaster, 'I@heat:server', 'state.sls', ['heat'], 1)
188# salt.enforceState(saltMaster, 'I@heat:server and *01*', 'heat', true)
189# salt.enforceState(saltMaster, 'I@heat:server', 'heat', true)
190# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; heat resource-type-list'], null, true)
191
192- description: Install heat on controllers on 01
193 do: enforceState
194 target: I@heat:server and *01*
195 state: heat
196
197- description: Install heat on controllers
198 do: enforceState
199 target: I@heat:server
200 state: heat
201
202- description: Show heat resource type list via keystone node
203 do: runState
204 target: I@keystone:server
205 state: cmd.run
206 args: ['. /root/keystonerc; heat resource-type-list']
207
208# // Restart nova api
209# salt.runSaltProcessStep(saltMaster, 'I@nova:controller', 'service.restart', ['nova-api'])
210
211- description: Restart nova-api
212 do: runState
213 target: I@nova:controller
214 state: service.restart
215 args: ['nova-api']
216
217################### Install OpenStack network ##########################
218
219# // Apply gateway
220# salt.runSaltProcessStep(saltMaster, 'I@neutron:gateway', 'state.apply', [], null, true)
221
222- description: Apply gateway
223 do: runState
224 target: I@neutron:gateway
225 state: state.apply
226
227# // Pring information
228# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; neutron net-list'], null, true)
229# salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; nova net-list'], null, true)
230
231- description: Show neutron networks via keystone node
232 do: runState
233 target: I@keystone:server
234 state: cmd.run
235 args: ['. /root/keystonerc; neutron net-list']
236
237- description: Show nova networks via keystone node
238 do: runState
239 target: I@keystone:server
240 state: cmd.run
241 args: ['. /root/keystonerc; nova net-list']
242
243
244################### Install OpenStack compute ##########################
245
246# //orchestrate.installOpenstackMkCompute(saltMaster, physical)
247# // Configure compute nodes
248# retry(2) {
249# salt.runSaltProcessStep(saltMaster, 'I@nova:compute', 'state.apply', [], null, true)
250# }
251
252- description: Install Nova compute
253 do: runState
254 target: I@nova:compute
255 state: state.apply
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300256 retry: {count: 2, delay: 5}