This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# Supervisor Confator

Supervisor Confator (Config Creator) is a Python interface to generate supervisor configuration files.

Using Python dicts as input it creates a configuration file suitable for supervisor (and probably other applications also...).

## Why

At http://roi.com.au we have a lot of supervisor program sections and I was sick and tired of managing without variables for things like directories, executables (ie.. python, celery etc..).

## Limitations

Currently Supervisor Confator only supports program and group sections.

## Example

```#!python
sc = SupervisorConfator(program_options=dict(user='myuser'),
command_formats=dict(bin='/usr/bin/',
log_dir='/var/log/'))

sc.program('eggs', '{bin}eggs')

with sc.options(autorestart=False):
sc.program('sausage', '{bin}sausage --log-dir={log_dir}sausage.log')

with sc.group('mygroup', priority=999):
with sc.options(priority=998):
sc.program('silly', '{bin}silly')
sc.program('walks', '{bin}walks',
user='myotheruser',
process_name='%(program_name)s',
numprocs=1,
numprocs_start=0,
startsecs=1,
startretries=3,
exitcodes=[0,2],
stopsignal='TERM',
stopwaitsecs=10,
redirect_stderr=False,
stdout_logfile='AUTO',
stdout_logfile_maxbytes='50MB',
stdout_logfile_backups=10,
stdout_capture_maxbytes=0,
stdout_events_enabled=False,
stderr_logfile='AUTO',
stderr_logfile_maxbytes='50MB',
stderr_logfile_backups=10,
stderr_capture_maxbytes=0,
stderr_events_enabled=False,
directory='/path/to/myapp.com',
serverurl='AUTO',
autostart=False,
autorestart=False)

print sc.write()
```

Outputs the following;

```#!ini
[program:eggs]
command=/usr/bin/eggs
user=myuser

[program:sausage]
command=/usr/bin/sausage --log-dir=/var/log/sausage.log
user=myuser
autorestart=false

[program:silly]
command=/usr/bin/silly
user=myuser
priority=998

[program:walks]
command=/usr/bin/walks
user=myotheruser
process_name=%(program_name)s
autorestart=false
autostart=false
directory=/path/to/myapp.com
exitcodes=0,2
numprocs=1
numprocs_start=0
priority=998
redirect_stderr=false
serverurl=AUTO
startretries=3
startsecs=1
stderr_capture_maxbytes=0
stderr_events_enabled=false
stderr_logfile=AUTO
stderr_logfile_backups=10
stderr_logfile_maxbytes=50MB
stdout_capture_maxbytes=0
stdout_events_enabled=false
stdout_logfile=AUTO
stdout_logfile_backups=10
stdout_logfile_maxbytes=50MB
stopsignal=TERM
stopwaitsecs=10

[group:mygroup]
programs=silly,walks
priority=999
```

## Contributing

Contributions welcome - note that I plan to significantly change the API, see branch feature/context-api

### Setup

```#!bash
git clone https://github.com/alexhayes/supervisor-confator.git
cd supervisor-confator
git submodule init
git submodule update
mkvirtualenv supervisor-confator
pip install -r requirements
```

### Running Tests

```#!python
nosetests
```

## Thanks

Special thanks to http://roi.com.au for supporting this project.

## Author

Alex Hayes <alex@alution.com>
Release History

Release History

0.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
supervisor-confator-0.3.0.tar.gz (4.6 kB) Copy SHA256 Checksum SHA256 Source Oct 26, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting