diff options
author | Michael Polenchuk <mpolenchuk@mirantis.com> | 2019-04-24 14:53:59 +0400 |
---|---|---|
committer | Michael Polenchuk <mpolenchuk@mirantis.com> | 2019-04-25 10:13:19 +0000 |
commit | 4f0fa64ac58016ce62a6081c1a26bd2f2a222a3c (patch) | |
tree | 2215643c0cc0d0770d7deb6892c93aba5e96ec77 /mcp | |
parent | ee63c02fff4bba6278201d1c74c5bc5ea1d5cc37 (diff) |
[ha] Decouple openstack services by roles
Deploy the OpenStack API services based on roles to
prevent issues with absent database tables since db_sync
runs only on the nodes with primary role.
Change-Id: I04cf3ce0dd59afd93b8a0dfcf060fbd7e7411c82
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
(cherry picked from commit 07d70f192a8d296ad9a94b992d6d6f41191e290b)
Diffstat (limited to 'mcp')
-rwxr-xr-x | mcp/config/states/openstack_ha | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 51db5094b..7cf40086e 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -34,21 +34,26 @@ salt -I 'haproxy:proxy' state.sls haproxy salt -I 'haproxy:proxy' service.status haproxy salt -I 'haproxy:proxy' service.restart rsyslog -salt -I 'keystone:server' state.sls keystone.server -b 1 +salt -I 'keystone:server:role:primary' state.sls keystone.server +salt -I 'keystone:server:role:secondary' state.sls keystone.server salt -I 'keystone:server' service.restart apache2 wait_for 30.0 "salt -I 'keystone:client' state.sls keystone.client" salt -I 'keystone:server' cmd.run ". /root/keystonercv3; openstack service list" -salt -I 'glance:server' state.sls glance -b 1 +salt -I 'glance:server:role:primary' state.sls glance +salt -I 'glance:server:role:secondary' state.sls glance salt -I 'nova:controller:role:primary' state.sls nova -salt -I 'nova:controller:role:secondary' state.sls nova -b 1 -salt -I 'heat:server' state.sls heat -b 1 +salt -I 'nova:controller:role:secondary' state.sls nova +salt -I 'heat:server:role:primary' state.sls heat +salt -I 'heat:server:role:secondary' state.sls heat -wait_for 5.0 "salt -I 'cinder:controller' state.sls cinder -b 1" +salt -I 'cinder:controller:role:primary' state.sls cinder +salt -I 'cinder:controller:role:secondary' state.sls cinder wait_for 3.0 "salt -I 'cinder:volume' state.sls cinder" -salt -I 'neutron:server' state.sls neutron -b 1 +salt -I 'neutron:server:role:primary' state.sls neutron +salt -I 'neutron:server:role:secondary' state.sls neutron salt -I 'neutron:gateway' state.sls neutron.gateway if salt 'cmp*' match.pillar 'neutron:compute:backend:engine:ovn' \ --out yaml --static | grep -q -e 'true' ; then @@ -58,14 +63,17 @@ fi salt -I 'nova:compute' state.sls nova,armband salt -I 'barbican:server:role:primary' state.sls barbican -salt -I 'barbican:server:role:secondary' state.sls barbican -b 1 +salt -I 'barbican:server:role:secondary' state.sls barbican salt -I 'barbican:client' state.sls barbican salt -I 'redis:cluster:role:master' state.sls redis salt -I 'redis:server' state.sls redis -salt -I 'gnocchi:server' state.sls gnocchi -b 1 -salt -I 'panko:server' state.sls panko -b 1 -salt -I 'aodh:server' state.sls aodh -b 1 +salt -I 'gnocchi:server:role:primary' state.sls gnocchi +salt -I 'gnocchi:server:role:secondary' state.sls gnocchi +salt -I 'panko:server:role:primary' state.sls panko +salt -I 'panko:server:role:secondary' state.sls panko +salt -I 'aodh:server:role:primary' state.sls aodh +salt -I 'aodh:server:role:secondary' state.sls aodh salt -I 'ceilometer:server' state.sls ceilometer salt -I 'ceilometer:agent' state.sls ceilometer |