Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow user to run web app under mod_wsgi and allow user to specify a custom port for Apache vhost #16

Closed
wants to merge 44 commits into from
@Kami

This pull requests adds two features:

  • Allow user to specify a custom port for the Apache vhost (node[:graphite][:graphite_web][:port] attribute)
  • Add support for running webapp using mod_wsgi (node[:graphite][:graphite_web][:use_mod_wsgi] attribute)

People have been discouraged from using mod_python for years now (project is dead, bad performance, multiple bugs and issues, etc.), but this cookbook still uses it.

I added a new attribute which allows you to use this cookbook with mod_wsgi. Because mod_python is dead we should eventually fully remove support for mod_python. For now I kept the support there so people don't have problems with migrations.

dje and others added some commits
@dje dje initial graphite cookbook
9475e9f
@dje dje link to Graphite
a55245b
@bleything bleything rejigger default whisper schemas
 * adds Etsy's statsd schema with their recommended retentions
 * renames the default config to 'catchall' and sets the priority to 0
3f6a313
@dje dje add python-twisted dependency
6ac20e1
@dje dje Merge branch 'master' of https://github.com/bleything/dje_cookbooks i…
…nto bleything-master
e697d34
@dje dje graphite cookbook version bump
ea5aed0
@dje dje integrate ganglia and graphite
0a1e1e4
@dje dje version bump
6148905
@dje dje Document graphite/ganglia integration just a bit.
36e2179
@dje dje graphite listen on localhost by default
f1235cf
@dje dje graphite version bump
d8dca64
@luckymike luckymike Update to graphite version 0.9.9, allow ganglia web interface to run …
…as well as graphite.
b48fbf3
@luckymike luckymike Removed ganglia recipe. To setup graphite with ganglia see https://gi…
d8789df
@dje dje remove metadata.json
d9ed236
@dje dje set graphite admin password script
dc51133
@dje dje carbon cache upstart configuration
38dd8ca
@dje dje document graphite root password
c8a21d1
@dje dje tidy up
2341bf9
@dje dje set default graphite root password
efa8448
@dje dje update graphite.db for 0.9.9. this is still a weak idea.
7c33d78
@dje dje use upstart to control carbon-cache daemon process
45b7f41
@dje dje default root graphite password attribute
708ffac
@dje dje bump graphite cookbook version
1948e4e
@rkrol rkrol Set www-data as owner of /opt/graphite/storage/whisper directory to f…
…ix access problem
8f1cd35
@dje dje Merge pull request #1 from rkrol/master
Set www-data as owner on /opt/graphite/storage/whisper directory to fix access problem
7c8e715
@dje dje Bump version
b25c080
@dje dje convert to markdown
358eb54
@dje dje long description reference
5d21908
@fujin fujin carbon-cache: runit support
00b06a7
@webframp webframp Merge pull request #2 from heavywater/feature/carbon-cache-runit
Runit support
1a28316
@fujin fujin Add runit support, tune storage schemas
98bc7f3
Darrin Eden Merge pull request #3 from heavywater/feature/tuned-graphite
Extracted tuning from production deployment
5d12d67
@spazm

What does the new retention represent? Why the switch?

old:

60:565920 => minute data for 393 days.

new:

60:100800,900:6300 
  60:100800 => 60 seconds per data point for 100800 data points => 1 minute data for 70 days.
  900:6300 => 15 minutes per data point for 6300 data points => 15 minute data for 65.6 days.

We were experimenting with different values, it should really be attribute controlled.

@Kami

@heavywater ping. I'm pinging you because I see other pull requests without any feedback from you.

@jtimberman

@kami,

Pull request #18 implements the port attribute as node['graphite']['listen_port'].

However, mod_wsgi could be nifty.

@webframp webframp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2011
  1. @dje

    initial graphite cookbook

    dje authored
  2. @dje

    link to Graphite

    dje authored
Commits on Feb 24, 2011
  1. @bleything

    rejigger default whisper schemas

    bleything authored
     * adds Etsy's statsd schema with their recommended retentions
     * renames the default config to 'catchall' and sets the priority to 0
  2. @dje

    add python-twisted dependency

    dje authored
  3. @dje

    Merge branch 'master' of https://github.com/bleything/dje_cookbooks i…

    dje authored
    …nto bleything-master
  4. @dje

    graphite cookbook version bump

    dje authored
Commits on Mar 2, 2011
  1. @dje

    integrate ganglia and graphite

    dje authored
  2. @dje

    version bump

    dje authored
  3. @dje
Commits on Mar 6, 2011
  1. @dje
  2. @dje

    graphite version bump

    dje authored
Commits on Nov 10, 2011
  1. @luckymike
  2. @luckymike
Commits on Dec 3, 2011
  1. @dje

    remove metadata.json

    dje authored
  2. @dje
  3. @dje
  4. @dje

    document graphite root password

    dje authored
  5. @dje

    tidy up

    dje authored
  6. @dje
  7. @dje
  8. @dje
  9. @dje
  10. @dje

    bump graphite cookbook version

    dje authored
Commits on Jan 2, 2012
  1. @rkrol
Commits on Jan 9, 2012
  1. @dje

    Merge pull request #1 from rkrol/master

    dje authored
    Set www-data as owner on /opt/graphite/storage/whisper directory to fix access problem
  2. @dje

    Bump version

    dje authored
  3. @dje

    convert to markdown

    dje authored
  4. @dje

    long description reference

    dje authored
Commits on Jan 20, 2012
  1. @fujin

    carbon-cache: runit support

    fujin authored
  2. @webframp
Commits on Feb 15, 2012
  1. @fujin
  2. Merge pull request #3 from heavywater/feature/tuned-graphite

    Darrin Eden authored
    Extracted tuning from production deployment
Commits on Mar 25, 2012
  1. @smith

    Apache tweaks

    smith authored
  2. @smith
Commits on Mar 26, 2012
  1. @lusis

    making python version tunable

    lusis authored
  2. @lusis
  3. @dje

    Merge pull request #6 from lusis/python-flexibility

    dje authored
    Python flexibility
  4. @dje

    bump version

    dje authored
Commits on Apr 21, 2012
  1. @dje

    Merge pull request #4 from cramerdev/apache

    dje authored
    Apache tweaks
Commits on Apr 24, 2012
  1. @smith

    fix log storage paths

    smith authored
Commits on Apr 26, 2012
  1. @dje

    Merge pull request #7 from cramerdev/apache-log-path-fix

    dje authored
    fix log storage paths
  2. @dje

    Version bump

    dje authored
Commits on Sep 4, 2012
  1. @Kami

    Allow user to run graphite webapp under mod_wsgi if

    Kami authored
    node[:graphite][:graphite_web][:use_mod_wsgi] attribute is set to true.
  2. @Kami
This page is out of date. Refresh to see the latest.
1  attributes/graphite.rb
@@ -9,6 +9,7 @@
default[:graphite][:graphite_web][:uri] = "http://launchpadlibrarian.net/82112308/graphite-web-#{node[:graphite][:version]}.tar.gz"
default[:graphite][:graphite_web][:checksum] = "cc78bab7fb26b"
+default[:graphite][:graphite_web][:port] = 80
default[:graphite][:graphite_web][:use_mod_wsgi] = false
default[:graphite][:carbon][:line_receiver_interface] = "127.0.0.1"
6 templates/default/graphite-vhost-mod-wsgi.conf.erb
@@ -4,7 +4,11 @@
# you will need to change all the occurances of /opt/graphite/
# in this file to your chosen install location.
-<VirtualHost *:80>
+<% if node[:graphite][:graphite_web][:port] != 80 && node[:graphite][:graphite_web][:port] != 443 %>
+Listen <%= node[:graphite][:graphite_web][:port] %>
+<% end %>
+
+<VirtualHost *:<%= node[:graphite][:graphite_web][:port] %>>
DocumentRoot /opt/graphite/webapp
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
4 templates/default/graphite-vhost.conf.erb
@@ -8,6 +8,10 @@
# you will need to change all the occurances of /opt/graphite/
# in this file to your chosen install location.
+<% if node[:graphite][:graphite_web][:port] != 80 && node[:graphite][:graphite_web][:port] != 443 %>
+Listen <%= node[:graphite][:graphite_web][:port] %>
+<% end %>
+
<VirtualHost *:80>
ServerName <%= node[:graphite][:url] %>
DocumentRoot "/opt/graphite/webapp"
Something went wrong with that request. Please try again.