aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/config/states
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-12-30 16:12:14 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-12-31 07:48:30 +0000
commit991bd80d1ac3245edba257ae8aeec74278ca74a3 (patch)
tree387f4c7f8e98153b6561d953a97b06d55624670c /mcp/config/states
parentd8f0a6b4fd9c3cb10780abcbd9b446c48b08cced (diff)
noha: Re-enable Horizon dashboard, fix CSS
- ha, noha: Fix misaligned python 3 requirement for Horizon: * python3-pylibmc - ha, noha: Partially revert commit 63b712d: "[Horizon] Drop the obsolete Horizon workaround" Since we switched back from MCP Horizon package to UCA, fix misaligned expected static resources location. - noha: Enable nginx proxy on ctl01 node for serving the Horizon dashboard at http://<cluster public VIP>:80 (http only, no SSL). Change-Id: I5f930a5826a818791183d3910aa0e5607924e8f3 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit af1a4adfcc75b1dae16aee766679fcd224158d00)
Diffstat (limited to 'mcp/config/states')
-rwxr-xr-xmcp/config/states/openstack_ha7
-rwxr-xr-xmcp/config/states/openstack_noha9
2 files changed, 15 insertions, 1 deletions
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
index c28d0b46b..4bea06134 100755
--- a/mcp/config/states/openstack_ha
+++ b/mcp/config/states/openstack_ha
@@ -86,6 +86,13 @@ salt -I 'ceilometer:agent' state.sls ceilometer
wait_for 3.0 "salt -I 'horizon:server' state.sls apache,horizon"
salt -I 'nginx:server' state.sls nginx
+# Workaround Horizon missing CSS/JS, see 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
+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 \
diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha
index cb6059d9e..5022e6d1a 100755
--- a/mcp/config/states/openstack_noha
+++ b/mcp/config/states/openstack_noha
@@ -59,4 +59,11 @@ 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 apache,horizon
+salt -I 'horizon:server' state.sls apache,horizon,nginx
+
+# Workaround Horizon missing CSS/JS, see 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
+fi