【发布时间】:2015-11-28 04:55:46
【问题描述】:
我正在编写我的第一套食谱来安装 grafana(用于 StatsD)。
但是,当我执行 inlcude_recipe("grafana::default") 时,会选择我本地食谱未提供的食谱(我猜测来自上游)。
我正在使用 kitchen.ci “收敛” - 厨师运行成功完成。
我在这里遗漏了什么(或做错了什么)?
我的文件夹结构
/cookbooks
|- /chef-grafana
|-- < folder structure from author of https://github.com/JonathanTron/chef-grafana - I cloned this repo >
|- /my_statsd_graphite_grafana_cookbook
|-- /recipes
|--- default.rb
|-- /attributes
|-- metadata.rb
|-- Berksfile
元数据.rb
name("my_statsd_graphite_grafana_cookbook")
version("1.0")
depends("apt")
depends("statsd")
depends("graphite")
depends("grafana")
recipe("my_statsd_graphite_grafana_cookbook", "StatsD Recipe")
伯克斯文件
source 'https://supermarket.chef.io'
metadata
cookbook 'apt', git: 'git://github.com/opscode-cookbooks/apt.git'
cookbook 'statsd', git: 'git://github.com/librato/statsd-cookbook.git'
cookbook 'graphite', git: 'git://github.com/hw-cookbooks/graphite.git'
cookbook "grafana", path: "../chef-grafana"
default.rb
include_recipe("apt")
# Solve some deps
install_packages = ["python-pip", "python-dev", "build-essential", "unzip"]
install_packages.each { |install_package|
package(install_package)
}
# Include statsd recipes
include_recipe("statsd::default")
include_recipe("graphite::packages")
include_recipe("graphite::carbon")
# Include grafana recipes
include_recipe("grafana::default")
我什至尝试在克隆的 chef-grafana default.rb 配方中进行许多调试日志,但它们从未被调用。
我错过了什么?
非常感谢。
【问题讨论】:
-
您可以省略
::default,只使用include_recipe("grafana")作为默认食谱。我会尝试使用完全合格的食谱路径而不是相对路径,以确保问题不是来自这。您也可以尝试将厨房配置为 verbose logging 以查看它从哪里获取食谱。 -
感谢您的详细提示。会试试看。
-
有什么更新吗?也许是完成问题的日志输出?
标签: chef-infra graphite statsd grafana aws-opsworks