厨师不会从食谱/食谱安装
我认为我缺少使用 Chef 部署应用程序的一些基本知识。
我从 opscode 仓库克隆了一堆食谱。我做了一些改变并适当地切割了它们。一切都已配置完毕,因此我可以使用 bash 脚本生成 EC2 实例,但它不会执行任何 Chef 安装。
在 Roles/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
?我很困惑。
I think I'm missing something fundamental in deploying applications using Chef.
I've cloned a bunch of cookbooks from the opscode repo. I made changes and knifed them appropriately. Everything is configured so I can spawn an EC2 instance using a bash script but its not executing any of the Chef installs.
In roles/base.rb I have all the apps I want installed:
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]"
)
I ssh to the instance and do sudo chef-client
which spews:
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
I wait a bit and still nothing is installed. Do I need to explicitly state action: install
for each recipe default.rb? I'm so confused.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用了 rightscale mongodb Cookbook 并针对 Ubuntu 10.04 上的最新版本 1.8.1 对其进行了定制。现在部署没有问题。
I used the rightscale mongodb cookbook and customized it for the latest release 1.8.1 on Ubuntu 10.04. Now deploying without issue.