首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >厨师食谱不起作用

厨师食谱不起作用
EN

Server Fault用户
提问于 2016-02-15 20:06:53
回答 1查看 201关注 0票数 1

我在做厨师和流浪汉。我试图配置nginx与php和分拆新服务器使用厨师-solo。这是我的流浪文件的配置。

代码语言:javascript
复制
Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu-15.10"
  config.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/wily/current/wily-server-cloudimg-amd64-vagrant-disk1.box'

  config.vm.network "private_network", ip: "182.217.46.65"
  config.vm.provision :chef_solo do |chef|
    chef.run_list = [
      "recipe[nginx-php-fpm]"
    ]
  end

当我运行流浪者时,所有的运行都是完美的,但是nginx没有安装,在流浪实例的堆栈跟踪中,我得到了下面的异常。

代码语言:javascript
复制
Chef::Exceptions::CookbookNotFound: Cookbook nginx not found. If you're loading nginx from another cookbook, make sure you configure the dependency in your metadata
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.10.0/lib/ohai/mash.rb:77:in `yield'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.10.0/lib/ohai/mash.rb:77:in `default'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.10.0/lib/ohai/mash.rb:77:in `default'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:275:in `[]'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:275:in `each_cookbook_dep'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:254:in `add_cookbook_with_deps'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:255:in `block in add_cookbook_with_deps'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:276:in `each'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:276:in `each_cookbook_dep'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:254:in `add_cookbook_with_deps'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:88:in `block in cookbook_order'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:86:in `each'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:86:in `cookbook_order'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/run_context.rb:167:in `load'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/policy_builder/expand_node_object.rb:93:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/client.rb:509:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/client.rb:277:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application.rb:270:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application.rb:258:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application.rb:258:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application.rb:223:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application.rb:211:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application/solo.rb:297:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application/solo.rb:286:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application/solo.rb:286:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application/solo.rb:265:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application.rb:58:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:50:in `load'
/usr/bin/chef-solo:50:in `<main>'

虽然nginx已经定义为我的metadata.rb文件中的依赖项。我在/var/厨师/缓存/厨师-stacktrace.out流浪实例中得到了这些错误。我将非常感谢任何帮助,以寻找在哪里。

谢谢

EN

回答 1

Server Fault用户

发布于 2016-03-03 12:54:13

如果你已经在你的烹饪书的metadata.rb中显示了它的依赖性,那么下一步的主厨--索罗将是寻找一本名为nginx的烹饪书。

这意味着必须以某种方式将菜谱下载/提供给正在运行的迷幻药盒。

您可能想探索如何在主机上使用伯克托进行食谱检索。

伯克大陆架包括在ChefDK中。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/757373

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档