使用 Chef + Berkshelf 在 OpsWorks 上出现错误 运行 Python

Error running Python on OpsWorks with Chef + Berkshelf

我正在尝试让 Python 2.7 在我的 OpsWorks 实例上运行,但我一直 运行 启动时出错。

我的 OpsWork 堆栈是使用 Chef 11.10 版和 Berkshelf 3.2.0 版设置的。

我的 metadata.rb 中有以下内容:

depends           "poise-python"
depends           "apt", ">= 1.8.2"

我的 Berksfile 设置为:

source "https://supermarket.chef.io"

cookbook 'poise-python'
cookbook 'apt'

每次启动时,我都会收到以下错误,我不确定如何解决它:

Halite is not compatible with no_lazy_load false, please set no_lazy_load true in your Chef configuration file.

我尝试添加 chef/configuration.rb 文件以将 no_lazy_load 设置为 true,但它似乎不起作用。坦率地说,我是 OpsWorks 和 Chef 的新手,所以我可能会遗漏一些非常基本的东西。

更多信息

我接管的堆栈最初引用的是 python 而不是 poise-python,但当我尝试 运行 那个:

This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade.

我尝试固定到 python 的旧版本,但仍然无法正常工作。基本上,我知道这个实例可以运行(之前的维护者已经开始)但我不确定我错过了什么。

我的食谱与 Chef 11 不兼容,您必须将堆栈升级到 Chef 12。

经过一些谷歌搜索,我想出了如何在不升级 Chef 版本的情况下完成这项工作。我在我的 Berksfile 中添加了以下行:

cookbook 'build-essential', '= 3.2.0'