【发布时间】:2017-05-26 18:50:30
【问题描述】:
我正在与 Packer、Chef 和 Test Kitchen 合作(使用 ServerSpec)。我已经弄清楚了厨房;它测试了我的食谱,我很高兴。现在我正在尝试在根目录中的同一存储库中运行 Packer。 Most of the examples 指向 [cookbooks],但 repo 是一个带有 metadata.rb 和根目录中的 Berksfile 的食谱。 Packer .json 文件也在那里。
我需要分开这些目录吗?当我运行 Packer 时,它找不到我的 Chef 食谱并永远挂起。缩略示例:
packer.json
...
"provisioners":
[
{
"type": "chef-solo",
"cookbook_paths": ["./"],
"run_list": ["cookbook-name::default"]
}
]
元数据.rb
name 'cookbook-name'
version '0.0.1'
depends 'git', '~> 6.0.0'
食谱/default.rb
include_recipe 'git'
【问题讨论】:
标签: chef-infra packer