Opened 6 years ago

Last modified 6 years ago

#860 new enhancement

supervisor control files

Reported by: Guillaume Hayot Owned by:
Priority: minor Milestone:
Component: documentation Keywords: supervisor process celeryd paster
Cc: Parent Tickets:

Description

In the Considerations for Production Deployments, there are a few distribution specific init scripts mentionned. Here's a more cross-system one, using Supervisor, a process control system. On Debian, it's more reliable than joar's MediaGoblin init scripts, as it doesn't fail at restarting them.

I suggest to add the following "init method" for Debian in the documentation mentionned above.

The Paster FCGI server supervisor file, with MediaGoblin's documentation paths.

[program:mediagoblin-paster]
command = /srv/mediagoblin.example.org/mediagoblin/bin/paster serve /srv/mediagoblin.example.org/mediagoblin/paste_local.ini --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
directory = /srv/mediagoblin.example.org/mediagoblin
user = mediagoblin
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/mediagoblin-paster.log
stderr_logfile = /var/log/supervisor/mediagoblin-paster_err.log
environment = CELERY_ALWAYS_EAGER=false

The Celery task processor supervisor file, with MediaGoblin's documentation paths.

[program:mediagoblin-celeryd]
command = /srv/mediagoblin.example.org/mediagoblin/bin/celeryd
directory = /srv/mediagoblin.example.org/mediagoblin
user = mediagoblin
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/mediagoblin-celeryd.log
stderr_logfile = /var/log/supervisor/mediagoblin-celeryd_err.log
environment = CELERY_CONFIG_MODULE="mediagoblin.init.celery.from_celery"

I'm not a supervisor-guru, I just followed these Section Values in supervisor's configuration documentation, so anyone is free to improve it, of course !

Subtickets

Change History (1)

comment:1 Changed 6 years ago by Sebastian Hugentobler

That's about what I ended up with for my Mediagoblin instance (Debian Wheezy) and it is working really well (now running for about 8 months with it).

Note: See TracTickets for help on using tickets.