Add support for deploying Horizon with Skyline

We change a default value of `horizon_webroot` to reflect the usecase
where both Horizon and Skyline are deployed. When it is the case,
horizon webroot URL will be changed to `/horizon`.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/859446
Change-Id: Ia38311a6fde88292c090cf6289bf5b6c6279c479
This commit is contained in:
Dmitriy Rabotyagov 2024-03-15 18:54:21 +01:00
parent a57aeff938
commit 4f96a58bb8
3 changed files with 16 additions and 3 deletions

View File

@ -426,7 +426,9 @@ horizon_custom_themes: {}
# value is the theme_name from the vars above
horizon_default_theme: "default"
horizon_webroot: /
# URI through which Horizon will be available.
# If Skyline is not deployed defaults to `/`, `/horizon` otherwise.
horizon_webroot: "{{ (groups['skyline_all'] | default([])) | ternary('/horizon', '/') }}"
horizon_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"

View File

@ -0,0 +1,11 @@
---
fixes:
- |
Change of ``horizon_webroot`` variable is now respected and will be
reflected in Apache configuration to serve static files and define
wsgi path accordingly.
features:
- |
Horizon is now co-installabe with Skyline dashboard. In case both
Horizon and Skyline are deployed, Horizon will be served by
`/horizon` URI.

View File

@ -48,7 +48,7 @@ Listen {{ horizon_bind_address }}:{{ horizon_listen_port }}
RequestHeader set {{ horizon_secure_proxy_ssl_header }} "http"
{% endif %}
WSGIScriptAlias / {{ horizon_lib_wsgi_file }}
WSGIScriptAlias {{ horizon_webroot }} {{ horizon_lib_wsgi_file }}
WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(horizon_wsgi_threads) }} threads={{ horizon_wsgi_threads }} python-path={{ horizon_lib_dir | dirname }}/site-packages
WSGIProcessGroup horizon
@ -66,7 +66,7 @@ Listen {{ horizon_bind_address }}:{{ horizon_listen_port }}
</Files>
</Directory>
Alias /static {{ horizon_lib_dir }}/static/
Alias {{ horizon_webroot }}/static {{ horizon_lib_dir }}/static/
<Directory {{ horizon_lib_dir }}/static/>
Options -FollowSymlinks