supervisor
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| supervisor [2014/06/21 19:54] – kobe | supervisor [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Supervisor ====== | ||
| - | Supervisor e' uno strumento pratico e semplice per demonizzare dei normali processi // | ||
| - | |||
| - | In ''/ | ||
| - | |||
| - | Altri 2 parametri molto importanti sono '' | ||
| - | demone vero e proprio (che va settato per essere lanciato al boot della macchina). | ||
| - | |||
| - | Per cui se si fa un reboot del server, dovrebbe partire tutto in automatico: Supervisor + i processi che gestisce. | ||
| - | |||
| - | In sostanza e' come se ci fossero 2 livelli: | ||
| - | |||
| - | Demone init (SysV, systemd..) --> Supervisor --> gf_deploy | ||
| - | | ||
| - | |||
| - | ===== Utilizzo ===== | ||
| - | |||
| - | Dopo aver lanciato il demone Supervisor e aver aggiunto i relativi file di configurazione, | ||
| - | # supervisorctl reread | ||
| - | # supervisorctl update | ||
| - | |||
| - | Per vedere lo stato di un processo: | ||
| - | # supervisorctl status gf_deploy | ||
| - | |||
| - | Per entrare nella " | ||
| - | # supervisorctl | ||
| - | |||
| - | Prima di dare comandi, viene stampato lo stato di tutti i processi. | ||
| - | |||
| - | Per avviare a mano un processo: | ||
| - | # supervisorctl start gf_deploy | ||
| - | |||
| - | Per riavviare un processo: | ||
| - | # supervisorctl restart gf_deploy | ||
| - | |||
| - | Nota: una volta dato '' | ||
| - | lanciati in automatico se hanno impostato '' | ||
| - | |||
| - | ==== Esempio 1: WebUI di Deluge (client torrent) ==== | ||
| - | |||
| - | - ''/ | ||
| - | [program: | ||
| - | command = deluge-web -p 7000 | ||
| - | process_name = deluge-web | ||
| - | user = root | ||
| - | autostart = true | ||
| - | autorestart = true | ||
| - | redirect_stderr = true | ||
| - | |||
| - | ==== Esempio 2: Gasista Felice ==== | ||
| - | |||
| - | - ''/ | ||
| - | [program: | ||
| - | command = / | ||
| - | -b unix:/ | ||
| - | -w 10 | ||
| - | process_name = %(program_name)s | ||
| - | user = gf_deploy | ||
| - | group = gf_deploy | ||
| - | autostart = true | ||
| - | autorestart = true | ||
| - | stdout_logfile = / | ||
| - | redirect_stderr = true | ||
| - | |||
| - | - ''/ | ||
| - | #!/bin/bash | ||
| - | | ||
| - | export WORKON_HOME=/ | ||
| - | export DJHISTORY_HOME=/ | ||
| - | export PYTHONPATH=/ | ||
| - | | ||
| - | source / | ||
| - | workon gf-deploy | ||
| - | | ||
| - | cd / | ||
| - | / | ||
| - | |||
| - | Nota: quest' | ||
supervisor.1403380481.txt.gz · Last modified: 2014/10/28 11:28 (external edit)
