Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the best way to run chef-client in specific intervals

Currently I am using open source chef and having number of nodes chef client is installed. I want the chef client to run in specific intervals. Any good cookbooks out there to configure it.

like image 584
user88975 Avatar asked Feb 26 '14 09:02

user88975


People also ask

What are phases of Chef execution?

There are two stages to a chef run though. A compile phase, to organise what resources need to be run and resolve all variables. Then a run phase where each resource is actually executed. You can write recipes that trigger actions during the compile phase which may make it seem out of order.

What is used to indicate the Chef client?

Ohai is a tool that is used to detect attributes on a node, and then provide these attributes to the chef-client at the start of every chef-client run. Ohai is required by the chef-client and must be present on a node. (Ohai is installed on a node as part of the chef-client install process.)


1 Answers

Yes, the official chef-client cookbook.

That's precisely one of the main points of using this cookbook.

If you just include the chef-client::default on your nodes' run_lists, it's going to run every 30 minutes. If you want something different, it's just a matter of adjusting node["chef_client"]["interval"] -- note that this is in seconds, and the default is 1800.

The cookbook's readme file lists all tuneable attributes.

like image 179
cassianoleal Avatar answered Sep 26 '22 08:09

cassianoleal