blob: e9f42c23f69a68856eb7a829866eca2b8b1b34ed [file] [log] [blame]
Jeepyb Userdd14e0b2017-02-28 15:19:32 +00001#!/bin/bash -x
2exec > >(tee -i /tmp/"$(basename "$0" .sh)"_"$(date '+%Y-%m-%d_%H-%M-%S')".log) 2>&1
3
4# setup keystone service
5salt -C 'I@keystone:server' state.sls keystone.server -b 1
6# populate keystone services/tenants/admins
7salt -C 'I@keystone:client' state.sls keystone.client
Simon Pasquierd3a0b912017-05-02 15:32:20 +02008# salt-minion should be restarted in case keystone.client has changed the Salt configuration
9salt -C 'I@keystone:client' --async service.restart salt-minion; sleep 5
Olivier Bourdon186e8bb2017-06-05 09:50:45 +020010salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; openstack service list"
Jeepyb Userdd14e0b2017-02-28 15:19:32 +000011
Simon Pasquierd3a0b912017-05-02 15:32:20 +020012# Install glance
Jeepyb Userdd14e0b2017-02-28 15:19:32 +000013salt -C 'I@glance:server' state.sls glance -b 1
Jeepyb Userdd14e0b2017-02-28 15:19:32 +000014# 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"
17salt -C 'I@keystone:server' state.sls keystone.server
18salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; glance image-list"
19
20# Install nova service
21salt -C 'I@nova:controller' state.sls nova -b 1
22salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; nova service-list"
23
24# Install cinder service
25salt -C 'I@cinder:controller' state.sls cinder -b 1
26salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; cinder list"
27
28# Install neutron service
29salt -C 'I@neutron:server' state.sls neutron -b 1
30salt -C 'I@neutron:gateway' state.sls neutron
31salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; neutron agent-list"
32
33# Install heat service
34salt -C 'I@heat:server' state.sls heat -b 1
35salt -C 'I@keystone:server' cmd.run ". /root/keystonerc; heat resource-type-list"
36
37# Install horizon dashboard
38salt -C 'I@horizon:server' state.sls horizon
39salt -C 'I@nginx:server' state.sls nginx
40
41# Install ceilometer services
42salt -C 'I@ceilometer:server' state.sls ceilometer -b 1
Jeepyb Userdd14e0b2017-02-28 15:19:32 +000043
44# Install aodh services
45salt -C 'I@aodh:server' state.sls aodh -b 1
Simon Pasquierd3a0b912017-05-02 15:32:20 +020046
47# Create the Nova resources (if any)
48salt -C 'I@nova:client' state.sls nova