Chef Load on reboot

I’m curious how must people configure Chef to run when a server is reboot on linux. Do you use rc or create some kind of service file?

David

Hello David,

I would use cron with @reboot in time field.

Kindest Regards.
Konstantin.

On Wed, May 13, 2015 at 3:23 AM, Hofmann, David David.Hofmann@am.sony.com
wrote:

I’m curious how must people configure Chef to run when a server is
reboot on linux. Do you use rc or create some kind of service file?

David

Am 12.05.2015 um 21:23 schrieb Hofmann, David David.Hofmann@am.sony.com:

I’m curious how must people configure Chef to run when a server is reboot on linux. Do you use rc or create some kind of service file?

It depends. Why do you want to do it?

When you start chef-client via cron’s @reboot directive, as mentioned by Konstantin, you may knock out your chef-server, if e.g. you are rebooting a couple of nodes (like after a power outage…).
It looks like you either want to run chef using the regular chef-client init.d/runit setup with a splay (see GitHub - chef-boneyard/chef-client: Development repository for Chef Client cookbook https://github.com/opscode-cookbooks/chef-client) or implicitly when deploying new instances (and apply a gate to limit the number of parallel request).

When my nodes reboot e.g. due to kernel upgrades, they usually don’t need an extra/immediate chef run… That’s why I’m curious about your scenario.

best regards
Roland