Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would one build supervisord inside of a buildout?

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?

like image 297
chiggsy Avatar asked May 02 '10 04:05

chiggsy


1 Answers

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.

like image 134
Martijn Pieters Avatar answered Nov 16 '22 05:11

Martijn Pieters