Skip to content

Install supervisord in EC2

Arnau Sanchez edited this page Jun 21, 2017 · 1 revision

Supervisord is an open source process management system. Processes that crash for any reason are restarted.

Setup

Setup for EC2 Amazon Linux: https://gist.github.com/hilios/b4974ad4b7771571705e6d0830c67119

Main configuration file:

File /etc/supervisord.conf.

Full configuration example: https://gist.github.com/tsabat/1528270

Reload after configuration changes:

$ sudo service supervisord reload

Services configuration:

Write configuration files in /etc/supervisord.d/ with ini extension.

Get list of available services:

$ sudo supervisorctl avail
dhis225-psi                      in use    manual    999:999
dhis226-nrc                      in use    manual    999:999
firews                           in use    manual    999:999

Start a service (or services):

$ sudo supervisorctl start firews dhis225-psi
firews: started

Get status of all services:

$ sudo supervisorctl status
dhis225-psi                      RUNNING   pid 6098, uptime 0:03:05
dhis226-nrc                      STOPPED   Not started
firews                           RUNNING   pid 6037, uptime 0:04:50

Stop a service (or services):

$ sudo supervisorctl stop firews
firews: stopped