[chef] Re: Re: Re: Re: RE: Cookbook Management for Complex Infrastructure


Chronological Thread 
  • From: AJ Christensen < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: RE: Cookbook Management for Complex Infrastructure
  • Date: Tue, 21 Jul 2015 00:19:57 +0000

Here's a Berksfile [0] based on one we use (at Pantheon) which is now the result of a migration to cookbook-per-repository on a dedicated cookbooks organization. You can make use of two loops when transitioning. We called our monolithic infrastructure cookbooks directory site-cookbooks, like a throwback to the old times!

Hope this helps?

cheers,


On Tue, Jul 21, 2015 at 11:44 AM William Jimenez < "> > wrote:
There are benefits to both models, but I haven't seen any issues with tools used in Chef development with either approach, so that shouldn't be a constraint to the decision. Many notable organizations have multiple cookbooks per repo (aka monolithic repo), Facebook comes to mind in this regard.

You can sort of have your cake and eat it too buy treating each cookbook as it's own independent object, but still putting each in the one repository in their own directory. In your Berksfiles you can specify the rel: keyword to use a specific directory in the git repo for each cookbook if you need to.

Depends on if you want to go for the 'monolithic' or isolated cookbook method. Being able to test each cookbook in isolation is certainly an advantage.

I think Policyfiles have some sort of dependency mapper/puller as well.

On Mon, Jul 20, 2015 at 2:27 PM, Ranjib Dey < " target="_blank"> > wrote:
berkshelf does not require one repo per cookbook. We use berks, and a single repo for all our custom cookbook. Berksfile is standard ruby file, you can do Dir['./site-cookbook/*'], and add your local entries.



On Mon, Jul 20, 2015 at 2:13 PM, Kevin Keane Subscription < " target="_blank"> > wrote:

I think there may be some confusion about the relationship between berkshelf and repositories.

First of all, Berkshelf's recommendation is about *git* repositories, not about chef repositories. It is also a recommendation, not a requirement.

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html


-----Original message-----
From: Erik Ogan < " target="_blank"> >
Sent: Monday 20th July 2015 13:48
To: " target="_blank">
Subject: [chef] Cookbook Management for Complex Infrastructure

Background:
We currently have several hundred nodes managed by Chef 0.10(.4) on a private Chef server. We are using librarian-chef to manage off-the-shelf cookbooks (~30 or so), and have a single repository for the remaining custom cookbooks (>60) [*]

I am looking to modernize this setup. It is likely[**] to be a clean-slate rebuild with Chef 12, pulling in cookbooks (more likely portions of recipes) as needed. This is also a chance to align our processes with the state-of-the-art thinking on how to manage these resources.

Berkshelf is the current, prescribed tool for managing cookbooks. Berkshelf (appears to) require each cookbook in its own repository. This is great for modularity, it forces a separation of concerns, but while I plan to reduce the number of custom, private cookbooks (removing cruft, replacing some with off-the-shelf cookbooks configured with attributes), I still expect to have enough cookbooks that this would consume all of our allotment of private repositories.

In light of that, I have tried to set up a repository with cookbooks as peers inside, but the more hoops I jump through to make that work, the more sure I become that I’m missing something obvious in the way to manage cookbooks. (Especially right now where I cannot test a custom cookbook with chefspec if it depends on another custom/private cookbook).

So, how do larger installations manage their private cookbooks? What have I missed?

-e

[*]  I don’t know if that constitutes “large” in the community, but I’m comfortable saying there’s a fair bit of complexity to it.

[**] For reasons that are way out of scope of this message.

--




--
Yoshi Spendiff
Ops Engineer
Indochino



Archive powered by MHonArc 2.6.16.

§