summaryrefslogtreecommitdiffstats
path: root/mcp/config/states
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-10-07 17:07:31 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-10-25 00:12:51 +0200
commitfab511daabb05c493943b5f7a2ea8b5fe0802e2d (patch)
treeb9101bf4a534e6d76f93c1eb0ea2f774848f9075 /mcp/config/states
parent8e3a4154830c60b98636ec7a4c61002cbb882828 (diff)
[baremetal] Stein, Bionic, py3 support
Change-Id: If3f8cb6bfeedeb766a050d5a271b21c90bb3ba1c Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/config/states')
-rwxr-xr-xmcp/config/states/baremetal_init5
-rwxr-xr-xmcp/config/states/openstack_ha8
-rwxr-xr-xmcp/config/states/virtual_control_plane3
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"