Opened 10 years ago

Closed 3 years ago

#860 closed enhancement (no-action)

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 !

Change History (2)

comment:1 by Sebastian Hugentobler, 10 years ago

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).

comment:2 by Ben Sturmfels, 3 years ago

Resolution: no-action-required
Status: newclosed

Closing this old ticket - no longer relevant due to old FCGI deployment method.

Note: See TracTickets for help on using tickets.