summaryrefslogtreecommitdiff
path: root/strata/openstack-services/horizon.morph
blob: 3ebe5c7398fa300d682ba133065363e5c214a53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: horizon
kind: chunk
configure-commands:
# Remove unnecessary .mo files they will be generated
# later during package build.
- find . -name "django*.mo" -exec rm -f '{}' \;
build-commands:
# Compile message strings
- cd horizon && django-admin.py compilemessages && cd ..
- cd openstack_dashboard && django-admin.py compilemessages && cd ..
- python setup.py build

# Use the local_settings.py example to compile and compress the css, js, etc files.
# This is a hack to make SECRET_KEY work.
- |
  cp openstack_dashboard/local/local_settings.py.example \
     openstack_dashboard/local/local_settings.py
# Collect the static files and compress them.
- python manage.py collectstatic --noinput
- python manage.py compress --force
install-commands:
# Undo hack
- rm openstack_dashboard/local/local_settings.py
# Install horizon
- mkdir -p "$DESTDIR"/var/lib/horizon
- cp -a openstack_dashboard "$DESTDIR"/var/lib/horizon/

# Remove unnecessary .po files
- find "$DESTDIR" -name django.po -exec rm '{}' \;
- find "$DESTDIR" -name djangojs.po -exec rm '{}' \;

# Create the static directory (STATIC_ROOT) used in local_settings.py to keep
# the static objects like css files.
- mkdir -p "$DESTDIR"/var/lib/horizon/static
# Copy the compressed static files to horizon.
- cp -a static/* "$DESTDIR"/var/lib/horizon/static

# Create the horizon document root for apache configuration
- mkdir -p "$DESTDIR"/var/lib/horizon/.blackhole