문제

I've seen buildout recipes that build supervisor into the buildout, I suppose to control the daemons inside. However, it seems to me that one would still need something in /etc/init.d ( for example ) to run said supervisor instance on boot.

So, why build supervisor inside the buildout? Why not install it system wide and just make a config file for the daemons involved inside?

도움이 되었습니까?

해결책

When we create a buildout for a customer, we want that buildout to run on arbitrary hosting environments with minimal dependencies, all satisfiable with system packages. By including supervisord in the buildout, we eliminate the need for it to be installed system-wide and can tweak it's parameters finely, without having to ask a system admin to change settings for us.

It's easy to get supervisor to run at boot time from a buildout, using the usercrontab recipe:

[supervisor-cron]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord -c ${buildout:directory}/etc/supervisord.conf

The above part will add an entry to the crontab that causes supervisor to run at boot time.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top