summaryrefslogtreecommitdiff
path: root/install-files/openstack
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-05-21 14:44:07 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-06-04 13:50:26 +0000
commitfe422c395e0819f11a0341ebba3250228e9f99b5 (patch)
tree4a7a61e66bea6c2b4c7247f06f81c6b4e021dad8 /install-files/openstack
parent8672cc4fb9221d1bf7f849380d9c04368fb43c70 (diff)
downloaddefinitions-fe422c395e0819f11a0341ebba3250228e9f99b5.tar.gz
Horizon: Install the openstack_dashboard django project in /var/lib/horizon
With this patch we avoid some problems: - Horizon trying to write in /usr/lib/python2.7/site-packages/static - We won't have to maintain a copy of local_settings.py - The workaround of creating a symlink for django.wsgi is not needed now. This patch also changes apache-horizon.conf to - Change the path of django.wsgi file - Load the horizon server with the url 'http://<IP-of-OpenStack>' (the 'horizon/' suffix is removed) - Grant permissions to access to /var/lib/horizon/static Also changes 'tempest.conf' to change Horizon urls.
Diffstat (limited to 'install-files/openstack')
-rw-r--r--install-files/openstack/etc/horizon/apache-horizon.conf10
-rw-r--r--install-files/openstack/etc/tempest/tempest.conf4
-rw-r--r--install-files/openstack/manifest2
-rw-r--r--install-files/openstack/usr/share/openstack/horizon.yml7
4 files changed, 11 insertions, 12 deletions
diff --git a/install-files/openstack/etc/horizon/apache-horizon.conf b/install-files/openstack/etc/horizon/apache-horizon.conf
index ea88897a..ab3cf0c7 100644
--- a/install-files/openstack/etc/horizon/apache-horizon.conf
+++ b/install-files/openstack/etc/horizon/apache-horizon.conf
@@ -1,16 +1,18 @@
<VirtualHost *:80>
- WSGIScriptAlias /horizon /var/lib/horizon/openstack_dashboard/django.wsgi
+ WSGIScriptAlias / /var/lib/horizon/openstack_dashboard/wsgi/django.wsgi
WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10 home=/var/lib/horizon display-name=horizon
WSGIApplicationGroup %{GLOBAL}
- RedirectMatch ^/$ /horizon/
-
SetEnv APACHE_RUN_USER apache
SetEnv APACHE_RUN_GROUP apache
WSGIProcessGroup horizon
DocumentRoot /var/lib/horizon/.blackhole
- Alias /static /var/lib/horizon/openstack_dashboard/static
+ Alias /static /var/lib/horizon/static
+
+ <Directory /var/lib/horizon/static>
+ Require all granted
+ </Directory>
<Directory /var/lib/horizon/openstack_dashboard >
Options Indexes FollowSymLinks MultiViews
diff --git a/install-files/openstack/etc/tempest/tempest.conf b/install-files/openstack/etc/tempest/tempest.conf
index 05f0eca1..fc6b0865 100644
--- a/install-files/openstack/etc/tempest/tempest.conf
+++ b/install-files/openstack/etc/tempest/tempest.conf
@@ -475,10 +475,10 @@ vnc_console = true
#
# Where the dashboard can be found (string value)
-dashboard_url = http://{{ CONTROLLER_HOST_ADDRESS }}/horizon
+dashboard_url = http://{{ CONTROLLER_HOST_ADDRESS }}
# Login page for the dashboard (string value)
-login_url = http://{{ CONTROLLER_HOST_ADDRESS }}/horizon/auth/login/
+login_url = http://{{ CONTROLLER_HOST_ADDRESS }}/auth/login/
[data_processing]
diff --git a/install-files/openstack/manifest b/install-files/openstack/manifest
index 8a609d7c..521b04ec 100644
--- a/install-files/openstack/manifest
+++ b/install-files/openstack/manifest
@@ -1,7 +1,5 @@
0040755 0 0 /etc/horizon
0100644 0 0 /etc/horizon/apache-horizon.conf
-0040755 0 0 /etc/horizon/openstack_dashboard
-0100644 0 0 /etc/horizon/openstack_dashboard/local_settings.py
template 0100644 0 0 /etc/tempest/tempest.conf
0040755 0 0 /usr/share/openstack
0100644 0 0 /usr/share/openstack/hosts
diff --git a/install-files/openstack/usr/share/openstack/horizon.yml b/install-files/openstack/usr/share/openstack/horizon.yml
index 14cea5c5..1fec4ab0 100644
--- a/install-files/openstack/usr/share/openstack/horizon.yml
+++ b/install-files/openstack/usr/share/openstack/horizon.yml
@@ -23,14 +23,13 @@
shell: /sbin/nologin
home: /var/lib/horizon
- - name: Create the /var folders for horizon
+ - name: Fix permissions in /var/lib/horizon
file:
- path: "{{ item }}"
+ path: /var/lib/horizon
state: directory
owner: horizon
group: horizon
- with_items:
- - /var/lib/horizon
+ recurse: yes
- name: Link horizon apache configuration
file: