在Ubuntu上找不到Cookbook Yum?

时间:2014-12-31 01:55:56

标签: ubuntu chef ubuntu-14.04 yum chef-solo

我正在使用小厨师github.com/tobami/littlechef使用virtualbox和vagrant在ubuntu 14.04 vm上安装石墨。

描述ubuntu服务器的节点如下所示

{
    "chef_environment": "_default",
    "name": "local_monitoring",
    "platform": "debian",
    "run_list": [
        "recipe[graphite]"
    ]
}

当我尝试运行以下命令时......

fix node:local_monitoring

...我收到以下错误消息。

    == Configuring local_monitoring ==
Synchronizing nodes, environments, roles, cookbooks and data bags...

Cooking...
[2014-12-31T01:40:58+00:00] INFO: Forking chef instance to converge...
[2014-12-31T01:40:58+00:00] INFO: *** Chef 11.12.8 ***
[2014-12-31T01:40:58+00:00] INFO: Chef-client pid: 19967
[2014-12-31T01:41:04+00:00] INFO: Setting the run_list to ["recipe[graphite]"] from CLI options
[2014-12-31T01:41:04+00:00] INFO: Run List is [recipe[graphite]]
[2014-12-31T01:41:04+00:00] INFO: Run List expands to [graphite]
[2014-12-31T01:41:04+00:00] INFO: Starting Chef Run for local-monitoring
[2014-12-31T01:41:04+00:00] INFO: Running start handlers
[2014-12-31T01:41:04+00:00] INFO: Start handlers complete.
[2014-12-31T01:41:04+00:00] ERROR: Running exception handlers
[2014-12-31T01:41:04+00:00] ERROR: Exception handlers complete
[2014-12-31T01:41:04+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/cache/chef-stacktrace.out
[2014-12-31T01:41:04+00:00] ERROR: Cookbook yum not found. If you're loading yum from another cookbook, make sure you configure the dependency in your metadata
[2014-12-31T01:41:04+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

FAILED: chef-solo could not finish configuring the node

Disconnecting from vagrant@127.0.0.1:2001... done.

我在这里找到了石墨食谱github.com/hw-cookbooks/graphite安装在我的coobooks目录中。

我在这里阅读了类似的问题lists.opscode.com/sympa/arc/chef/2013-02/msg00409.html,所以我从这里下载了yum cookbook https://github.com/opscode-cookbooks/yum并将其添加到我的运行列表中,但是当我运行fix node:local_monitoring时,我得到以下输出。

== Configuring local_monitoring ==
Synchronizing nodes, environments, roles, cookbooks and data bags...

Cooking...
[2014-12-31T01:47:18+00:00] INFO: Forking chef instance to converge...
[2014-12-31T01:47:18+00:00] INFO: *** Chef 11.12.8 ***
[2014-12-31T01:47:18+00:00] INFO: Chef-client pid: 20308
[2014-12-31T01:47:24+00:00] INFO: Setting the run_list to ["recipe[yum]", "recipe[graphite]"] from CLI options
[2014-12-31T01:47:24+00:00] INFO: Run List is [recipe[yum], recipe[graphite]]
[2014-12-31T01:47:24+00:00] INFO: Run List expands to [yum, graphite]
[2014-12-31T01:47:24+00:00] INFO: Starting Chef Run for local-monitoring
[2014-12-31T01:47:24+00:00] INFO: Running start handlers
[2014-12-31T01:47:24+00:00] INFO: Start handlers complete.
[2014-12-31T01:47:24+00:00] ERROR: Running exception handlers
[2014-12-31T01:47:24+00:00] ERROR: Exception handlers complete
[2014-12-31T01:47:24+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/cache/chef-stacktrace.out
[2014-12-31T01:47:24+00:00] ERROR: Cookbook yum not found. If you're loading yum from another cookbook, make sure you configure the dependency in your metadata
[2014-12-31T01:47:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

FAILED: chef-solo could not finish configuring the node

Disconnecting from vagrant@127.0.0.1:2001... done.

我真的不知道该怎么做,或者可能导致问题的原因。任何帮助,将不胜感激 。如果我需要澄清一些事情让我知道。非常感谢你!

1 个答案:

答案 0 :(得分:0)

graphite cookbook depends on yum。因为Chef cookbook依赖项必须纯粹是静态的,所以它们不能是每个平台的,因此即使在实际上不会使用它的平台上也需要它。这就是像Berkshelf这样的工具在管理下载和依赖性方面很受欢迎的原因。