Use horizon native wsgi app
The only difference between our and native wsgi app were adding extra path [1] to sys.path. However, nowadays this path is already part of syspath [1] /openstack/venvs/horizon-20.1.1.dev7/lib/python3.6 Change-Id: I90a502fbdeb0040832b66e9df389ab3517b951f4
This commit is contained in:
parent
a650a7fe22
commit
9678045a70
@ -149,7 +149,7 @@ horizon_help_url: https://docs.openstack.org/horizon/latest/user/
|
|||||||
|
|
||||||
## Installation directories
|
## Installation directories
|
||||||
horizon_lib_dir: "{{ _horizon_lib_dir }}"
|
horizon_lib_dir: "{{ _horizon_lib_dir }}"
|
||||||
horizon_lib_wsgi_file: "{{ horizon_lib_dir }}/openstack_dashboard/wsgi/django.wsgi"
|
horizon_lib_wsgi_file: "{{ horizon_lib_dir }}/openstack_dashboard/wsgi.py"
|
||||||
|
|
||||||
horizon_endpoint_type: internalURL
|
horizon_endpoint_type: internalURL
|
||||||
|
|
||||||
|
@ -59,16 +59,6 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- { src: "/etc/horizon/local_settings.py", dest: "{{ horizon_lib_dir }}/openstack_dashboard/local/local_settings.py" }
|
- { src: "/etc/horizon/local_settings.py", dest: "{{ horizon_lib_dir }}/openstack_dashboard/local/local_settings.py" }
|
||||||
|
|
||||||
- name: Setup Horizon config(s)
|
|
||||||
template:
|
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
owner: "{{ horizon_system_user_name }}"
|
|
||||||
group: "{{ horizon_system_group_name }}"
|
|
||||||
with_items:
|
|
||||||
- { src: "horizon_django.wsgi.j2", dest: "{{ horizon_lib_wsgi_file }}" }
|
|
||||||
notify: Restart apache2
|
|
||||||
|
|
||||||
- name: Create customization module directory
|
- name: Create customization module directory
|
||||||
file:
|
file:
|
||||||
path: "{{ horizon_lib_dir }}/horizon_customization"
|
path: "{{ horizon_lib_dir }}/horizon_customization"
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
import logging
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
# Add this file path to sys.path in order to import settings
|
|
||||||
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')))
|
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
|
|
||||||
sys.stdout = sys.stderr
|
|
||||||
|
|
||||||
DEBUG = False
|
|
||||||
|
|
||||||
application = get_wsgi_application()
|
|
Loading…
Reference in New Issue
Block a user