Merge changes from topic 'baremetal-noha'
[fuel.git] / mcp / config / states / openstack_ha
index 07bd6b4..a32111f 100755 (executable)
@@ -15,7 +15,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
 wait_for 5.0 "salt -I 'keepalived:cluster' state.sls keepalived -b 1"
 wait_for 5.0 "salt -I 'keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address"
 
-salt -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
+wait_for 5.0 "salt -C 'I@rabbitmq:server and *01*' state.sls rabbitmq"
 salt -I 'rabbitmq:server' state.sls rabbitmq
 salt -I 'rabbitmq:server' cmd.run "rabbitmqctl cluster_status"
 
@@ -25,7 +25,7 @@ salt -I 'glusterfs:server' cmd.run "gluster peer status; gluster volume status"
 salt -I 'glusterfs:client' state.sls glusterfs.client
 
 salt -I 'galera:master' state.sls galera
-salt -I 'galera:slave' state.sls galera
+salt -I 'galera:slave' state.sls galera -b 1
 salt -I 'galera:master' mysql.status | grep -A1 wsrep_cluster_size
 
 wait_for 3.0 "salt -I 'memcached:server' state.sls memcached"
@@ -50,14 +50,19 @@ wait_for 3.0 "salt -I 'cinder:volume' state.sls cinder"
 
 salt -I 'neutron:server' state.sls neutron -b 1
 salt -I 'neutron:gateway' state.sls neutron.gateway
+if salt 'cmp*' match.pillar 'neutron:compute' --out yaml --static  | grep -q -e "true" ; then
+  salt -I 'neutron:compute' state.sls neutron.compute
+fi
 
 salt -I 'nova:compute' state.sls nova
 
-salt -C 'I@mongodb:server and *01*' state.sls mongodb || true
-wait_for 10.0 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'"
-salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin --eval "rs.initiate()"'
-salt -I 'mongodb:server' state.sls mongodb
+salt -I 'barbican:server' state.sls barbican -b 1
+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 'ceilometer:server' state.sls ceilometer
 salt -I 'ceilometer:agent' state.sls ceilometer
@@ -65,18 +70,6 @@ salt -I 'ceilometer:agent' state.sls ceilometer
 salt -I 'horizon:server' state.sls horizon
 salt -I 'nginx:server' state.sls nginx
 
-# workaround for Ubuntu Pike Horizon missing css, FUEL-324
-if ! salt -C 'I@horizon:server and *01*' --out=yaml pkg.version openstack-dashboard | grep -qE ':.*mcp'; then
-  salt -I 'horizon:server' file.symlink \
-    /var/lib/openstack-dashboard/static \
-    /usr/share/openstack-dashboard/static
-  salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput"
-  salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force"
-  salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \
-   "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]"
-  salt -I 'horizon:server' service.reload apache2
-fi
-
 cluster_public_host=$(salt -C 'I@nginx:server and *01*' --out=yaml \
   pillar.get _param:cluster_public_host | awk '{print $2; exit}')
 dashboard_host=$(salt -C 'I@nginx:server and *01*' --out=yaml cp.push \