解决Chef Cookbook依赖关系

时间:2015-06-17 04:20:43

标签: automation chef cookbook

我正在按照here概述的基本厨师教程进行操作,该教程将指导您使用超市中的各种食谱创建初始chef-repo

我正处于设置托管主厨帐户的位置,我需要将所有本地食谱上传到我的托管主厨服务器。

所以我在本地运行 -

> knife cookbook upload --all
Uploading apache2      [3.0.1]
Uploading apt          [2.7.0]
Uploading aws          [2.7.0]
Uploading build-essential [2.1.2]
Uploading chef-sugar   [3.1.0]
Uploading chef_handler [1.1.8]
Uploading database     [4.0.6]
Uploading homebrew     [1.12.0]
Uploading iis          [4.1.1]
Uploading iptables     [1.0.0]
Uploading logrotate    [1.9.1]
Uploading mariadb      [0.3.0]
Uploading mysql        [4.1.2]
ERROR: Cookbook mysql depends on cookbooks which are not currently
ERROR: being uploaded and cannot be found on the server.
ERROR: The missing cookbook(s) are: 'build-essential' version '~> 1.4'

好的,所以mysql食谱抱怨它需要build-essential, ~> 1.4。没问题,让我得到那个特定版本......

> knife cookbook site download build-essential 1.4.4

太好了,现在我有了build-essential version的权利。让我们再试一次..

> knife cookbook upload --all
Uploading apache2      [3.0.1]
Uploading apt          [2.7.0]
Uploading aws          [2.7.0]
Uploading build-essential [1.4.4]
Uploading chef-sugar   [3.1.0]
Uploading chef_handler [1.1.8]
Uploading database     [4.0.6]
Uploading homebrew     [1.12.0]
ERROR: Cookbook homebrew depends on cookbooks which are not currently
ERROR: being uploaded and cannot be found on the server.
ERROR: The missing cookbook(s) are: 'build-essential' version '>= 2.1.2'

现在好了homebrew,抱怨它需要build-essenitial, >= 2.12

如何摆脱这种依赖循环?我不能有两个不同版本的同一本食谱,可以吗?我直接从教程的网站上下载了这个 - 我只是试图弄清楚所有这些东西的正确版本?

谢谢!

1 个答案:

答案 0 :(得分:2)

您的mysql食谱版本较旧,因此具有较旧的依赖关系。尝试将其升级到最新版本。并且还使用新版本的build-essenitial

请参阅https://supermarket.chef.io/cookbooks/mysql