Working with multiple organisations



I am new to chef and my work place started with multiple organisations one for each environment. So dev test prod etc has its own organizations.

My workstation has one top level folder and each org has its own subfolder with .Chef within.

If I have common cookbooks which are applicable to all orgs, how I can achieve This?
Appreciate your responses.




First off, Welcome to the Chef Community!

I would suggest the following:

All cookbooks should be stored in a remote Source Control Management system, such as git. this can be or an on premise version of GitHub Enterprise, BitBucket, or TFS, or a FOSS alternative such as Gitlab Community.

Ensure that the version tag matches the version in the metadata.rb (you are versioning your cookbook changes, right :wink: ) then all that is needed to move a change from one org to another, is to create that new version in dev, and tag it, push to SCM, (git flow works well for this) then change to the test org and pull the new cookbook from SCM to that subfolder, and use "berks upload " it to that chef org. This does a couple of things; first and foremost it creates a version lock on the cookbook preventing a cookbook being uploaded that has not had the version incremented. Using berks also manages cookbook dependencies.



It looks like, I need to setup a private supermarket (I need that anyways as I am behind fw) and share my cookbook using this supermarket with wrapper cookbooks and berks.

Thanks for suggestion.