summaryrefslogtreecommitdiffstats
path: root/docker/storperf-graphite/etc
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@dell.com>2017-08-23 16:54:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-23 16:54:40 +0000
commitb6abf16908da2c30878f0a0de0e3ef198b8f712f (patch)
treeb9ea14463956b39b3a2e5110e0b5a88ac435ade4 /docker/storperf-graphite/etc
parent6ca2c9387c41a5980af0f0d5aa1d24cd6c7fa94d (diff)
parentfc7ec1c0c73d2ecc52035634c8dd0ae6647273b1 (diff)
Merge "Graphite Standalone container"
Diffstat (limited to 'docker/storperf-graphite/etc')
-rw-r--r--docker/storperf-graphite/etc/nginx/conf.d/graphite37
-rw-r--r--docker/storperf-graphite/etc/nginx/nginx.conf20
-rw-r--r--docker/storperf-graphite/etc/supervisor.d/carbon.ini11
-rw-r--r--docker/storperf-graphite/etc/supervisor.d/gunicorn.ini13
-rw-r--r--docker/storperf-graphite/etc/supervisor.d/nginx.ini11
-rw-r--r--docker/storperf-graphite/etc/supervisord.conf26
6 files changed, 118 insertions, 0 deletions
diff --git a/docker/storperf-graphite/etc/nginx/conf.d/graphite b/docker/storperf-graphite/etc/nginx/conf.d/graphite
new file mode 100644
index 0000000..e4c405d
--- /dev/null
+++ b/docker/storperf-graphite/etc/nginx/conf.d/graphite
@@ -0,0 +1,37 @@
+server {
+ listen 8080;
+ server_name graphite;
+ charset utf-8;
+ # Django admin media.
+ location /graphite/static/admin/ {
+ alias /usr/lib/python2.7/site-packages/django/contrib/admin/static/admin/;
+ }
+
+ # Your project's static media.
+ location /graphite/static/ {
+ alias /opt/graphite/webapp/content/;
+ }
+
+ # Finally, send all non-media requests to the Django server.
+ location / {
+ proxy_pass http://127.0.0.1:8000;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Server $host;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header Host $host;
+
+ client_max_body_size 10m;
+ client_body_buffer_size 128k;
+
+ proxy_connect_timeout 90;
+ proxy_send_timeout 90;
+ proxy_read_timeout 90;
+
+ proxy_buffer_size 4k;
+ proxy_buffers 4 32k;
+ proxy_busy_buffers_size 64k;
+ proxy_temp_file_write_size 64k;
+ }
+}
diff --git a/docker/storperf-graphite/etc/nginx/nginx.conf b/docker/storperf-graphite/etc/nginx/nginx.conf
new file mode 100644
index 0000000..f2ab7f7
--- /dev/null
+++ b/docker/storperf-graphite/etc/nginx/nginx.conf
@@ -0,0 +1,20 @@
+worker_processes 1;
+pid /var/run/nginx.pid;
+daemon off;
+
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+ keepalive_timeout 65;
+
+ gzip on;
+
+ include /etc/nginx/conf.d/*;
+}
diff --git a/docker/storperf-graphite/etc/supervisor.d/carbon.ini b/docker/storperf-graphite/etc/supervisor.d/carbon.ini
new file mode 100644
index 0000000..fb93a95
--- /dev/null
+++ b/docker/storperf-graphite/etc/supervisor.d/carbon.ini
@@ -0,0 +1,11 @@
+[program:carbon-cache]
+autostart = true
+autorestart = true
+stdout_events_enabled = true
+stderr_events_enabled = true
+stdout_logfile_maxbytes = 1MB
+stdout_logfile_backups = 0
+stderr_logfile_maxbytes = 1MB
+stderr_logfile_backups = 0
+
+command = /opt/graphite/bin/carbon-cache.py --pidfile /var/run/carbon-cache-a.pid --debug start
diff --git a/docker/storperf-graphite/etc/supervisor.d/gunicorn.ini b/docker/storperf-graphite/etc/supervisor.d/gunicorn.ini
new file mode 100644
index 0000000..7a94ac8
--- /dev/null
+++ b/docker/storperf-graphite/etc/supervisor.d/gunicorn.ini
@@ -0,0 +1,13 @@
+[program:graphite-webapp]
+autostart = true
+autorestart = true
+stdout_events_enabled = true
+stderr_events_enabled = true
+stdout_logfile_maxbytes = 1MB
+stdout_logfile_backups = 0
+stderr_logfile_maxbytes = 1MB
+stderr_logfile_backups = 0
+
+directory = /opt/graphite/webapp
+environment = PYTHONPATH='/opt/graphite/webapp'
+command = /usr/bin/gunicorn -b127.0.0.1:8000 -w2 graphite.wsgi
diff --git a/docker/storperf-graphite/etc/supervisor.d/nginx.ini b/docker/storperf-graphite/etc/supervisor.d/nginx.ini
new file mode 100644
index 0000000..be2615c
--- /dev/null
+++ b/docker/storperf-graphite/etc/supervisor.d/nginx.ini
@@ -0,0 +1,11 @@
+[program:nginx]
+autostart = true
+autorestart = true
+stdout_events_enabled = true
+stderr_events_enabled = true
+stdout_logfile_maxbytes = 1MB
+stdout_logfile_backups = 0
+stderr_logfile_maxbytes = 1MB
+stderr_logfile_backups = 0
+
+command = /usr/sbin/nginx -c /etc/nginx/nginx.conf
diff --git a/docker/storperf-graphite/etc/supervisord.conf b/docker/storperf-graphite/etc/supervisord.conf
new file mode 100644
index 0000000..01799ab
--- /dev/null
+++ b/docker/storperf-graphite/etc/supervisord.conf
@@ -0,0 +1,26 @@
+[unix_http_server]
+file=/run/supervisord.sock
+
+[supervisord]
+user = root
+nodaemon = true
+logfile_maxbytes = 10MB
+logfile_backups = 0
+pidfile = /tmp/supervisord.pid
+logfile = /tmp/supervisord.log
+environment = GRAPHITE_STORAGE_DIR='/opt/graphite/storage',GRAPHITE_CONF_DIR='/opt/graphite/conf'
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
+
+[supervisorctl]
+serverurl=unix:///run/supervisord.sock
+
+[eventlistener:stdout]
+command = supervisor_stdout
+buffer_size = 100
+events = PROCESS_LOG
+result_handler = supervisor_stdout:event_handler
+
+[include]
+files = /etc/supervisor.d/*.ini