[chef] Re: Re: Single centralized git repo vs. git repo per cookbook


Chronological Thread 
  • From: Pete Cheslock < >
  • To:
  • Subject: [chef] Re: Re: Single centralized git repo vs. git repo per cookbook
  • Date: Fri, 21 Feb 2014 17:46:17 -0500

Just like the choice between using which configuration management.  My vote is to pick one and go.  Starting with a single repo is the easiest to get started for beginners.  And as you scale you can split out into separate cookbooks.  




On Fri, Feb 21, 2014 at 5:36 PM, Booker Bense < " target="_blank"> > wrote:
I doubt there's a hard and fast rule to apply to all situations, but there has been a lot of experience with using a single repo for the entire set of chef cookbooks. That was more or less the default recommendation 3 years ago. Almost everyone that started there has changed to a repo per cookbook. 

At this point I think you have to have a really strong reason not to use a repo per cookbook. Or at least a repo per cookbook suite ( a set of related cookbooks that have interdependencies. )

Having a separate repo for each cookbook will make automated testing easier and it also imposes some discipline on creating dependencies. Automated config management is a powerful amplifier, but unfortunately it amplifies stupid just
as fast as clever. The more testing you do the better, and at this point the tools are there to make TDD part of your Chef
workflow. 

- Booker C. Bense 



On Fri, Feb 21, 2014 at 2:14 PM, Alex Myasnikov < " target="_blank"> > wrote:

Ohai Chefs,

 

I am trying to understand what advantages (and disadvantages if any?) are there in having a git repo per each cookbook in the chef-repo as opposed to having all of one’s application cookbooks in a single git repo.

 

Up to this point I was thinking of a single repo containing all cookbooks (minus community ones managed by Berkshelf), however I came across a few references (below) that mentioned having git repo per cookbook. It seems like the latter helps CI, but I am not sure how exactly and what tangible benefits are there and what potential tradeoffs are. Is having a repo per each cookbook that’s developed constitutes a best practice?

 

First reference is from last year’s ChefConf presentation in http://www.youtube.com/watch?v=ipSudpDYhTM  (Slide depicting master repo consisting of individual repos per cookbook)

 

And then Nathen Harvey’s blog post on MVT had this snippet:

  1. gem install foodcritic
  2. Go to Travis CI and follow the Sign In link at the top.
  3. Activate the GitHub Service Hook for your cookbook’s repository from your TravisCI profile page. Each of your cookbooks has its own repository, right?!

http://technology.customink.com/blog/2012/06/04/mvt-foodcritic-and-travis-ci/

 

Setup:

 

Chef Server 11

Berkshelf 2.X

 

Thanks in advance.

 

Alex






Archive powered by MHonArc 2.6.16.

§