Usage and configuration of supervisord

Recommended Articles

We recommend to read the following articles before continuing with this tutorial.

What is supervisord?

Supervisord is a process manager that can be used to control scripts as a service. See http://supervisord.org/.

We offer this process manager with two options:

  • Option 1: Root360 configures the supervisor service to run the command you require

  • Option 2: You write and configure supervisord services yourself

To use supervisord, open a ticket and write us at service@root360.de what you need it for.

After we understand what you need, we install and configure supervisor on the needed systems using either option 1 or 2.

Details on Option 2: running services yourself

You are responsible for the configuration and correct functioning of your supervisor services!

Functionality

A supervisord service is started in the context of the user www-data. We set up supervisord to monitor a path where it will look for service configuration files.

Requirements for these configuration files are:

  • File suffix must be .conf

  • May only contain the configuration for [program] . See http://supervisord.org/configuration.html#program-x-section-settings.

  • Has only access to the webroot

  • May not spawn child processes as they are not controlled by default (add killasgroup=true and stopasgroup=true if needed)

  • May not depend on defining the option user as the service is always started as user www-data.

Supervisord is automatically restarted after each deployment, so that new and changed configuration for supervisord services can be imported and started.

Logging

Supervisord logs all output and errors to /var/log/application/supervisord_www-data/ on the instance on which it is running.

These logs, like all logs in /var/log/application/  are registered in the central log system and collected on the jump server (see also ).

Process control

All configured services and the supervisor can be controlled by the following command:  

sudo -u www-data supervisorctl -c /etc/supervisor/supervisord_www-data.conf

(For more information see http://supervisord.org/running.html#supervisorctl-command-line-options)

Related tutorials

Related components

 

 

E


root360 Knowledge Base - This portal is hosted by Atlassian (atlassian.com | Privacy Policy)