1

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.

Nick Gotch
  • 9,167
  • 14
  • 70
  • 97

2 Answers2

2

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'
Nick Gotch
  • 9,167
  • 14
  • 70
  • 97
0

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

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • So I should add that I took over a system that was working elsewhere configured under Chef 11.10. It originally used `python` instead of `poise-python` but I had a different error running that, also complaining about the Chef version. I'll update the question with that info but basically I'm trying to avoid upgrading the Chef version because of my unfamiliarity with it. – Nick Gotch May 28 '16 at 21:17
  • I don't do any testing on OpsWorks, but the old `python` cookbook is entirely deprecated and unsupported at this point. – coderanger May 28 '16 at 22:17