Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.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 厨师未能为我不知道的烹饪书找到烹饪书';我真的不需要_Chef Infra_Chef Solo - Fatal编程技术网

Chef infra 厨师未能为我不知道的烹饪书找到烹饪书';我真的不需要

Chef infra 厨师未能为我不知道的烹饪书找到烹饪书';我真的不需要,chef-infra,chef-solo,Chef Infra,Chef Solo,我正在尝试使用virtualbox、vagrant和chef solo设置VM,我想这是非常常见的事情。这是我的档案: Vagrant::Config.run do |config| config.vm.box = "ubuntu-13.04" config.vm.box_url = "http://goo.gl/Y4aRr" config.vm.network :forwarded_port, guest: 80, host: 8888 # Necessary for ho

我正在尝试使用virtualbox、vagrant和chef solo设置VM,我想这是非常常见的事情。这是我的档案:

Vagrant::Config.run do |config|
  config.vm.box = "ubuntu-13.04"
  config.vm.box_url = "http://goo.gl/Y4aRr"

  config.vm.network :forwarded_port, guest: 80, host: 8888

  # Necessary for homesick_agent::data_bag
  config.ssh.forward_agent = true

  config.vm.provision :chef_solo do |chef|

     # contains "users" and "ssh_known_hosts" databags
    chef.data_bags_path = "databags"

    chef.cookbooks_path = ["cookbooks", "site-cookbooks"]

    # stuff that should be in base box

    chef.add_recipe "vim"
    chef.add_recipe "git"
    chef.add_recipe "php"
    chef.add_recipe "postgresql::server"
    chef.add_recipe "chef-phppgadmin"
    chef.add_recipe "apache2"
    chef.add_recipe "apache2::mod_fastcgi"
    chef.add_recipe "apache2::mod_php5"
    chef.add_recipe "apache2::mod_ssl"
    chef.add_recipe "python"
    chef.add_recipe "ipynb"
    chef.add_recipe "supervisor"

    # chef.log_level = :debug

  end
end
正如你看到的,我的目标框是Ubuntu。运行
vagrant up
后,我得到:

 ==> default: [2014-05-12T14:04:38+00:00] FATAL: 
Chef::Exceptions::CookbookNotFound: Cookbook mysql not found. 
If you're loading mysql from another cookbook, make sure you configure the dependency in  your metadata
我不需要也不想要mysql在我的盒子里!我既不想要
iss
windows
和厨师抱怨的所有其他不同的软件包。起初我是一个接一个地下载,但看起来很傻,所以我想,我做错了什么。有什么提示吗?

  • 使用依赖项解析器,如自动下载cookbook依赖项
  • 如果在
    metadata.rb
    中定义了相关的食谱,则需要它们。尽管它们可能不会在您的平台上执行,但chef没有条件依赖的概念
  • 你的符号错了。Chef使用
    来分离
    烹饪书::菜谱
    ,而不是单个的
    (这将在以后搜索名为
    postgresql:server
    的烹饪书及其默认菜谱时给您带来麻烦