4559edf920
Remove all tasks and variables related to toggling between installation of horizon inside or outside of a Python virtual environment. Installing within a venv is now the only supported deployment. Additionally, a few changes have been made to make the creation of the venv more resistant to interruptions during a run of the role. * unarchiving a pre-built venv will now also occur when the venv directory is created, not only after being downloaded * virtualenv-tools is run against both pre-built and non pre-built venvs to account for interruptions during or prior to unarchiving Change-Id: I8f5d33b90cc2c41beca2067f0f99d8c1283021e4 Implements: blueprint only-install-venvs
62 lines
2.1 KiB
Django/Jinja
62 lines
2.1 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
{% set _wsgi_threads = ansible_processor_vcpus | default(2) // 2 %}
|
|
{% set wsgi_threads = _wsgi_threads if _wsgi_threads > 0 else 1 %}
|
|
|
|
{% if not horizon_external_ssl | bool %}
|
|
<VirtualHost *:80>
|
|
ServerName {{ horizon_server_name }}
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} !=on
|
|
RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R,L]
|
|
</VirtualHost>
|
|
{% endif %}
|
|
|
|
<VirtualHost *:{% if not horizon_external_ssl | bool %}443{% else %}80{% endif %}>
|
|
ServerName {{ horizon_server_name }}
|
|
|
|
LogLevel {{ horizon_log_level }}
|
|
ErrorLog /var/log/horizon/horizon-error.log
|
|
CustomLog /var/log/horizon/ssl_access.log {{ horizon_apache_custom_log_format }}
|
|
Options +FollowSymLinks
|
|
{% if not horizon_external_ssl | bool %}
|
|
SSLEngine on
|
|
SSLCertificateFile {{ horizon_ssl_cert }}
|
|
SSLCertificateKeyFile {{ horizon_ssl_key }}
|
|
{% if horizon_user_ssl_ca_cert is defined -%}
|
|
SSLCACertificateFile {{ horizon_ssl_ca_cert }}
|
|
{% endif -%}
|
|
SSLCompression Off
|
|
SSLProtocol All -SSLv2 -SSLv3
|
|
SSLHonorCipherOrder On
|
|
SSLCipherSuite {{ horizon_ssl_cipher_suite }}
|
|
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
|
{% else %}
|
|
RequestHeader set {{ horizon_secure_proxy_ssl_header }} "https"
|
|
{% endif %}
|
|
|
|
WSGIScriptAlias / {{ horizon_lib_wsgi_file }}
|
|
WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(wsgi_threads) }} threads={{ horizon_wsgi_threads | default(wsgi_threads) }} python-path={{ horizon_bin | dirname }}/lib/python2.7/site-packages
|
|
|
|
WSGIProcessGroup horizon
|
|
WSGIApplicationGroup horizon
|
|
|
|
<Directory {{ horizon_lib_wsgi_file | dirname }}>
|
|
<Files django.wsgi>
|
|
Order allow,deny
|
|
allow from all
|
|
Require all granted
|
|
</Files>
|
|
</Directory>
|
|
|
|
Alias /static {{ horizon_lib_dir }}/static/
|
|
|
|
<Directory {{ horizon_lib_dir }}/static/>
|
|
Options -FollowSymlinks
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|