X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=mcp%2Fconfig%2Fstates%2Fopenstack_ha;h=2e55fc8909f2c0c8fb436fb092b92b4e7a228145;hb=abf3446f4eade931f3b98b0894028c242440ccbd;hp=2597e82e3eb455af6f7e5929b88f3d25d037478d;hpb=599a570c55aab972aed0b98998e9b85c54a88408;p=fuel.git diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 2597e82e3..2e55fc890 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -1,5 +1,16 @@ -#!/bin/bash -set -x +#!/bin/bash -e +############################################################################## +# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x + +# shellcheck disable=SC1090 +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" salt -I 'keepalived:cluster' state.sls keepalived -b 1 salt -I 'keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address @@ -28,7 +39,6 @@ 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' state.sls glusterfs.client salt -I 'keystone:server' state.sls keystone.server salt -I 'nova:controller' state.sls nova -b 1 @@ -38,9 +48,25 @@ salt -I 'cinder:controller' state.sls cinder -b 1 salt -I 'cinder:volume' state.sls cinder salt -I 'neutron:server' state.sls neutron -b 1 -salt -I 'neutron:gateway' state.sls neutron +salt -I 'neutron:gateway' state.sls neutron.gateway salt -I 'nova:compute' state.sls nova +salt -I 'glusterfs:client' state.sls glusterfs.client + +salt -I 'mongodb:server' state.sls mongodb +wait_for 90 "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 -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 salt -I 'horizon:server' state.sls horizon salt -I 'nginx:server' state.sls nginx + +clstr_vip_addr=$(salt -C 'I@nginx:server and *01*' --out=yaml \ + pillar.get _param:cluster_vip_address | awk '{print $2; exit}') +salt -C 'I@nginx:server and *01*' cp.push \ + "/etc/ssl/certs/${clstr_vip_addr}-with-chain.crt" upload_path='certs/os_cacert' +cd /etc/ssl/certs && ln -sf /var/cache/salt/master/minions/prx01.*/files/certs/os_cacert