狠狠撸

狠狠撸Share a Scribd company logo
Supervisord???????????!
1
??
???????????????????supervisord???????
?????????.
??????????supervisord??????daemon????
?????tool??.
2
???
?????????????.
$ sudo apt-get install supervisor
3
supervisord??????
??????????.
$ sudo service supervisor start
$ sudo service supervisor status
4
???
$ supervisorctl help
5
supervisorconf???
$ supervisorctl reread
6
????
spv.conf ????????????.
[program:webhook]
command=/usr/bin/node /srv/http.js # ???
directory=/srv # ?? ????
autostart=yes
autorestart=yes
startretries=3 # Fail? ?? ?? ???? ?????
sterr_logfile=/var/log/webhook/webhook.err.log
stdout_logfile=/var/log/webhook/webhook.log
user=www-data # ?? user
environment=SECRET_PASSWORD='this is secret',SECRET_TWO='anothe
7
????????
?????? webhook ???????.
$ supervisorctl start webhook
8
supervisor??????
$ supervisorctl status
9
processoutputtail
supervisorctl?????
> tail -f webhook
10
?????
n?nobackgroundprocess
edebug??????
c?conf??
$ supervisord -n -edebug -c supervisord.conf
11
WebUI
http://localhost:23233/????UI??????
12
????????
13
????
supervisord?RPCAPI?????crashreport????,sms,????
??????????.
14
????
ProcessMonitoringwithSupervisord
ChrisMcDonough?UsingSupervisorForFunAndProfit?PyCon
2015
15

More Related Content