[chef] Re: Re: Standard Practices


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Re: Standard Practices
  • Date: Wed, 13 Mar 2013 11:48:14 -0700

this used to be a problem before berkshelf, librarian.

I keep the repository similar to how its documented in the wiki. Its a single repo for cookbooks, roles, env etc. Everything is in ruby, no json. cookbooks folder is gitignored with holds all the community cookbooks (managed by berks) . Whenever we need to alter any community cookbooks, standard github fork/pull request style workflow is practiced. Cheffile points to the forked repos of the cookbooks till the time pull requests are merged (you can also maintain them in your own repo in a separate directory if you want, and point berks to pick it up from there, but u'll miss out on the updates to those cookbooks).

These practices are pretty comparable to any other ruby project, except bundler takes up the job of librarian/berkshelf. 

Previous to librarian and berkshelf , several of us used git-submodule and ultimate trick foo .. but with great pain and anguish. :-)

regards
ranjib


On Wed, Mar 13, 2013 at 11:35 AM, Ben Hartshorne < " target="_blank"> > wrote:
A number of folks responded indicating a myriad of problems with having all the cookbooks in one repo.  I'd like to hear more about these problems.  So far (admittedly, without too many people working on the cookbooks) I've had no trouble keeping all the cookbooks in one big repo together.  Following the standard practice of branch/work/merge, unless we're actually working on the same part of the same cookbook at the same time (which would clearly have issues even if each cookbook was in its own repo), the merges all happen with no trouble. 

Could one of you that migrated from one-big-repo to tons-of-tiny-repos describe in more detail the issues you encountered? 

My other question is how you deal with having so many repositories.  When you want to refresh your local copy, I'm used to just doing a 'git pull'.  Instead do you have to 'for i in *; do pushd $i; git pull; popd; done' every time you want to get everything up to current?

Thanks,

-ben


On Wed, Mar 13, 2013 at 8:22 AM, Mark Pimentel < " target="_blank"> > wrote:
I just wanted to get a feeling for what standard practices people are following for managing chef cookbooks.

We will be moving to git internally and I would like to plan out the migration of our cookbooks to git.  What is the best practice for this layout?

One repo per cookbook? or all cookbooks in one repository?
How about databags, roles, environments?

Any feedback would be greatly appreciated.

--
Thanks,

Mark





Archive powered by MHonArc 2.6.16.

§