从github添加厨师烹饪书

ber*_*o77 18 chef-infra

我从opscode网站下载了一些烹饪书,使用命令:knife cookbook site install git.但是现在我想从github上的存储库下载一本食谱到我当前的cookbooks目录中.我应该怎么做呢?我应该将存储库克隆到我的cookbooks目录中吗?

谢谢!

Nil*_*ndt 25

您可以从https://github.com/websterclay/knife-github-cookbooks安装刀github插件,之后您可以直接knife cookbook github install cookbooks/yumhttps://github.com/cookbooks/yum安装yum .

但是,我建议使用来自https://github.com/applicationsonline/librarian的 Librarian-Chef ,它的工作方式与Bundler对ruby gems非常相似(如果你熟悉的话).

编辑:由于这显然仍然收到意见,我会失职,更不用说berkshelf,这是惊人的.


小智 8

To download and manage cookbooks, you could use Berkshelf which comes with a way in itself to manage the cookbook dependencies by itself. If you are familiar with Ruby, it works like Gemfile. You could download cookbooks from github by adding this command in your BerksFile

cookbook 'nginx' , path : ' github url for cookbook'

  • 更短:cookbook'nginx',github:'username/nginx' (2认同)