【问题标题】:Chef: Kitchen Converge cannot find local cookbook dependency厨师:Kitchen Converge 找不到本地食谱依赖项
【发布时间】:2016-03-31 04:42:35
【问题描述】:

我有 2 本本地食谱。一种称为golang_app,另一种称为test_go_web_apptest_go_web_app 依赖于golang_app 并通过在其include_recipe 'golang_app::default' 中执行include_recipe 'golang_app::default' 来运行golang_app::default ......

我正在尝试将golang_app 添加为test_go_web_app 的依赖项......现在,test_go_web_app 的 Berksfile 看起来像:

source 'https://supermarket.chef.io'

cookbook 'golang_app', path: '../golang_app'

metadata

但是,在运行 kitchen converge 时,我得到:

Chef::Exceptions::CookbookNotFound
   ----------------------------------
   Cookbook golang_app not found. If you're loading golang_app from another cookbook, make sure you configure the dependency in your metadata

   Cookbook Trace:
   ---------------
     /tmp/kitchen/cache/cookbooks/test_go_web_app/recipes/default.rb:1:in `from_file'

   Relevant File Content:
   ----------------------
   /tmp/kitchen/cache/cookbooks/test_go_web_app/recipes/default.rb:

     1>> include_recipe 'golang_app::default'
     2:

有没有人能够让它工作?

【问题讨论】:

    标签: chef-infra berkshelf test-kitchen


    【解决方案1】:

    除了 Berksfile 行,您还需要将 depends 'golang_app' 添加到 test_go_web_app 的 metadata.rb。还要确保 Berksfile 位于文件夹结构中 Kitchen 配置文件的旁边。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      • 2015-05-28
      • 2016-05-16
      • 1970-01-01
      • 1970-01-01
      • 2020-01-06
      相关资源
      最近更新 更多