views:

90

answers:

1

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?

+4  A: 

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.

Martijn Pieters
Fully agreed. An @reboot cronjob that runs supervisor means zero-maintenance setups. Works great.
Reinout van Rees
*Slaps himself for forgetting about the crontab* It is crystal clear to me why it is done, and I also completely agree. Thank you.
chiggsy