Is "knife cookbook upload" Atomic?

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
dennis.benzinger@sap.com

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.

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:

--John

On Tue, Aug 25, 2015 at 7:40 AM Benzinger, Dennis dennis.benzinger@sap.com
wrote:

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
dennis.benzinger@sap.com

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.

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 [mailto:jkeiser@chef.io]
Sent: Dienstag, 25. August 2015 17:25
To: chef@lists.opscode.com
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

On Tue, Aug 25, 2015 at 7:40 AM Benzinger, Dennis <dennis.benzinger@sap.commailto:dennis.benzinger@sap.com> wrote:
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
dennis.benzinger@sap.commailto:dennis.benzinger@sap.com

hybris GmbH
Nymphenburger Straße 86
80636 München, Germany
Fax +49 89 890 65 555
www.hybris.comhttp://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.

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 (About Cookbook Versioning 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 dennis.benzinger@sap.com 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 [mailto:jkeiser@chef.io]
Sent: Dienstag, 25. August 2015 17:25
To: chef@lists.opscode.com
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: Policyfiles: A Guided Tour - Chef Blog | Chef https://www.chef.io/blog/2015/08/18/policyfiles-a-guided-tour/

--John

On Tue, Aug 25, 2015 at 7:40 AM Benzinger, Dennis <dennis.benzinger@sap.com mailto:dennis.benzinger@sap.com> wrote:
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
dennis.benzinger@sap.com mailto:dennis.benzinger@sap.com

hybris GmbH
Nymphenburger Straße 86
80636 München, Germany
Fax +49 89 890 65 555
www.hybris.com http://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.

Use environment files with defined cookbook_versions {} attributes

Chris

From: Benzinger, Dennis [mailto:dennis.benzinger@sap.com]
Sent: Wednesday, August 26, 2015 9:37 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: Is “knife cookbook upload” Atomic ?

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 [mailto:jkeiser@chef.io]
Sent: Dienstag, 25. August 2015 17:25
To: chef@lists.opscode.commailto:chef@lists.opscode.com
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

On Tue, Aug 25, 2015 at 7:40 AM Benzinger, Dennis <dennis.benzinger@sap.commailto:dennis.benzinger@sap.com> wrote:
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
dennis.benzinger@sap.commailto:dennis.benzinger@sap.com

hybris GmbH
Nymphenburger Straße 86
80636 München, Germany
Fax +49 89 890 65 555
www.hybris.comhttp://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.

The command *berks apply *is an easy option for locking
environment cookbook version.

Berkflow is another option if you use environment cookbooks

On Thu, Aug 27, 2015 at 7:17 AM, Fouts, Chris Chris.Fouts@sensus.com
wrote:

Use environment files with defined cookbook_versions {} attributes

Chris

From: Benzinger, Dennis [mailto:dennis.benzinger@sap.com]
Sent: Wednesday, August 26, 2015 9:37 AM
To: chef@lists.opscode.com
Subject: [chef] RE: Re: Is "knife cookbook upload" Atomic ?

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 [mailto:jkeiser@chef.io jkeiser@chef.io]
Sent: Dienstag, 25. August 2015 17:25
To: chef@lists.opscode.com
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:
Policyfiles: A Guided Tour - Chef Blog | Chef

--John

On Tue, Aug 25, 2015 at 7:40 AM Benzinger, Dennis <
dennis.benzinger@sap.com> wrote:

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
dennis.benzinger@sap.com

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.

--
Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

Yes I use berks apply.

From: Yoshi Spendiff [mailto:yoshi.spendiff@indochino.com]
Sent: Thursday, August 27, 2015 3:35 PM
To: chef
Subject: [chef] Re: RE: RE: Re: Is “knife cookbook upload” Atomic ?

The command berks apply is an easy option for locking environment cookbook version.
Berkflow is another option if you use environment cookbooks

On Thu, Aug 27, 2015 at 7:17 AM, Fouts, Chris <Chris.Fouts@sensus.commailto:Chris.Fouts@sensus.com> wrote:
Use environment files with defined cookbook_versions {} attributes

Chris

From: Benzinger, Dennis [mailto:dennis.benzinger@sap.commailto:dennis.benzinger@sap.com]
Sent: Wednesday, August 26, 2015 9:37 AM
To: chef@lists.opscode.commailto:chef@lists.opscode.com
Subject: [chef] RE: Re: Is “knife cookbook upload” Atomic ?

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 [mailto:jkeiser@chef.io]
Sent: Dienstag, 25. August 2015 17:25
To: chef@lists.opscode.commailto:chef@lists.opscode.com
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

On Tue, Aug 25, 2015 at 7:40 AM Benzinger, Dennis <dennis.benzinger@sap.commailto:dennis.benzinger@sap.com> wrote:
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
dennis.benzinger@sap.commailto:dennis.benzinger@sap.com

hybris GmbH
Nymphenburger Straße 86
80636 München, Germany
Fax +49 89 890 65 555tel:%2B49%2089%20890%2065%20555
www.hybris.comhttp://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.


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.commailto:yoshi.spendiff@indochino.com