aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorJeffrey Zhang <zhang.lei.fly@gmail.com>2016-09-29 01:14:19 +0800
committerJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-09-29 12:06:15 +0000
commit89d38770cebfdf537683c7a40ccc6c40ebd70e46 (patch)
tree476830e7d5c3e295e059a7ed189de6a4632baf41 /ansible
parent1432046728daf0814b381d231416711d89a01741 (diff)
downloadkolla-89d38770cebfdf537683c7a40ccc6c40ebd70e46.tar.gz
kolla-89d38770cebfdf537683c7a40ccc6c40ebd70e46.zip
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
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/gnocchi/tasks/start.yml2
-rw-r--r--ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j224
2 files changed, 10 insertions, 16 deletions
diff --git a/ansible/roles/gnocchi/tasks/start.yml b/ansible/roles/gnocchi/tasks/start.yml
index 98d54241c..d53ab979b 100644
--- a/ansible/roles/gnocchi/tasks/start.yml
+++ b/ansible/roles/gnocchi/tasks/start.yml
@@ -19,6 +19,7 @@
name: "gnocchi_metricd"
volumes:
- "{{ node_config_directory }}/gnocchi-metricd/:{{ container_config_directory }}/:ro"
+ - "gnocchi:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['gnocchi-metricd']
@@ -30,5 +31,6 @@
name: "gnocchi_statsd"
volumes:
- "{{ node_config_directory }}/gnocchi-statsd/:{{ container_config_directory }}/:ro"
+ - "gnocchi:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['gnocchi-statsd']
diff --git a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
index c6bc624c9..5d1317ec0 100644
--- a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
+++ b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
@@ -3,23 +3,15 @@ Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr
<VirtualHost *:{{ gnocchi_api_port }}>
- ## Vhost docroot
- DocumentRoot "/var/www/cgi-bin/gnocchi"
-
- ## Directories, there should at least be a declaration for /var/www/cgi-bin/gnocchi
+ 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 "/var/www/cgi-bin/gnocchi">
- Options Indexes FollowSymLinks MultiViews
- AllowOverride None
- Require all granted
+ <Directory "{{ python_path }}/gnocchi/rest">
+ Require all granted
</Directory>
- ## Logging
- ErrorLog "/var/log/kolla/gnocchi/gnocchi_wsgi_error.log"
- ServerSignature Off
- CustomLog "/var/log/kolla/gnocchi/gnocchi_wsgi_access.log" combined
- WSGIApplicationGroup %{GLOBAL}
- WSGIDaemonProcess gnocchi group=gnocchi processes=2 threads=2 user=gnocchi
- WSGIProcessGroup gnocchi
- WSGIScriptAlias / "/var/www/cgi-bin/gnocchi/app"
</VirtualHost>