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