Skip to content
Browse files

remove dependency on apache/nginx by using native http from uwsgi

  • Loading branch information...
1 parent 9955657 commit abd062818f06d3f6c037babca16f8633aa18188f @wr0ngway committed Feb 8, 2013
View
62 templates/graphite/config/rubber/role/graphite_web/graphite-vhost.conf
@@ -1,62 +0,0 @@
-<%
- @path = '/etc/apache2/sites-available/graphite'
- @post = <<-SCRIPT
- a2ensite graphite
- SCRIPT
-%>
-
-# This needs to be in your server's config somewhere, probably
-# the main httpd.conf
-# NameVirtualHost *:80
-
-# This line also needs to be in your server's config.
-# LoadModule wsgi_module modules/mod_wsgi.so
-
-# You may need to manually edit this file to fit your needs.
-# This configuration assumes the default installation prefix
-# of /opt/graphite/, if you installed graphite somewhere else
-# you will need to change all the occurances of /opt/graphite/
-# in this file to your chosen install location.
-
-Listen <%= rubber_env.graphite_web_port %>
-<VirtualHost *:<%= rubber_env.graphite_web_port %>>
- ServerName <%= rubber_env.full_host %>
- DocumentRoot "/opt/graphite/webapp"
- ErrorLog /opt/graphite/storage/log/webapp/error.log
- CustomLog /opt/graphite/storage/log/webapp/access.log common
-
- # I've found that an equal number of processes & threads tends
- # to show the best performance for Graphite (ymmv).
- WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
- WSGIProcessGroup graphite
-
- # XXX You need to set this up!
- # Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
- # WSGISocketPrefix /var/run/apache2/
-
- # XXX You will need to create this file! There is a graphite.wsgi.example
- # file in this directory that you can safely use, just copy it to graphite.wgsi
- WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
-
- Alias /content/ /opt/graphite/webapp/content/
- <Location "/content/">
- SetHandler None
- </Location>
-
- # XXX In order for the django admin site media to work you
- # must change @DJANGO_ROOT@ to be the path to your django
- # installation, which is probably something like:
- # /usr/lib/python2.6/site-packages/django
- Alias /media/ "/usr/lib/pymodules/python2.6/django/contrib/admin/media/"
- <Location "/media/">
- SetHandler None
- </Location>
-
- # The graphite.wsgi file has to be accessible by apache. It won't
- # be visible to clients because of the DocumentRoot though.
- <Directory /opt/graphite/conf/>
- Order deny,allow
- Allow from all
- </Directory>
-
-</VirtualHost>
View
2 templates/graphite/config/rubber/role/graphite_web/uwsgi.ini
@@ -3,11 +3,11 @@
%>
[uwsgi]
+http=:<%= rubber_env.graphite_web_port %>
chdir=/opt/graphite/webapp
wsgi-file=/opt/graphite/conf/graphite.wsgi
master=True
pidfile=/var/run/graphite-web.pid
-socket=:3031
processes=4
die-on-term=True
vacuum=True
View
28 templates/graphite/config/rubber/role/nginx/graphite_web.conf
@@ -1,28 +0,0 @@
-<%
- @path = '/etc/nginx/rubber/graphite_web.conf'
-%>
-
-server {
- listen <%= rubber_env.graphite_web_port %>;
- server_name <%= rubber_env.full_host %>;
- access_log /var/log/graphite_web.log;
-
- location / {
- root /opt/graphite/webapp;
- uwsgi_pass 127.0.0.1:3031;
-
- uwsgi_param QUERY_STRING $query_string;
- uwsgi_param REQUEST_METHOD $request_method;
- uwsgi_param CONTENT_TYPE $content_type;
- uwsgi_param CONTENT_LENGTH $content_length;
- uwsgi_param REQUEST_URI $request_uri;
- uwsgi_param PATH_INFO $document_uri;
- uwsgi_param DOCUMENT_ROOT $document_root;
- uwsgi_param SERVER_PROTOCOL $server_protocol;
- uwsgi_param REMOTE_ADDR $remote_addr;
- uwsgi_param REMOTE_PORT $remote_port;
- uwsgi_param SERVER_ADDR $server_addr;
- uwsgi_param SERVER_PORT $server_port;
- uwsgi_param SERVER_NAME $server_name;
- }
-}
View
2 templates/graphite/config/rubber/rubber-graphite.yml
@@ -19,6 +19,6 @@ web_tools_proxies:
roles:
graphite_web:
- packages: [python-django, python-django-tagging, python-cairo, python-memcache, memcached, uwsgi, uwsgi-plugin-python, sqlite3, bzr, zip]
+ packages: [python-django, python-django-tagging, python-cairo, python-memcache, memcached, uwsgi, uwsgi-plugin-python, uwsgi-plugin-http, sqlite3, bzr, zip]
collectd:
packages: [libperl-dev]

0 comments on commit abd0628

Please sign in to comment.
Something went wrong with that request. Please try again.