[chef] organizing cookbooks, and individual projects


Chronological Thread 
  • From: S Ahmed < >
  • To:
  • Subject: [chef] organizing cookbooks, and individual projects
  • Date: Sun, 2 Dec 2012 13:49:39 -0500

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.

§