- From: Jesse Nelson <
>
- To: "
" <
>
- Subject: [chef] Re: organizing cookbooks, and individual projects
- Date: Mon, 3 Dec 2012 09:10:53 +0900
We moved to cookbook per repo and use berkshelf to describe the cookbooks and
versions a project requires. Initially we used sub modules but that ended up
being not exactly the right solution when cookbooks are being updated often
across a larger team.
On Dec 3, 2012, at 3:49 AM, S Ahmed
<
>
wrote:
>
I use chef using chef-solo to bootstrap my ec2 instances etc.
>
>
Now currently I have a project where I have all my recipes in a folder:
>
>
/myapp/infra/chef/cookbooks
>
>
>
I want to keep doing this for other projects, but obviously don't want to
>
be duplicating my work.
>
>
Since recipes are suppose to work by themeselves (ignoring dependent
>
recipes), how would you recommend I organize things?
>
>
I was thinking of this:
>
>
1. Have a git repo that has all my cookbook and recipes
>
2. for my individual projects, I somehow link to this master git repo, and
>
then have whatever is specific to this project like:
>
>
chef.json
>
/config/solo.rb
>
**/cookbooks <-- git submodule of my main cookbooks
>
/roles/base.rb etc.
>
>
Does this make sense?
>
>
I think the key point to make sure things don't break is for me to link to
>
the master /cookbooks git repo using a specific changeset/branch to ensure
>
things work even when I update the master cookbooks repo.
>
>
>
I'm guessing this is an obvious setup, but I just haven't though things
>
through to set things up for multiple projects.
>
>
I'm not a big company, so I don't need anything more eleborate than this
>
assuming it makes sense.
>
>
Comments?
>
Is a git sub-module the way to go, I haven't done this before so not sure
>
how to set this up, do you guys use rake?
Archive powered by MHonArc 2.6.16.