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
This commit is contained in:
David Lyle 2014-09-11 17:50:08 -06:00 committed by Ian Wienand
parent 9bfdea87a6
commit 45ce98275c

View File

@ -99,6 +99,8 @@ function init_horizon {
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 @@ function init_horizon {
# 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