2013-10-19 10:37:30 -04:00
mercy
=====
A puppet module for installing the Mercy Flask application
Requirements
============
This puppet module assumes that you have:
2013-10-19 17:59:56 -04:00
* A RabbitMQ broker that we can use for Celery tasks
2013-10-19 22:28:46 -04:00
* Working apache on localhost, with mod_wsgi enabled and with a puppet service we can notify
2013-10-19 17:59:56 -04:00
* Working python 2.7 and pip on localhost
2013-10-19 10:37:30 -04:00
* Working postgres with a username, password, and database for mercy to use
Aside from that, the module has no dependencies.
Usage
=========
2013-10-19 17:59:56 -04:00
class { 'mercy':
# ---- These are required, they have no defaults
2013-10-19 22:28:46 -04:00
environment => 'dev|production',
version => 'absent|latest|MAJOR-MINOR',
ensure => 'running|stopped'.
rabbitmq_uri => 'RABBITMQ_BROKER_URI',
2013-10-19 17:59:56 -04:00
# ---- Everything below is optional
2013-10-19 22:28:46 -04:00
process_user => 'mercy',
process_group => 'mercy',
process_threads => 5,
servername => $::fqdn,
rabbitmq_user => 'mercy',
rabbitmq_pw => 'mercy',
rabbitmq_vhost => 'mercy',
vhost_dir => '/etc/apache/httpd/conf.d',
apache_service => 'httpd',
port => 443,
postgres_uri => 'localhost',
postgres_user => 'mercy',
postgres_pw => 'mercy',
postgres_db => 'mercy'
2013-10-19 10:37:30 -04:00
}
If 'environment' is dev, then the mercy application will be installed via a tarball located in ./mercy/files/mercy-${ensure}.tar.gz. If 'environment' is production, then mercy will be installed via pip and ensured at the given version.
Events
======
This puppet module will notify your apache service whenever the vhost is modified, or the mercy application version is updated, since an apache graceful restart will be required in either case.