Browse code

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

David Lyle authored on 2014/09/12 08:50:08
Showing 1 changed files
... ...
@@ -99,6 +99,8 @@ function init_horizon {
99 99
     local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
100 100
     cp $HORIZON_SETTINGS $local_settings
101 101
 
102
+    _horizon_config_set $local_settings "" COMPRESS_OFFLINE True
103
+
102 104
     _horizon_config_set $local_settings "" OPENSTACK_HOST \"${KEYSTONE_SERVICE_HOST}\"
103 105
     _horizon_config_set $local_settings "" OPENSTACK_KEYSTONE_URL "\"${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}:${KEYSTONE_SERVICE_PORT}/v2.0\""
104 106
     if [[ -n "$KEYSTONE_TOKEN_HASH_ALGORITHM" ]]; then
... ...
@@ -140,6 +142,9 @@ function init_horizon {
140 140
     # and run_process
141 141
     sudo rm -f /var/log/$APACHE_NAME/horizon_*
142 142
 
143
+    DJANGO_SETTINGS_MODULE=openstack_dashboard.settings django-admin.py collectstatic --noinput
144
+    DJANGO_SETTINGS_MODULE=openstack_dashboard.settings django-admin.py compress --force
145
+
143 146
 }
144 147
 
145 148
 # install_django_openstack_auth() - Collect source and prepare