Dependencies 向厨师烹饪书添加依赖项

Dependencies 向厨师烹饪书添加依赖项,dependencies,chef-infra,Dependencies,Chef Infra,使用chef solo,我正在尝试构建一个安装git的简单VM 我有一个“食谱”目录,还有一个文件 -cookbooks -Vagrantfile 流浪汉档案 # -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.con

使用chef solo,我正在尝试构建一个安装git的简单VM

我有一个“食谱”目录,还有一个文件

-cookbooks    
-Vagrantfile
流浪汉档案

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "centos_64"

  config.vm.network "forwarded_port", guest: 80, host: 8085 
  config.omnibus.chef_version = :latest

  ...

  config.vm.provision :chef_solo do |chef|
     chef.add_recipe "build-essential"
     chef.add_recipe "dmg"
     chef.add_recipe "yum"
     chef.add_recipe "git"
  end
end
我将
git
cookbook克隆到我的cookbooks目录。但是,我遇到了一个问题:

[2014-03-06T21:09:58+00:00] ERROR: Cookbook runit not found. If you're loading 
runit from another cookbook, make sure you configure the dependency in your 
metadata
[2014-03-06T21:09:58+00:00] FATAL: Chef::Exceptions::ChildConvergeError: 
Chef run process exited unsuccessfully (exit code 1)
与其继续在我的Vagrantfile中添加更多的cookbook依赖项,不如用什么方法来处理依赖项?

请查看。它允许您创建一个Berksfile,在其中指定所需的gem,并处理依赖项解析