Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Chef infra 如何判断berkshelf是否正在连接到我的chef服务器_Chef Infra_Knife_Berkshelf - Fatal编程技术网

Chef infra 如何判断berkshelf是否正在连接到我的chef服务器

Chef infra 如何判断berkshelf是否正在连接到我的chef服务器,chef-infra,knife,berkshelf,Chef Infra,Knife,Berkshelf,我正试图与厨师一起使用berkshelf提供一台流浪机器。这是在Windows7上运行的。我安装了Berkshelf作为Chef DK的一部分。它报告了版本3.2.3。我的流浪供应失败了,因为它找不到一些食谱。这是我的Berksfile的相关部分 source "https://api.opscode.com/organizations/createthegood" #source "https://api.berkshelf.com" metadata cookbook "drupal_s

我正试图与厨师一起使用berkshelf提供一台流浪机器。这是在Windows7上运行的。我安装了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'

我想,也许它没有从刀子上获取配置信息(可能像密钥文件一样)。但我似乎想不出一个方法来证实这一点。我下一步要做什么来诊断这个问题?

我不认为Hosted Chef提供了一个可以在Berksfile中使用的BerksShelf API。Berkshelf需要与一个为您的Chef服务器的所有烹饪书编制索引,然后能够进行依赖项解析的服务器进行对话。这就是universe中的
块失败的原因,因为在berkshellf API中有一个
/universe
API资源。看来主厨不支持它

通常在您的Berksfile中,您将内部BerksShelf api放在第一位,将社区BerksShelf api放在第二位。在本例中,社区api现在位于。若你们的烹饪书只依赖于超市提供的烹饪书,你们就不必设置你们自己的API


如果您确实计划编写依赖于您自己的烹饪书的烹饪书,那么最好的方法是设置一个服务器。有一个,你可以设置它并指向你的。您还可以设置它,它还提供了一个Berkself API

有趣。对于我所处的特定环境来说,这似乎是一种痛苦。有没有可能用刀子把食谱预先下载到我的书架上?或者我应该把这些特定的烹饪书放在git repo中,并通过URL引用它们吗?是的,不幸的是,Berkself api还没有集成到chef服务器中。我认为,鉴于Chef DK配备了Berkshelf,我希望Chef能够在其上实现标准化(还有其他人像图书管理员Chef)。我认为Git方法将最有效。如果你的食谱是开源的,你也可以上传到。它也可以运行。我已经更新了我的答案,基本上如果你只依赖超市提供的烹饪书,你不需要设置任何东西。我最后做的是使用刀子将它们下载到本地目录,并在Berksfile中硬编码路径。我现在遇到了一个不同的问题,这个问题阻碍了我一路走向成功。一旦我排除了这些,并且确信我有一条有效的前进道路,我会回来接受你的答案。实际上,我认为我最终要做的是将这些食谱下载到项目的源repo中,并更新Berksfile以引用项目中的路径。紧密耦合,但至少总是如此。@rhuffstedtler你们在超市里依赖的是烹饪书还是你们自己的烹饪书?
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