[chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Anybody uses gitsubtreein achefrepo to development cookbooks separately from the production chef-repo ?


Chronological Thread 
  • From: Tom Duffield < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Anybody uses gitsubtreein achefrepo to development cookbooks separately from the production chef-repo ?
  • Date: Tue, 29 Oct 2013 09:41:28 -0500

You are on the right track. If you are using Berkshelf/Librarian you don't need Git submodules and you don't need to store your cookbooks in your chef-repo. 

Tom Duffield — Automation Consulting Engineer

651.769.7497 –  " style="color:rgb(105,117,130)" target="_blank">  – my: Linkedin  Twitter

OPSCODE

CODE CAN

opscode.com   Blog   Facebook   Twitter   YouTube


On Tue, Oct 29, 2013 at 9:18 AM, Vladimir Skubriev < " target="_blank"> > wrote:
29.10.2013 17:24, Tom Duffield пишет:
Storing all of your cookbooks in the chef-repo has become somewhat of an anti-pattern. Instead, the recommendation is that you have a "chef-data" folder, which is source controlled, where you store all your roles, environments and data_bags. Next, you use a tool like Berkshelf to manage dependencies for your project cookbooks. This encourages the use of one git-repo per cookbook. 

So the file structure would look something like this:

chef-dataЩхен сай about
     environments
     roles
     data_bags
cookbooks
     projectcookbook1
     projectcookbook2

Instead of downloading and owning the community cookbooks, you'd use Berkshelf (which some describe as bundler/maven for Chef cookbooks). You can find out more about Berkshelf at berkshelf.com or by watching this ChefConf video where Jamie Winsor, the creator of Berkshelf, describes why Berkshelf was made: http://www.youtube.com/watch?v=hYt0E84kYUI&feature=c4-overview-vl&list=PLrmstJpucjzXNMLcI5X-EjirpDd-SITd3


Thank you very much for the answer.

I will learned today and next days. And may be ask a some small questions in this thread.

How I can understand now I was wrong when I said about using git sub tree for store in a chef repo cookbook separately. Because cookbook is a separate program which must be controlled in a separate version control system repository.

But official documentation about chef-repo (http://docs.opscode.com/essentials_repository.html)
will report otherwise:

cookbooks/    Contains cookbooks that have been downloaded from the https://cookbooks.opscode.com or created locally.

This is confusing. Because at the one hand we must to store cookbooks in a chef repo. But other hand we must store cookbooks separately and using a berkshelf or librarian or other script for download cookbooks to the chef server.

How I can understand now:

I must create a separate git repo (Now I'am doing this right now this) and upload cookbooks i.e. my own application cookbooks and community cookbooks with a tool named librarian or berkshelf?

I.e all cookbooks must be uploaded automatically and should be avaiable from my admin workstation where is chef-repo, berkshelf and other developmnet works.

Ideally I must store my bare git repos of my own cookbooks in the separate server in local network or using github.

But push only production ready snapshots to the git server - best practice of course.

Summing up:

Git subtree is not required because cookbooks is developing separated.

Is I am right ?

Or may be something wrong ?


-- 
Best regards,

CVision Lab System Administrator
Vladmir Skubriev




Archive powered by MHonArc 2.6.16.

§