Merge lp://staging/~bloodearnest/charms/trusty/gunicorn/use-config-file into lp://staging/charms/trusty/gunicorn

Proposed by Simon Davy
Status: Work in progress
Proposed branch: lp://staging/~bloodearnest/charms/trusty/gunicorn/use-config-file
Merge into: lp://staging/charms/trusty/gunicorn
Diff against target: 761 lines (+322/-174)
9 files modified
config.yaml (+29/-1)
hooks/hooks.py (+55/-27)
hooks/tests/test_hooks.py (+39/-26)
hooks/tests/test_template.py (+147/-87)
metadata.yaml (+3/-3)
revision (+1/-1)
templates/config.tmpl (+40/-0)
templates/runner.tmpl (+6/-0)
templates/upstart.tmpl (+2/-29)
To merge this branch: bzr merge lp://staging/~bloodearnest/charms/trusty/gunicorn/use-config-file
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+272126@code.staging.launchpad.net

Commit message

Use a config file rather than embedding cli args in the upstart job, and add support for open-port, better default work config, and explit error_log config

Description of the change

Use a config file rather than embedding cli args in the upstart job.

This enables graceful reloads, and allows for a helper script that can run the configured gunicorn in the foreground for debugging.

To support this a new config is introduced: wsgi_extra_confg, which s a new line separate python fragment to be put in a config file. The old wsgi_extra cli args are still supported, but moved to wsgi_cli. The previous wsgi_extra config acts as an alias for this new config, so the charm is safe to upgrade without adjusting to the new format.

Additionally:

1) change default workers to cpu*2 +1, as per docs
2) open-port
3) explicit error log config
4) allow explict gunicorn path, rather than system gunicorn. Enables venvs.

To post a comment you must log in.
34. By Canonical IS Robot

add missing template

35. By Canonical IS Robot

fix python_path typo

36. By Canonical IS Robot

use gunicorns support for env vars

37. By Canonical IS Robot

clean up white space

Unmerged revisions

37. By Canonical IS Robot

clean up white space

36. By Canonical IS Robot

use gunicorns support for env vars

35. By Canonical IS Robot

fix python_path typo

34. By Canonical IS Robot

add missing template

33. By Canonical IS Robot

refactor to use config file rather than cli args

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches