| ################### Install OpenStack control ########################## |
| |
| # // Install horizon dashboard |
| # salt.enforceState(saltMaster, 'I@horizon:server', 'horizon', true) |
| # salt.enforceState(saltMaster, 'I@nginx:server', 'nginx', true) |
| |
| - description: Install Horizon |
| do: enforceState |
| target: I@horizon:server |
| state: horizon |
| |
| - description: Update certs on nginx servers |
| do: enforceState |
| target: I@nginx:server |
| state: salt.minion.cert |
| |
| - description: Install nginx |
| do: enforceState |
| target: I@nginx:server |
| state: nginx |
| |
| # // setup keystone service |
| # //runSaltProcessStep(saltMaster, 'I@keystone:server', 'state.sls', ['keystone.server'], 1) |
| # salt.enforceState(saltMaster, 'I@keystone:server and *01*', 'keystone.server', true) |
| # salt.enforceState(saltMaster, 'I@keystone:server', 'keystone.server', true) |
| # // populate keystone services/tenants/roles/users |
| |
| - description: Install Keystone on 01 |
| do: enforceState |
| target: I@keystone:server and *01* |
| state: keystone.server |
| retry: {count: 3, delay: 5} |
| |
| - description: Install Keystone |
| do: enforceState |
| target: I@keystone:server |
| state: keystone.server |
| retry: {count: 3, delay: 5} |
| |
| # // keystone:client must be called locally |
| # //salt.runSaltProcessStep(saltMaster, 'I@keystone:client', 'cmd.run', ['salt-call state.sls keystone.client'], null, true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'service.restart', ['apache2']) |
| # salt.enforceState(saltMaster, 'I@keystone:client', 'keystone.client', true) |
| # salt.enforceState(saltMaster, 'I@keystone:client', 'keystone.client', true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; keystone service-list'], null, true) |
| |
| # - description: Install Keystone client |
| # do: runState |
| # target: I@keystone:client |
| # state: cmd.run |
| # args: ['salt-call state.sls keystone.client'] |
| |
| - description: Restart apache on Keystone servers |
| do: runState |
| target: I@keystone:server |
| state: service.restart |
| args: ['apache2'] |
| |
| - description: Install Keystone Client |
| do: enforceState |
| target: I@keystone:client |
| state: keystone.client |
| |
| - description: Install Keystone Client |
| do: enforceState |
| target: I@keystone:client |
| state: keystone.client |
| |
| - description: Show Keystone config |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; keystone service-list'] |
| |
| |
| # // Install glance and ensure glusterfs clusters |
| # //runSaltProcessStep(saltMaster, 'I@glance:server', 'state.sls', ['glance.server'], 1) |
| # salt.enforceState(saltMaster, 'I@glance:server and *01*', 'glance.server', true) |
| # salt.enforceState(saltMaster, 'I@glance:server', 'glance.server', true) |
| # salt.enforceState(saltMaster, 'I@glance:server', 'glusterfs.client', true) |
| |
| |
| - description: Install glance on 01 |
| do: enforceState |
| target: I@glance:server and *01* |
| state: glance.server |
| |
| - description: Install glance |
| do: enforceState |
| target: I@glance:server |
| state: glance.server |
| |
| - description: Install gluster client on glance servers |
| do: enforceState |
| target: I@glance:server |
| state: glusterfs.client |
| |
| # // Update fernet tokens before doing request on keystone server |
| # salt.enforceState(saltMaster, 'I@keystone:server', 'keystone.server', true) |
| |
| - description: Update fernet tokens |
| do: enforceState |
| target: I@keystone:server |
| state: keystone.server |
| |
| # // Check glance service |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; glance image-list'], null, true) |
| |
| - description: Show glance images via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; glance image-list'] |
| |
| # // Install and check nova service |
| # //runSaltProcessStep(saltMaster, 'I@nova:controller', 'state.sls', ['nova'], 1) |
| # salt.enforceState(saltMaster, 'I@nova:controller and *01*', 'nova.controller', true) |
| # salt.enforceState(saltMaster, 'I@nova:controller', 'nova.controller', true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; nova service-list'], null, true) |
| |
| - description: Install nova on controllers on 01 |
| do: enforceState |
| target: I@nova:controller and *01* |
| state: nova.controller |
| |
| - description: Install Keystone |
| do: enforceState |
| target: I@nova:controller |
| state: nova.controller |
| |
| - description: Show nova services via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; nova service-list'] |
| |
| |
| |
| # // Install and check cinder service |
| # //runSaltProcessStep(saltMaster, 'I@cinder:controller', 'state.sls', ['cinder'], 1) |
| # salt.enforceState(saltMaster, 'I@cinder:controller and *01*', 'cinder', true) |
| # salt.enforceState(saltMaster, 'I@cinder:controller', 'cinder', true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; cinder list'], null, true) |
| |
| |
| - description: Install cinder on controllers on 01 |
| do: enforceState |
| target: I@cinder:controller and *01* |
| state: cinder |
| |
| - description: Install cinder on controllers |
| do: enforceState |
| target: I@cinder:controller |
| state: cinder |
| |
| - description: Show cinder list via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; nova list'] |
| |
| |
| # // Install neutron service |
| # //runSaltProcessStep(saltMaster, 'I@neutron:server', 'state.sls', ['neutron'], 1) |
| |
| # salt.enforceState(saltMaster, 'I@neutron:server and *01*', 'neutron.server', true) |
| # salt.enforceState(saltMaster, 'I@neutron:server', 'neutron.server', true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; neutron agent-list'], null, true) |
| |
| - description: Install neutron on controllers on 01 |
| do: enforceState |
| target: I@neutron:server and *01* |
| state: neutron.server |
| |
| - description: Install neutron on controllers |
| do: enforceState |
| target: I@neutron:server |
| state: neutron.server |
| |
| - description: Show neutron agent list via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; neutron agent-list'] |
| |
| # // Install heat service |
| # //runSaltProcessStep(saltMaster, 'I@heat:server', 'state.sls', ['heat'], 1) |
| # salt.enforceState(saltMaster, 'I@heat:server and *01*', 'heat', true) |
| # salt.enforceState(saltMaster, 'I@heat:server', 'heat', true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; heat resource-type-list'], null, true) |
| |
| - description: Install heat on controllers on 01 |
| do: enforceState |
| target: I@heat:server and *01* |
| state: heat |
| |
| - description: Install heat on controllers |
| do: enforceState |
| target: I@heat:server |
| state: heat |
| |
| - description: Show heat resource type list via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; heat resource-type-list'] |
| |
| # // Restart nova api |
| # salt.runSaltProcessStep(saltMaster, 'I@nova:controller', 'service.restart', ['nova-api']) |
| |
| - description: Restart nova-api |
| do: runState |
| target: I@nova:controller |
| state: service.restart |
| args: ['nova-api'] |
| |
| ################### Install OpenStack network ########################## |
| |
| # // Apply gateway |
| # salt.runSaltProcessStep(saltMaster, 'I@neutron:gateway', 'state.apply', [], null, true) |
| |
| - description: Apply gateway |
| do: runState |
| target: I@neutron:gateway |
| state: state.apply |
| |
| # // Pring information |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; neutron net-list'], null, true) |
| # salt.runSaltProcessStep(saltMaster, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; nova net-list'], null, true) |
| |
| - description: Show neutron networks via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; neutron net-list'] |
| |
| - description: Show nova networks via keystone node |
| do: runState |
| target: I@keystone:server |
| state: cmd.run |
| args: ['. /root/keystonerc; nova net-list'] |
| |
| |
| ################### Install OpenStack compute ########################## |
| |
| # //orchestrate.installOpenstackMkCompute(saltMaster, physical) |
| # // Configure compute nodes |
| # retry(2) { |
| # salt.runSaltProcessStep(saltMaster, 'I@nova:compute', 'state.apply', [], null, true) |
| # } |
| |
| - description: Install Nova compute |
| do: runState |
| target: I@nova:compute |
| state: state.apply |
| retry: {count: 2, delay: 5} |