[chef] RE: Re: Proper Berksfile, Berksfile.lock usage?


Chronological Thread 
  • From: "Fouts, Chris" < >
  • To: " " < >
  • Subject: [chef] RE: Re: Proper Berksfile, Berksfile.lock usage?
  • Date: Wed, 20 May 2015 18:52:39 +0000
  • Accept-language: en-US

Chef environments and roles are problematic (they have been for us) since they are not versioned like cookbooks in the Chef server. Therefore we’ve refrained from using roles completely, and environments sparingly.

 

So ideally we upload cookbooks to the Dev organization more frequently than the QA organization. It’s a promotion process.

 

Chris

 

From: Yoshi Spendiff [mailto:
Sent: Wednesday, May 20, 2015 2:42 PM
To: chef
Subject: [chef] Re: Proper Berksfile, Berksfile.lock usage?

 

I would suggest using different environments for, well environments, not organisations.

You can use cookbook version locks on environments to control updates to cookbooks, which can be applied easily using either A) berks apply B) berkflow or, newer and integrated with Chef, C) Policyfiles

That way you have one build process to upload your cookbook versions and then another process to control the release of those to environments.

The way you're doing it now is just work duplication, there's no need to have orgs split like that.

 

On Wed, May 20, 2015 at 9:00 AM, Fouts, Chris < " target="_blank"> > wrote:

I have Berksshelf working now, so that is NOT the issue. Neither is this about the Berks workflow blogged by Seth Vargo. I just don’t think I’m using it properly since it feels cumbersome the way I’m using, so it must be the way I’m using.

 

I have the following setup:

 

Git server: http://git-server.domain.com

BerksAPI server: http://chef-server.domain.com:26200

Chef dev organization: https://chef-server.domain.com:443/organization/dev

Chef QA organization: https://chef-server.domain.com:443/organization/qa

 

Step 1:

When I submit cookbooks and cookbook updates into my git server, I run a Jenkins job that fetches the HEAD (for now) and does a berks install and berks upload to my BerksAPI server. I use a Berksfile/metadata.rb that has ALL my cookbooks. I have have 50 cookbooks in these files. This generates a Berksfile.lock file

 

Step 2:

Now I want to fetch my cookbooks from the BerksAPI server, and upload them to my Chef dev organization. I use a different set of Berksfile/metadata.rb files that ONLY contains the top level role cookbooks to take advantage of Berksshelf’s transitive cookbook dependency resolution. So I may only have 10 cookbooks in this files, and these 10 cookbooks, via Berkshelf dependency management, will eventually install/upload all 50 cookbooks to my chef server. This process generates a Berksfile.lock file too.

 

Step 3:

Now I want to fetch my cookbooks from the BerksAPI server, and upload them to my Chef QA organization. I use a different set of Berksfile/metadata.rb files that ONLY contains the top level role cookbooks to take advantage of Berksshelf’s transitive cookbook dependency resolution. So I may only have 10 cookbooks in this files, and these 10 cookbooks, via Berkshelf dependency management, will eventually install/upload all 50 cookbooks to my chef server. This process generates a Berksfile.lock file too.

 

So it seems like I’m repeating the SAME process in all 3 steps, or at least Steps 2 and 3, and I feel like I shouldn’t? I feel like I’m missing the concept of using the generated Berksfile.lock file?

 

Can you fine ladies and gentlemen elaborate your process?

 

Chris




--

Yoshi Spendiff

Ops Engineer

Indochino

Mobile: +1 778 952 2025




Archive powered by MHonArc 2.6.16.

§