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