[chef] Re: Is "knife cookbook upload" Atomic ?


Chronological Thread 
  • From: Tom Duffield < >
  • To:
  • Subject: [chef] Re: Is "knife cookbook upload" Atomic ?
  • Date: Wed, 26 Aug 2015 09:04:05 -0500

Hey Dennis, 
Outside of Policyfiles the best way to make sure your chef-client is downloading the version of the cookbook you want is by versioning your cookbooks and specifying version constraints in the appropriate place for your situation (https://docs.chef.io/cookbook_versions.html#). Commonly people do this either in their cookbooks metadata.rb (for dependencies) or in an environment file. 

Tom

On Aug 26, 2015, at 8:36 AM, Benzinger, Dennis < " class=""> > wrote:

Hello John,
 
Policyfiles are a relatively new feature. What did people do in older Chef versions?

I see two options:
-          Stop the Chef clients, upload cookbooks and start them again
-          Block connection from the Chef clients e.g. on a firewall
 
 
Thanks,
Dennis
 
From: John Keiser [ " class="">mailto: ] 
Sent: Dienstag, 25. August 2015 17:25
To:  " class="">
Subject: [chef] Re: Is "knife cookbook upload" Atomic ?
 
Hi!
 
knife cookbook upload will atomically switch individual cookbooks, but won't switch out whole sets of cookbooks.
 
Policyfiles are almost certainly what you are looking for here: assign a policy to your node, and it will lock down to an exact set of cookbooks (and atomically switch from one set to another). You can learn more about Policyfile here: https://www.chef.io/blog/2015/08/18/policyfiles-a-guided-tour/
 
--John
 
Hello List,

we are wondering what will happen if a Chef client is starting and at the same
time new cookbooks are uploaded.

Is it guaranteed that the client will either use all old or all new cookbooks?

Or could it happen that it uses a new version of cookbook A but an old version
of cookbook B because the second one was not uploaded yet when the client
started ?


Thanks,
Dennis

--

Dennis Benzinger
IT Architecture Senior Specialist
hybris Cloud Services
" target="_blank" style="color: purple; text-decoration: underline;" class="">

hybris GmbH
Nymphenburger Straße 86
80636 München, Germany
Fax +49 89 890 65 555
www.hybris.com
hybris GmbH, Nymphenburger Str. 86, 80636 München, Deutschland.
Geschäftsführer: Ariel F. Lüdi, Carsten Thoma, Michael Zips.
Amtsgericht München, HRB 124384.




Archive powered by MHonArc 2.6.16.

§