Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Conversation

squarebracket
Copy link
Contributor

Changes from upstream:

  • Nginx/Gunicorn is now fully supported on both Debian and RedHat-like systems
  • The correct username/group is now used across apache/nginx for both Debian
    and RedHat
  • Pip is now the default provider for Django to ensure mutually-working package
    versions are installed.
  • Added initscripts for RedHat
  • Added workaround for race condition bug in graphite
  • Added configuration variable gr_web_server_remove_default -- default config is
    only wiped when the variable is true, or when it is undef and
    gr_web_server_port == 80
  • Renamed gr_apache_port and gr_apache_port_https to gr_web_server_port and
    gr_web_server_port respectively. If the old configuration values are used, puppet
    throws an error telling you to use the new ones. (If you don't want to bump a major
    version number for these changes, I can change it to a deprecation warning, but
    that's less elegant.)
  • Fixed resource chaining bug causing failure on Ubuntu 12.04.5
  • Added Compatbility Notes to README

Changes since fork that are in line with latest commits:

  • Default package versions of 0.9.15/1.5 for graphite/Django
  • Twisted is explicitly installed before txamqp (more reliable than simply reordering)
  • Added package python-tzlocal package for RedHat

To test the changes, I provisioned stock VMs with puppet and pip. I did two runs of
puppet apply per OS:

  1. include graphite
  2. class { 'graphite': gr_web_server => 'nginx', }

If I could display a metric in the Graphite Composer, then the test passed.

Now for all the caveats:

  • CentOS 6/7 requires a symlink from /usr/bin/pip-python to /usr/bin/pip (see:
    PUP-3829 for CentOS 6/7))
  • CentOS 7's default nginx.conf includes a server section listening on port 80.
    Thus, it is not possible to set up graphite without modifying the package-provided
    configuration file. I opted to do nothing about this; graphite will successfully,
    but the default server section has to be removed from nginx.conf. This needs
    to be noted somewhere in the README file.
  • These tests were done with SELinux disabled.
  • Debian is using the gunicorn-debian script, which calls gunicorn_django, which is deprecated.
  • Everything should be using python-cairocffi now, as it's what is recommended/required by graphite. However, Ubuntu 15.10's python-cairocffi package is broken (it tries to important somelib.so when the actual file is somelib.so.1), so I've kept all debian variants using python-cairo.
  • Ubuntu 15.10 requires a systemctl restart gunicorn after install

The following OS's were tested successfully:

  • CentOS 6.7
  • CentOS 7.2.1511
  • Debian 7.9
  • Debian 8.2
  • Ubuntu 12.04.5
  • Ubuntu 14.04.3
  • Ubuntu 15.10

The following OS's did not work:

  • Ubuntu 15.04
    The pip provider is broken (see PUP-4502

- Nginx/Gunicorn is now fully supported on both Debian and RedHat-like systems
- The correct username/group is now used across apache/nginx for both Debian
  and RedHat
- Pip is now the default provider for Django to ensure mutually-working package
  versions are installed.
- Added systemd scripts for when `$service_provider == 'systemd'`
- Added workaround for [race condition bug in graphite](graphite-project/graphite-web#403)
- Added configuration variable `gr_web_server_remove_default` -- default config is
  only wiped when the variable is true, or when it is `undef` and
  `gr_web_server_port` == 80
- Renamed `gr_apache_port` and `gr_apache_port_https` to `gr_web_server_port` and
  `gr_web_server_port` respectively. If the old configuration values are used, puppet
  fails telling you to use the new ones.
@squarebracket
Copy link
Contributor Author

Huh. Not sure why the tests are failing, as bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--color --format documentation' for me only gives warnings about case statements missing defaults and that I'm missing the metadata-json-lint gem.

@dwerder
Copy link
Member

dwerder commented Jan 15, 2016

We do not allow Warnings at the Linting part. So maybe you can add a Default to the case statements. Easiest way would be to just add something like:

   Default: {
     fail("$foobar is not supported.")
  }

Chuck Wilson added 2 commits January 18, 2016 01:18
- Nginx/Gunicorn is now fully supported on both Debian and RedHat-like systems
- The correct username/group is now used across apache/nginx for both Debian
  and RedHat
- Pip is now the default provider for Django to ensure mutually-working package
  versions are installed.
- Added RedHat initscripts
- Added workaround for [race condition bug in graphite](graphite-project/graphite-web#403)
- Added configuration variable `gr_web_server_remove_default` -- default config is
  only wiped when the variable is true, or when it is `undef` and
  `gr_web_server_port` == 80
- Renamed `gr_apache_port` and `gr_apache_port_https` to `gr_web_server_port` and
  `gr_web_server_port` respectively. If the old configuration values are used, puppet
  fails telling you to use the new ones.
- Fixed resource chaining bug causing failure on Ubuntu 12.04.5
- Added Compatbility Notes to README
- Nginx/Gunicorn is now fully supported on both Debian and
  RedHat-like systems
- The correct username/group is now used across apache/nginx for
  both Debian
  and RedHat
- Pip is now the default provider for Django to ensure
  mutually-working package
  versions are installed.
- Added RedHat initscripts
- Added workaround for [race condition bug in
  graphite](graphite-project/graphite-web#403)
- Added configuration variable `gr_web_server_remove_default` --
  default config is
  only wiped when the variable is true, or when it is `undef` and
  `gr_web_server_port` == 80
- Renamed `gr_apache_port` and `gr_apache_port_https` to
  `gr_web_server_port` and
  `gr_web_server_port` respectively. If the old configuration values are
  used, puppet fails telling you to use the new ones.
- Fixed resource chaining bug causing failure on Ubuntu 12.04.5
- Added Compatbility Notes to README
@squarebracket
Copy link
Contributor Author

All the rspec tests are passing now, I've fixed up a couple things here and there, and added some notes to the README. I updated the top comment.

@dwerder
Copy link
Member

dwerder commented Jan 18, 2016

Great commit. Thanks for the complete readme and the tests.

dwerder added a commit that referenced this pull request Jan 18, 2016
Nginx/Gunicorn support for RedHat and other small things
@dwerder dwerder merged commit bf7ed09 into echocat:develop Jan 18, 2016
@dwerder
Copy link
Member

dwerder commented Jan 18, 2016

Just one small last hint. Maybe you can add an axample for use of this module with nginx in the example section of the readme. Like this one: https://github.com/echocat/puppet-graphite#configuration-with-apache-24-and-cors

So its not necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants