Cookbook directory names

Hi,

is it acceptable to name cookbooks with the version included in the directory
name within the cookbook repo? for example /cookbooks/build-essential-1.4.2/
, for the build-essential cookbook.

after some simple testing, it seems that chef server will support this naming,
however chef-solo will not. could chef-solo parse such cookbooks?

Thanks.

One is curious as to why you would do this rather than just using the
version metadata to differentiate between versions?

--
Tara Hernandez
Senior Engineering Manager
Lithium Technologies
“I’m Hiring!” — http://tinyurl.com/kjju3jc

On 11/11/14, 12:00 PM, "Sam Darwin" samuel.d.darwin@gmail.com wrote:

Hi,

is it acceptable to name cookbooks with the version included in the
directory
name within the cookbook repo? for example
/cookbooks/build-essential-1.4.2/
, for the build-essential cookbook.

after some simple testing, it seems that chef server will support this
naming,
however chef-solo will not. could chef-solo parse such cookbooks?

Thanks.

why you would do this?

For chef-solo. So, chef server can store multiple versions of a cookbook,
based on metadata, and therefore it's not necessary in that case. With
chef-solo, you might at times like to alternate between two versions of
another cookbook, and since chef-solo can not simultaneously store
different cookbooks in a database, then having them in-parallel such as
qwerty-1.0.1 and qwerty-1.2.3 might be helpful. Apparently it can not
parse qwerty-1.2.3 though.

On Tue, Nov 11, 2014 at 9:02 PM, Tara Hernandez tara.hernandez@lithium.com
wrote:

One is curious as to why you would do this rather than just using the
version metadata to differentiate between versions?

--
Tara Hernandez
Senior Engineering Manager
Lithium Technologies
“I’m Hiring!” — http://tinyurl.com/kjju3jc

On 11/11/14, 12:00 PM, "Sam Darwin" samuel.d.darwin@gmail.com wrote:

Hi,

is it acceptable to name cookbooks with the version included in the
directory
name within the cookbook repo? for example
/cookbooks/build-essential-1.4.2/
, for the build-essential cookbook.

after some simple testing, it seems that chef server will support this
naming,
however chef-solo will not. could chef-solo parse such cookbooks?

Thanks.

I have not done this personally, but I believe you can do this via Berkshelf's "berks package” command — The berkshelf actually stores cookbooks in that format (-), without you having to do it explicitly in your repo. Might be worth checking out in any case…

Good luck!
-Tara

Tara Hernandez
Senior Engineering Manager
Lithium Technologies
“I’m Hiring!” — http://tinyurl.com/kjju3jc

From: Sam Darwin <samuel.d.darwin@gmail.commailto:samuel.d.darwin@gmail.com>
Date: Tuesday, November 11, 2014 at 12:25 PM
To: Tara Hernandez <tara.hernandez@lithium.commailto:tara.hernandez@lithium.com>
Cc: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Subject: Re: [chef] Re: cookbook directory names

why you would do this?

For chef-solo. So, chef server can store multiple versions of a cookbook, based on metadata, and therefore it's not necessary in that case. With chef-solo, you might at times like to alternate between two versions of another cookbook, and since chef-solo can not simultaneously store different cookbooks in a database, then having them in-parallel such as qwerty-1.0.1 and qwerty-1.2.3 might be helpful. Apparently it can not parse qwerty-1.2.3 though.

On Tue, Nov 11, 2014 at 9:02 PM, Tara Hernandez <tara.hernandez@lithium.commailto:tara.hernandez@lithium.com> wrote:
One is curious as to why you would do this rather than just using the
version metadata to differentiate between versions?

--
Tara Hernandez
Senior Engineering Manager
Lithium Technologies
“I’m Hiring!” — http://tinyurl.com/kjju3jc

On 11/11/14, 12:00 PM, "Sam Darwin" <samuel.d.darwin@gmail.commailto:samuel.d.darwin@gmail.com> wrote:

Hi,

is it acceptable to name cookbooks with the version included in the
directory
name within the cookbook repo? for example
/cookbooks/build-essential-1.4.2/
, for the build-essential cookbook.

after some simple testing, it seems that chef server will support this
naming,
however chef-solo will not. could chef-solo parse such cookbooks?

Thanks.

On Tuesday, November 11, 2014 at 12:25 PM, Sam Darwin wrote:

why you would do this?

For chef-solo. So, chef server can store multiple versions of a cookbook, based on metadata, and therefore it's not necessary in that case. With chef-solo, you might at times like to alternate between two versions of another cookbook, and since chef-solo can not simultaneously store different cookbooks in a database, then having them in-parallel such as qwerty-1.0.1 and qwerty-1.2.3 might be helpful. Apparently it can not parse qwerty-1.2.3 though.

We’ve made some changes in Chef 12 to support directory names like this, but there isn’t a mechanism for chef-solo to pick a preferred version from a directory containing multiple versions. For chef-solo, I’d recommend using a tool like berks to get you a set of cookbooks that work together (and you’ve tested together) and then ship them all together as an artifact.

--
Daniel DeLeo