【发布时间】:2015-04-15 02:41:03
【问题描述】:
我正在尝试使用 berkshelf with chef 来配置 Vagrant 机器。这是在 Windows 7 上运行的。我安装了 Berkshelf 作为 Chef-DK 的一部分。它报告版本 3.2.3。我的流浪供应失败了,因为它找不到一些食谱。这是我的 Berksfile 的相关部分
source "https://api.opscode.com/organizations/createthegood"
#source "https://api.berkshelf.com"
metadata
cookbook "drupal_site"
cookbook "al_base"
当我运行 berks 安装时,它无法索引源:
D:\Rob\VMs\ctg_cookbook>berks install
Resolving cookbook dependencies...
Fetching 'artifact' from git://github.com/RiotGames/artifact-cookbook.git (at master)
Fetching 'ctg_cookbook' from source at .
Fetching 'drush' from git://github.com/jenkinslaw/chef-drush.git (at 0a567e2)
Fetching 'php-fpm' from git://github.com/yevgenko/cookbook-php-fpm.git (at master)
Fetching cookbook index from https://api.opscode.com/organizations/createthegood...
D:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/berkshelf-api-client-1.2.1/lib/berkshelf/api
_client/connection.rb:67:in `block in universe': undefined method `each' for #<String:0x3fdc4e8>
(NoMethodError)
from D:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/berkshelf-api-client-1.2.1/lib/
berkshelf/api_client/connection.rb:66:in `tap'
from D:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/berkshelf-api-client-1.2.1/lib/
berkshelf/api_client/connection.rb:66:in `universe'
from D:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/source.rb:22:in `build_univ
erse'
from D:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/installer.rb:21:in `block (
2 levels) in build_universe'
但是,knife 在其配置的服务器上找到了该说明书:
C:\Users\29007>knife cookbook list help
7-zip 1.0.2
activelamp_composer 0.0.1
activelamp_drupal 0.0.4
activelamp_symfony 0.0.1
al_base 0.0.1
我认为也许它 berkshelf 没有从刀获取配置信息(也许像密钥文件)。但我似乎无法想出一种方法来验证这一点。尝试诊断此问题的下一步是什么?
【问题讨论】:
标签: chef-infra knife berkshelf