2011-06-07 163 views
1

我想我在使用廚師部署應用程序時缺少一些基本的東西。廚師不會從食譜/食譜安裝

我已經從opscode回購中克隆了一堆食譜。我進行了修改並適當地剪刀。所有配置都可以使用bash腳本產生EC2實例,但不執行任何Chef安裝。

在角色/ base.rb我有我想要安裝的所有應用程序:

run_list(
    "recipe[chef-client::delete_validation]", 
    "recipe[chef-client::config]", 
    "recipe[chef-client]", 
    "recipe[build-essential]", 
    "recipe[runit]", 
    "recipe[git]", 
    "recipe[node]",   
    "recipe[mongodb]", 
    "recipe[monit]" 
) 

我ssh到實例,做sudo chef-client其噴出:

Tue, 07 Jun 2011 06:36:50 +0000] INFO: Starting Chef Run for i-XXXXXXXX 
[Tue, 07 Jun 2011 06:36:51 +0000] INFO: Loading cookbooks [build-essential, chef-client, git, mongodb, monit, node, runit] 
[Tue, 07 Jun 2011 06:36:51 +0000] INFO: Storing updated cookbooks/mongodb/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:36:52 +0000] INFO: Storing updated cookbooks/mongodb/recipes/backup.rb in the cache. 
[Tue, 07 Jun 2011 06:36:52 +0000] INFO: Storing updated cookbooks/mongodb/recipes/mongos.rb in the cache. 
[Tue, 07 Jun 2011 06:36:53 +0000] INFO: Storing updated cookbooks/mongodb/recipes/source.rb in the cache. 
[Tue, 07 Jun 2011 06:36:53 +0000] INFO: Storing updated cookbooks/mongodb/recipes/apt.rb in the cache. 
[Tue, 07 Jun 2011 06:36:53 +0000] INFO: Storing updated cookbooks/mongodb/recipes/server.rb in the cache. 
[Tue, 07 Jun 2011 06:36:54 +0000] INFO: Storing updated cookbooks/mongodb/recipes/config_server.rb in the cache. 
[Tue, 07 Jun 2011 06:36:54 +0000] INFO: Storing updated cookbooks/mongodb/libraries/mondogb_process.rb in the cache. 
[Tue, 07 Jun 2011 06:36:55 +0000] INFO: Storing updated cookbooks/mongodb/attributes/mongodb.rb in the cache. 
[Tue, 07 Jun 2011 06:36:55 +0000] INFO: Storing updated cookbooks/mongodb/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:36:56 +0000] INFO: Storing updated cookbooks/runit/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:36:56 +0000] INFO: Storing updated cookbooks/runit/definitions/runit_service.rb in the cache. 
[Tue, 07 Jun 2011 06:36:57 +0000] INFO: Storing updated cookbooks/runit/attributes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:36:57 +0000] INFO: Storing updated cookbooks/runit/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:36:57 +0000] INFO: Storing updated cookbooks/runit/metadata.json in the cache. 
[Tue, 07 Jun 2011 06:36:58 +0000] INFO: Storing updated cookbooks/node/resources/nodejs.rb in the cache. 
[Tue, 07 Jun 2011 06:36:58 +0000] INFO: Storing updated cookbooks/node/resources/server.rb in the cache. 
[Tue, 07 Jun 2011 06:36:58 +0000] INFO: Storing updated cookbooks/node/resources/npm.rb in the cache. 
[Tue, 07 Jun 2011 06:36:59 +0000] INFO: Storing updated cookbooks/node/providers/npm.rb in the cache. 
[Tue, 07 Jun 2011 06:36:59 +0000] INFO: Storing updated cookbooks/node/providers/server.rb in the cache. 
[Tue, 07 Jun 2011 06:36:59 +0000] INFO: Storing updated cookbooks/node/providers/nodejs.rb in the cache. 
[Tue, 07 Jun 2011 06:37:00 +0000] INFO: Storing updated cookbooks/node/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:00 +0000] INFO: Storing updated cookbooks/node/attributes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:00 +0000] INFO: Storing updated cookbooks/node/README.rdoc in the cache. 
[Tue, 07 Jun 2011 06:37:01 +0000] INFO: Storing updated cookbooks/node/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:37:01 +0000] INFO: Storing updated cookbooks/node/metadata.json in the cache. 
[Tue, 07 Jun 2011 06:37:02 +0000] INFO: Storing updated cookbooks/monit/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:02 +0000] INFO: Storing updated cookbooks/monit/libraries/monitrc.rb in the cache. 
[Tue, 07 Jun 2011 06:37:02 +0000] INFO: Storing updated cookbooks/monit/attributes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:03 +0000] INFO: Storing updated cookbooks/monit/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:37:03 +0000] INFO: Storing updated cookbooks/monit/metadata.json in the cache. 
[Tue, 07 Jun 2011 06:37:03 +0000] INFO: Storing updated cookbooks/chef-client/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:04 +0000] INFO: Storing updated cookbooks/chef-client/recipes/delete_validation.rb in the cache. 
[Tue, 07 Jun 2011 06:37:04 +0000] INFO: Storing updated cookbooks/chef-client/recipes/config.rb in the cache. 
[Tue, 07 Jun 2011 06:37:05 +0000] INFO: Storing updated cookbooks/chef-client/recipes/service.rb in the cache. 
[Tue, 07 Jun 2011 06:37:05 +0000] INFO: Storing updated cookbooks/chef-client/attributes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:05 +0000] INFO: Storing updated cookbooks/chef-client/README.md in the cache. 
[Tue, 07 Jun 2011 06:37:06 +0000] INFO: Storing updated cookbooks/chef-client/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:37:06 +0000] INFO: Storing updated cookbooks/chef-client/metadata.json in the cache. 
[Tue, 07 Jun 2011 06:37:07 +0000] INFO: Storing updated cookbooks/git/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:07 +0000] INFO: Storing updated cookbooks/git/recipes/server.rb in the cache. 
[Tue, 07 Jun 2011 06:37:07 +0000] INFO: Storing updated cookbooks/git/README.rdoc in the cache. 
[Tue, 07 Jun 2011 06:37:08 +0000] INFO: Storing updated cookbooks/git/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:37:08 +0000] INFO: Storing updated cookbooks/git/metadata.json in the cache. 
[Tue, 07 Jun 2011 06:37:09 +0000] INFO: Storing updated cookbooks/build-essential/recipes/default.rb in the cache. 
[Tue, 07 Jun 2011 06:37:09 +0000] INFO: Storing updated cookbooks/build-essential/README.md in the cache. 
[Tue, 07 Jun 2011 06:37:09 +0000] INFO: Storing updated cookbooks/build-essential/metadata.rb in the cache. 
[Tue, 07 Jun 2011 06:37:10 +0000] INFO: Storing updated cookbooks/build-essential/metadata.json in the cache 
[Tue, 07 Jun 2011 06:37:11 +0000] ERROR: Running exception handlers 
[Tue, 07 Jun 2011 06:37:11 +0000] FATAL: Saving node information to /var/chef/cache/failed-run-data.json 
[Tue, 07 Jun 2011 06:37:11 +0000] ERROR: Exception handlers complete 
[Tue, 07 Jun 2011 06:37:11 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out 
[Tue, 07 Jun 2011 06:37:11 +0000] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook logrotate not found. If you're loading logrotate from another cookbook, make sure you configure the dependency in your metadata 

我稍等一下,仍然沒有安裝。我是否需要爲每個配方default.rb明確聲明action: install?我很困惑。

+0

Knog'd logroate,現在只是這個mongodb錯誤。如果我省略了所有的安裝,但我需要mongo:'FATAL:Chef :: Exceptions :: ResourceNotFound:找不到匹配模板的資源[/etc/init/mongodb-server.conf](你是否先定義了它?)' – 2011-06-07 08:34:50

+0

我從這裏[https://github.com/erkki/mongodb-cookbook]分出了一個不同的mongodb回購。運行,但現在我得到臭名昭着的:「節點有一個空的運行列表」錯誤。 – 2011-06-07 09:37:12

回答

0

我使用了rightscale mongodb cookbook,併爲Ubuntu 10.04上的最新版本1.8.1進行了定製。現在部署沒有問題。