diff options
author | Michael Polenchuk <mpolenchuk@mirantis.com> | 2017-09-06 12:41:07 +0400 |
---|---|---|
committer | Michael Polenchuk <mpolenchuk@mirantis.com> | 2017-09-06 12:47:46 +0400 |
commit | c9d474cd794044bffeaa091e4bcf33bec4509bc4 (patch) | |
tree | 7b2c687a00c0980f672ccb8aff87c16f635c74f9 /mcp/config | |
parent | f26e94914200be045abfd10d63d7120e9e0f6145 (diff) |
Initialize mongodb cluster
* wait for mongodb service ready state
* run rs.initiate() to start a replication set
Change-Id: Ia9d2357d2ce0e9ba92a6be3d8b6c068efaa10822
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Diffstat (limited to 'mcp/config')
-rwxr-xr-x | mcp/config/states/openstack_ha | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index e507ec990..b9db81729 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -42,7 +42,11 @@ salt -I 'neutron:gateway' state.sls neutron.gateway salt -I 'nova:compute' state.sls nova -salt -I 'mongodb:server' state.sls mongodb -b 1 +salt -I 'mongodb:server' state.sls mongodb +while true; do sleep 5; salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin' && break; done +salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin --eval "rs.initiate()"' +salt -C 'I@mongodb:server and *01*' state.sls mongodb + salt -I 'aodh:server' state.sls aodh salt -I 'ceilometer:server' state.sls ceilometer salt -I 'ceilometer:agent' state.sls ceilometer |