/ubuntu-supervisor-configuration

How to install and configure Supervisor using pip on Ubuntu 14.04.x || 16.04.x.

Primary LanguageShell

Tutorial how to install Supervisor on Ubuntu 14.04/16.04 (LTS versions) using pip

Build Status

1) Install pip and supervisor:

[sudo] pip install --upgrade pip
sudo pip install --upgrade supervisor

2) Add init script from this repository:

sudo curl https://raw.githubusercontent.com/illagrenan/ubuntu-supervisor-configuration/master/supervisor.sh > /etc/init.d/supervisor

💡 Before executing this command, you should review supervisor.sh

3) Add ‚execute‘ permission:

sudo chmod +x /etc/init.d/supervisor

4) Schedule:

sudo update-rc.d supervisor defaults

5) Create main configuration file

You have two options: 5A) Use configuration file from this repository OR 5B) Use standard supervisor configuration file.

5A)

Do not forget to follow steps 6)+7)

mkdir -p /etc/supervisor/
sudo curl https://raw.githubusercontent.com/illagrenan/ubuntu-supervisor-configuration/master/supervisord.conf > /etc/supervisor/supervisord.conf

5B)

Skip steps 6)+7)

echo_supervisord_conf > /etc/supervisord.conf

(only for 5A) 6) Create log and conf directories:

mkdir -p /var/log/supervisor
mkdir -p /etc/supervisor/conf.d/

(only for 5A) 7) Create new group:

See chown=root:supervisor in configuration.

groupadd supervisor

8) Fix supervisorctl

More info here: http://stackoverflow.com/a/17036409/752142

ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf

9) Use it:

service supervisor stop
service supervisor start

Resources