kolla-ansible/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
Jeffrey Zhang 89d38770ce Fix error in Gnocchi service
* mount gnocchi volume for gnocchi-api and gnocchi-statsd
* fix the failed of gnocchi-api
* use gnocchi user when running gnocchi-upgrade
* use the app.wsgi file in python path directly, rather than copy it to
  /var/www/cgi-bin/gnocchi/app file

TrivialFix

Change-Id: Ie026b8f44cd8e9703bf115cebb4e2d50b114a3a2
2016-09-29 12:06:15 +00:00

18 lines
764 B
Django/Jinja

{% set python_path = '/usr/lib/python2.7/site-packages' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ gnocchi_api_port }}
<VirtualHost *:{{ gnocchi_api_port }}>
ErrorLog "/var/log/kolla/gnocchi/gnocchi-api-error.log"
CustomLog "/var/log/kolla/gnocchi/gnocchi-api-access.log" combined
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess gnocchi group=gnocchi processes=5 threads=1 user=gnocchi python-path={{ python_path }}
WSGIProcessGroup gnocchi
WSGIScriptAlias / "{{ python_path }}/gnocchi/rest/app.wsgi"
<Directory "{{ python_path }}/gnocchi/rest">
Require all granted
</Directory>
</VirtualHost>