Adding chef cookbooks from github

berto77 picture berto77 · Jun 20, 2012 · Viewed 17k times · Source

I've downloaded a number of cookbooks from the opscode site using the command: knife cookbook site install git for example. However now I would like to download a cookbook from a repository on github into my current cookbooks directory. How should I go about doing this? should I just clone the repository into my cookbooks directory?

Thank you!

Answer

Nils Landt picture Nils Landt · Jun 20, 2012

You coould install the knife github plugin from https://github.com/websterclay/knife-github-cookbooks, after which you could simply use knife cookbook github install cookbooks/yum to install yum from https://github.com/cookbooks/yum.

However, I would suggest using Librarian-Chef from https://github.com/applicationsonline/librarian, it works pretty much like bundler does for ruby gems (if you're familiar with that).

Edit: Since this apparently still receives views, I would be remiss not to mention berkshelf, which is amazing.