I explored Berkshelf but it does NOT work with SVN though, which is what we have. So I can’t do this in my Berksfile
cookbook ‘my_company_cookbook’, svn: 'https://my_svn_repo.com/sompath/my_company_cookbook’
From: Yauhen Artsiukhou [mailto:firstname.lastname@example.org]
Sent: Friday, October 24, 2014 6:01 AM
Subject: [chef] Re: RE: Re: RE: Re: RE: Re: Single chef server vs. multiple chef servers - pros and cons?
After first read, policy file looks very complicated. Especially if I have many cookbooks with its own policyfiles. How it would be merged?
To solve environment-cookbook pattern with berkshelf I’ve decided to remove cookbook itself and leave only Berksfile with list of top-level cookbooks.
This Berkfile has two sources:
- Berkshelf API (proxy to my Chef Server, hope berkshelf will work with chef server api directly in next releases)
- Community Site
Now you can do something like ‘berks install’, ‘berks upload’ for updating cookbook information.
Then, stage by stage you can do:
- berks apply dev
- knife ssh “chef_environment:dev” "sudo chef-client # force global reconfiguration
- berks apply qa
- knife ssh “chef_environment:qa” "sudo chef-client # force global reconfiguration
- Test all
- berks apply production
From: Daniel DeLeo [mailto:email@example.com:firstname.lastname@example.org] On Behalf Of Daniel DeLeo
Sent: Thursday, October 23, 2014 1:47 PM
Subject: [chef] Re: RE: Re: RE: Re: Single chef server vs. multiple chef servers - pros and cons?
On Thursday, October 23, 2014 at 10:38 AM, Fouts, Chris wrote:
Thanks Phil, I’m doing this NOW, and yes, I’m disciplined enough to update my metadata.rb files, and to pick up the correct version in my environments. However, one flaw of Chef (IMO) is that environments and roles are not versioned, so someone can upload an environment with a bad cookbook version to the Chef server. IOW, there is no built-in Chef mechanism to catch this “easy to screw up” process.
This isn’t viable in the short term, but we’re working on some features to address these problems (the “Policyfile” feature mentioned earlier in this thread). There’s a lot of information in the release announcement for ChefDK 0.3.0: https://www.getchef.com/blog/2014/10/02/chefdk-0-3-0-released-introducing-policyfiles/
I can’t give you a timeline for when we expect this to be production ready, but it’s something you might wish to consider if you’re considering making drastic changes to your workflow.