【发布时间】:2016-10-18 21:44:12
【问题描述】:
我正在尝试运行 chef-solo,我有以下配置
/var/chef
├── cookbooks
│ ├── cc_db
│ │ ├── Berksfile
│ │ ├── Berksfile.lock
│ │ ├── chefignore
│ │ ├── metadata.rb
│ │ ├── recipes
│ │ │ └── default.rb
├── node.json
└── solo.rb
node.json
{
"run_list": [ "recipe[cc_db]" ]
}
solo.rb
file_cache_path "/var/chef"
cookbook_path "/var/chef/cookbooks"
json_attribs "/var/chef/node.json"
元数据.rb
depends 'database', '~> 5.1.2'
depends 'mysql2_chef_gem', '~> 1.0'
我已经让它在厨房测试环境中工作,但我现在正在使用 chef-solo 在不同的服务器上尝试它。
每当我跑步时: chef-solo -c solo.rb
我明白了:
resolving cookbooks for run list: ["cc_db"]
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: database
Expanded Run List:
------------------
* cc_db
Platform:
---------
x86_64-linux
Running handlers:
[2016-09-20T15:34:05-04:00] ERROR: Running exception handlers
Running handlers complete
[2016-09-20T15:34:05-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2016-09-20T15:34:05-04:00] FATAL: Stacktrace dumped to /var/chef/chef-stacktrace.out
[2016-09-20T15:34:05-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-09-20T15:34:05-04:00] ERROR: 412 "Precondition Failed"
[2016-09-20T15:34:05-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
我很困惑,因为数据库食谱似乎是用 berks 安装的,但厨师没有拿起它。
任何帮助将不胜感激。
谢谢。 迈尔斯。
【问题讨论】:
标签: ruby chef-infra chef-solo