Categories: None [Edit]

chef-berksfile-env

https://rubygems.org/gems/chef-berksfile-env
https://github.com/bbaugher/chef-berksfile-env
Chef-Berksfile-Env ================== A Chef plugin which allows you to lock down your Chef Environment's cookbook versions with a Berksfile. This is effectively the same as doing `berks apply ...` but via `knife environment from file ...`. View the [Change Log](https://github.com/bbaugher/chef-berksfile-env/blob/master/CHANGELOG.md) to see what has changed. Installation ------------ /opt/chef/embedded/bin/gem install chef-berksfile-env Usage ----- In your chef repo create a Berksfile next to your Chef environment file like this, chef-repo/environments/[ENV_NAME]/Berksfile This is the default location that will used by the plugin. We have to put the Berksfile in its own directory since [multiple Berksfiles can't exist in the same directory](https://github.com/berkshelf/berkshelf/issues/1247). The berksfile should include any cookbooks that your nodes or roles explicitly mention for that environment, source "https://supermarket.getchef.com" cookbook "java" cookbook "yum", "~> 2.0" ... Next we need to generate our Berksfile's lock file, berks install Your environment file must by in `.rb` format and look like this, require 'chef-berksfile-env' # The name must be defined first so we can use it to find the Berksfile name "my_env" # Load Berksfile locked dependencies as my environment's cookbook version contraints load_berksfile ... Now our environment will use the locked versions of the cookbooks and transitive dependencies generated by our Berksfile. Upgrading to the latest dependecies is now as simple as, berks install Our Berksfile also provides an easy way to ensure all the cookbooks and their versions that our environment requires are uploaded to our chef-server, berks upload How the Plugin Finds the Berksfile ---------------------------------- If you are curious how the plugin knows to find the Berksfile in `chef-repo/environments/[ENV]/Berksfile`, you want to put your Berksfile somewhere else or you have run int...

Total

Ranking: 59,906 of 183,487
Downloads: 15,875

Daily

Ranking: 58,438 of 183,477
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
12,456,982,742bundler
10969,414,103rake
126276,157,765octokit
1,32124,970,906chef
2,2357,699,013berkshelf

Owners

#GravatarHandle
1iconbbaugher
2iconbjbq4d