Nick Gotch
Nick Gotch

Reputation: 9407

Error running Python on OpsWorks with Chef + Berkshelf

I'm trying to get Python 2.7 working on my OpsWorks instance but I keep running into errors starting up.

My OpsWork stack is set up with Chef version 11.10 and Berkshelf version 3.2.0.

My metadata.rb has the following in it:

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

My Berksfile is set up with:

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

cookbook 'poise-python'
cookbook 'apt'

Every time I launch I keep getting the following error and I'm not sure how to resolve it:

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

I tried adding a chef/configuration.rb file to set no_lazy_load to true but it doesn't seem to be working. Frankly I'm new to OpsWorks and Chef so I may be missing something very basic.

More Info

The stack I'm taking over originally referenced python instead of poise-python but I had switched from that to resolve a different error (but, I guess, related) when I tried to run with that:

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.

I tried pinning to an older version of python but still couldn't get it to work. Basically, I know this instance can run (previous maintainer had it going) but I'm not sure what I'm missing.

Upvotes: 1

Views: 498

Answers (2)

Nick Gotch
Nick Gotch

Reputation: 9407

After some Googling, I figured out how to make this work without upgrading Chef version. I added the following line to my Berksfile:

cookbook 'build-essential', '= 3.2.0'

Upvotes: 2

coderanger
coderanger

Reputation: 54211

My cookbooks aren't compatible with Chef 11, you'll have to upgrade your stack to Chef 12.

Upvotes: 0

Related Questions