Collectstatic steps not documented anywhere

Bug #1392804 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Matt Borland

Bug Description

We don't seem to be documenting anywhere the "collectstatic" step required to collect the static files and avoid some SCSS parsing errors. We should do this (probably in [1]?) and perhaps also include information on enabling offline compression.

If I understand correctly, the steps are as follow:

1. ./run_tests.sh collectstatic

And then optionally, to enable offline compression:

2. Make sure COMPRESS_ENABLED and COMPRESS_ENABLED are set to True in the local_settings.py file
3. Run ./run_tests.sh compress

[1] https://github.com/openstack/horizon/blob/master/doc/source/topics/install.rst

Robb Romans (rromans)
Changed in horizon:
status: New → Confirmed
Matt Borland (palecrow)
Changed in horizon:
assignee: nobody → Matt Borland (palecrow)
status: Confirmed → In Progress
Revision history for this message
Matt Borland (palecrow) wrote :

Note: It would appear these are ./manage.py collectstatic and ./manage.py compress, as opposed to ./run_tests.

Revision history for this message
Matt Borland (palecrow) wrote :

Also, it would seem that it's COMPRESS_OFFLINE that allows for ./manage.py compress to compress offline or not.

Revision history for this message
Julie Pichon (jpichon) wrote :

Yes! Sorry for all the typos in the description.

Revision history for this message
Matt Borland (palecrow) wrote :

Julie, no problem!

I still need to figure out exactly when these command should be run...presumably right after compiling the messages and before installing Horizon into the local system (with sudo pip install .)? I'm still new to OpenStack and am trying to figure out the flow.

Thanks!

Revision history for this message
Julie Pichon (jpichon) wrote :

I agree, after step 1 and before installing the module would make the most sense to me.

Revision history for this message
Matt Borland (palecrow) wrote :

Hm, OK, so I'm using a fresh machine to test the install process, and I'm a little confused about the order. Here is my process I tried, and my observations:

1) Fresh Ubuntu 14.04 server.
2) sudo apt-get install git python-dev python-virtualenv libssl-dev libffi-dev gettext
3) git clone https://github.com/openstack/horizon.git; cd horizon
4) ./run_tests.sh --compilemessages
5) ./manage.py collectstatic
 -- Doing step 5 causes complaints of not being able to import openstack_dashboard.settings and also "no module named angular"

Now, if I run "sudo pip install ." I can then run "./manage.py collectstatic" afterwards...do I need to run them in that order, or what is appropriate there? It seems that I may also have wanted to run "./setup.py install" or something like that before step 5, then do the "sudo pip install .".

So I think there needs to be something added or swapped in the ordering for the collectstatic command to be effective. Thoughts?

Thanks!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/141885

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/141885
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=dee9385a66bc81df35509f3bcf8d15e190357dc6
Submitter: Jenkins
Branch: master

commit dee9385a66bc81df35509f3bcf8d15e190357dc6
Author: Matt Borland <email address hidden>
Date: Mon Dec 15 12:15:12 2014 -0700

    Add collectstatic commands to install doc

    Added directions on how to run collectstatic and compress as part of the
    install process. Fixing obvious typos as well.

    Change-Id: Ia51bb7bb644dc213b3ec3fd3866633700a73c7f9
    Closes-Bug: 1392804

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.