diff options
Diffstat (limited to 'mcp/config/states')
-rwxr-xr-x | mcp/config/states/baremetal_init | 5 | ||||
-rwxr-xr-x | mcp/config/states/openstack_ha | 8 | ||||
-rwxr-xr-x | mcp/config/states/virtual_control_plane | 3 |
3 files changed, 14 insertions, 2 deletions
diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index 992821571..dcedfbeda 100755 --- a/mcp/config/states/baremetal_init +++ b/mcp/config/states/baremetal_init @@ -25,9 +25,12 @@ salt -C "${cluster_nodes_query}" file.replace $debian_ip_source \ pattern="^\s{8}__salt__\['pkg.install'\]\('vlan'\)" \ repl="\n if not __salt__['pkg.version']('vlan'):\n __salt__['pkg.install']('vlan')" -salt -C "${cluster_nodes_query}" pkg.install bridge-utils salt -C "${cluster_nodes_query}" state.apply linux.system.repo +salt -C "${cluster_nodes_query}" pkg.install force_yes=true bridge-utils,python-jinja2 +salt -C "${cluster_nodes_query}" service.restart salt-minion wait_for 5.0 "salt -C '${cluster_nodes_query}' state.apply salt.minion" +salt -C "${cluster_nodes_query}" file.remove /etc/resolv.conf +salt -C "${cluster_nodes_query}" file.touch /etc/resolv.conf wait_for 5.0 "salt -C '${cluster_nodes_query}' state.apply linux,ntp" wait_for 30.0 "salt -C '${cluster_nodes_query}' test.ping" diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 7cf40086e..c28d0b46b 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -66,6 +66,12 @@ salt -I 'barbican:server:role:primary' state.sls barbican salt -I 'barbican:server:role:secondary' state.sls barbican salt -I 'barbican:client' state.sls barbican +# remove config files coming from packages +for service in gnocchi panko; do + salt -I "${service}:server" pkg.install ${service}-api + salt -I "${service}:server" file.remove "/etc/apache2/sites-enabled/${service}-api.conf" +done + salt -I 'redis:cluster:role:master' state.sls redis salt -I 'redis:server' state.sls redis salt -I 'gnocchi:server:role:primary' state.sls gnocchi @@ -77,7 +83,7 @@ salt -I 'aodh:server:role:secondary' state.sls aodh salt -I 'ceilometer:server' state.sls ceilometer salt -I 'ceilometer:agent' state.sls ceilometer -salt -I 'horizon:server' state.sls apache,horizon +wait_for 3.0 "salt -I 'horizon:server' state.sls apache,horizon" salt -I 'nginx:server' state.sls nginx cluster_public_host=$(salt -C 'I@nginx:server and *01*' --out=yaml \ diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane index 183360b96..f2e861ac2 100755 --- a/mcp/config/states/virtual_control_plane +++ b/mcp/config/states/virtual_control_plane @@ -48,6 +48,9 @@ cd /srv/salt/env/prd/maas/files && ln -sf \ salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' cp.get_file \ "salt://maas/files/$(basename "${APT_CONF_D_CURTIN}")" "${APT_CONF_D_CURTIN}" +salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.sls linux.system.repo +salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' pkg.install force_yes=true python-jinja2 +salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' service.restart salt-minion wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply salt" wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp" |