mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-06 10:25:23 +00:00
Update graphite states
This commit is contained in:
parent
e72a564824
commit
380f8a034a
@ -1,2 +1,8 @@
|
||||
include:
|
||||
- gentoo.makeconf
|
||||
|
||||
dev-python/carbon:
|
||||
pkg.latest
|
||||
pkg.installed:
|
||||
- version: ">=1.1.3-r1"
|
||||
- require:
|
||||
- augeas: manage-make-conf
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<uwsgi>
|
||||
<plugins>python27</plugins>
|
||||
<master/>
|
||||
<single-interpreter/>
|
||||
<!-- TODO: take number of processes from some variable -->
|
||||
<processes>${processes}</processes>
|
||||
<socket>${socket}</socket>
|
||||
% if # startswith?
|
||||
<chown-socket>nginx:nginx</chown-socket>
|
||||
<chmod-socket>640</chmod-socket>
|
||||
% endif
|
||||
<user>carbon</user>
|
||||
<uid>carbon</uid>
|
||||
<chdir>/etc/%n</chdir>
|
||||
<harakiri>120</harakiri>
|
||||
<post-buffering>8192</post-buffering>
|
||||
<post-buffering-bufsize>65536</post-buffering-bufsize>
|
||||
<env>DJANGO_SETTINGS_MODULE=graphite.settings</env>
|
||||
<module>wsgi</module>
|
||||
</uwsgi>
|
@ -1,10 +1,13 @@
|
||||
{% set uwsgi_conf = salt['pillar.get']('graphite-web:uwsgi', {}) %}
|
||||
{% set uwsgi_plugins = uwsgi_conf.get('plugins', 'python36') %}
|
||||
{% set uwsgi_processes = uwsgi_conf.get('processes', salt['grains.get']('num_cpus', 2)) %}
|
||||
include:
|
||||
- python.dev-python.django-tagging
|
||||
- uwsgi
|
||||
|
||||
net-analyzer/graphite-web:
|
||||
pkg.installed:
|
||||
- version: '~>=0.9.13-r3[carbon,memcached,mysql]'
|
||||
- version: '~>=1.1.3-r1[carbon,memcached,mysql]'
|
||||
- require:
|
||||
- pkg: dev-python/django-tagging
|
||||
|
||||
@ -23,10 +26,26 @@ net-analyzer/graphite-web:
|
||||
- user: root
|
||||
- group: root
|
||||
|
||||
/etc/uwsgi.d/graphite-web.xml:
|
||||
/etc/uwsgi.d/graphite-web.ini:
|
||||
file.managed:
|
||||
- source: salt://graphite/files/uwsgi.xml.tpl
|
||||
- template: mako
|
||||
- mode: 644
|
||||
- user: root
|
||||
- group: root
|
||||
- contents: |
|
||||
[uwsgi]
|
||||
plugins={{ uwsgi_plugins }}
|
||||
master=true
|
||||
single-interpreter=true
|
||||
processes={{ uwsgi_processes }}
|
||||
harakiri=120
|
||||
post-buffering=8192
|
||||
post-buffering-bufsize=65536
|
||||
socket=/run/%n.sock
|
||||
# TODO: take number of processes from some variable
|
||||
chown-socket=nginx:nginx
|
||||
chmod-socket=640
|
||||
user=carbon
|
||||
uid=carbon
|
||||
chdir=/etc/%n
|
||||
env=DJANGO_SETTINGS_MODULE=graphite.settings
|
||||
module=wsgi
|
||||
|
3
sls/graphite/init.sls
Normal file
3
sls/graphite/init.sls
Normal file
@ -0,0 +1,3 @@
|
||||
include:
|
||||
- graphite.carbon-cache
|
||||
- graphite.graphite-web
|
Loading…
Reference in New Issue
Block a user