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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With