Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 1 | #!/bin/bash -x |
| 2 | exec > >(tee -i /tmp/"$(basename "$0" .sh)"_"$(date '+%Y-%m-%d_%H-%M-%S')".log) 2>&1 |
| 3 | |
| 4 | # setup keystone service |
| 5 | salt -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 6 | # populate keystone services/tenants/admins |
| 7 | salt -C 'I@keystone:client' state.sls keystone.client |
Simon Pasquier | d3a0b91 | 2017-05-02 15:32:20 +0200 | [diff] [blame] | 8 | # salt-minion should be restarted in case keystone.client has changed the Salt configuration |
| 9 | salt -C 'I@keystone:client' --async service.restart salt-minion; sleep 5 |
Olivier Bourdon | 186e8bb | 2017-06-05 09:50:45 +0200 | [diff] [blame] | 10 | salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; openstack service list" |
Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 11 | |
Simon Pasquier | d3a0b91 | 2017-05-02 15:32:20 +0200 | [diff] [blame] | 12 | # Install glance |
Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 13 | salt -C 'I@glance:server' state.sls glance -b 1 |
Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 14 | # Update fernet tokens before doing request on keystone server. Otherwise |
| 15 | # you will get an error like: |
| 16 | # "No encryption keys found; run keystone-manage fernet_setup to bootstrap one" |
| 17 | salt -C 'I@keystone:server' state.sls keystone.server |
| 18 | salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; glance image-list" |
| 19 | |
| 20 | # Install nova service |
| 21 | salt -C 'I@nova:controller' state.sls nova -b 1 |
| 22 | salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; nova service-list" |
| 23 | |
| 24 | # Install cinder service |
| 25 | salt -C 'I@cinder:controller' state.sls cinder -b 1 |
| 26 | salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; cinder list" |
| 27 | |
| 28 | # Install neutron service |
| 29 | salt -C 'I@neutron:server' state.sls neutron -b 1 |
| 30 | salt -C 'I@neutron:gateway' state.sls neutron |
| 31 | salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; neutron agent-list" |
| 32 | |
| 33 | # Install heat service |
| 34 | salt -C 'I@heat:server' state.sls heat -b 1 |
| 35 | salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; heat resource-type-list" |
| 36 | |
| 37 | # Install horizon dashboard |
| 38 | salt -C 'I@horizon:server' state.sls horizon |
| 39 | salt -C 'I@nginx:server' state.sls nginx |
| 40 | |
| 41 | # Install ceilometer services |
| 42 | salt -C 'I@ceilometer:server' state.sls ceilometer -b 1 |
Jeepyb User | dd14e0b | 2017-02-28 15:19:32 +0000 | [diff] [blame] | 43 | |
| 44 | # Install aodh services |
| 45 | salt -C 'I@aodh:server' state.sls aodh -b 1 |
Simon Pasquier | d3a0b91 | 2017-05-02 15:32:20 +0200 | [diff] [blame] | 46 | |
| 47 | # Create the Nova resources (if any) |
| 48 | salt -C 'I@nova:client' state.sls nova |