bx0rwq
Last Updated: February 25, 2016
·
2.512K
· mlafeldt

How to distribute your cookbook with a Cheffile

One of the coolest features of Berkshelf is the metadata source, which is similar to Bundler's gemspec. When you define metadata in your Berksfile, Berkshelf will install all dependencies defined in the metadata.rb file located in the cookbook (directory) you're working on.

Unfortunately, Librarian-Chef doesn't have the metadata shortcut. But you can mimic it this way inside your Cheffile:

site "http://community.opscode.com/api/v1"

cookbook "name_of_your_cookbook", :path => "."

Ultimately, this trick allows you to distribute your cookbook together with a Cheffile (which is good).