[chef] Re: RE: chef-client , apply role


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: RE: chef-client , apply role
  • Date: Tue, 7 Jan 2014 12:27:42 -0800


On Tuesday, January 7, 2014 at 11:32 AM, Stephen Corbesero wrote:


There were many responses to this, but I want to get back to the original question.

Is there a way to just get a node into a role, but not have go through that role's run list?

The use case I am thinking of is provisioning a new node. Sometimes the very first chef run fails. If we could get the node into its correct role, and chef-client running as a cron job or service, the node will eventually converge.
This depends on how you provision. If you’re doing one-at-a-time provisioning with `knife CLOUD create`, then for now your best option is to run `chef-client -j /etc/chef/first-boot.json` any time the provisioning fails, which re-runs chef the way it was run the first time. This obviously isn’t great so for the future we’re looking at modifying the way provisioning happens to create the node object up-front on the server. We have a couple of prototypes of this written already.

If you have a more custom provisioning setup, then you might be able to modify your provisioning logic to do this. If you’re using enterprise chef (hosted or on-premises), then you need to also create the client object up-front as well. You can use this code as a reference: https://github.com/opscode/bootstrapper/

HTH,

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§