Moving horizon compression offline
Making the horizon scss compilation and compression happen offline.
Potentially fixing an issue with parallel compression in devstack.
Related-Bug: #1345955
Change-Id: I066c80e06a92302a3f8dc5fd45d127fbde6cf99c
diff --git a/lib/horizon b/lib/horizon
index 1b53831..872e77a 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -99,6 +99,8 @@
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
cp $HORIZON_SETTINGS $local_settings
+ _horizon_config_set $local_settings "" COMPRESS_OFFLINE True
+
_horizon_config_set $local_settings "" OPENSTACK_HOST \"${KEYSTONE_SERVICE_HOST}\"
_horizon_config_set $local_settings "" OPENSTACK_KEYSTONE_URL "\"${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}:${KEYSTONE_SERVICE_PORT}/v2.0\""
if [[ -n "$KEYSTONE_TOKEN_HASH_ALGORITHM" ]]; then
@@ -140,6 +142,9 @@
# and run_process
sudo rm -f /var/log/$APACHE_NAME/horizon_*
+ DJANGO_SETTINGS_MODULE=openstack_dashboard.settings django-admin.py collectstatic --noinput
+ DJANGO_SETTINGS_MODULE=openstack_dashboard.settings django-admin.py compress --force
+
}
# install_django_openstack_auth() - Collect source and prepare