Cookbooks upgrade to Chef 12

Hi,

I would like to upgrade to Chef12, server and nodes but currently I have a
large number
of cookbooks that don’t have

  • The `name’ attribute is required in cookbook metadata - as per
    https://docs.chef.io/config_rb_metadata.html this is required now
  • the hash syntax has changed since the ruby version has changed as well
  • there are as well some string quotes that act different into the new
    version

What is the best migration path ?

thanks!

On 05/04/2015 12:38 PM, sd wrote:

Hi,

I would like to upgrade to Chef12, server and nodes but currently I
have a large number
of cookbooks that don't have

you're going to have to go through the trouble of adding this, there's
no way around that.

  • the hash syntax has changed since the ruby version has changed as well
    ruby 2.x still supports ruby 1.8.7 hashrockets syntax and likely always
    will since new style hashes only do hashes with symbols for keys. this
    should not be an issue.
  • there are as well some string quotes that act different into the new
    version

not sure what this is, but there's actually relatively few breaking
changes between ruby 1.9.3 (the version with chef 11.x) and 2.x

the amount of breaking changes in chef 12 was also kept deliberately low
and mostly edge conditions, there's nothing like the attributes changes
going from chef 10 to chef 11.

Thanks Lamont!

The errors were found into a cookbook that doesn't pass the syntax test on
11.x as well.
Not sure how was uploaded (I think with knife upload).

On Tue, May 5, 2015 at 11:46 AM, Lamont Granquist lamont@chef.io wrote:

On 05/04/2015 12:38 PM, sd wrote:

Hi,

I would like to upgrade to Chef12, server and nodes but currently I have
a large number
of cookbooks that don't have

  • The `name' attribute is required in cookbook metadata - as per
    metadata.rb this is required now

you're going to have to go through the trouble of adding this, there's no
way around that.

  • the hash syntax has changed since the ruby version has changed as well

ruby 2.x still supports ruby 1.8.7 hashrockets syntax and likely always
will since new style hashes only do hashes with symbols for keys. this
should not be an issue.

  • there are as well some string quotes that act different into the new

version

not sure what this is, but there's actually relatively few breaking
changes between ruby 1.9.3 (the version with chef 11.x) and 2.x

the amount of breaking changes in chef 12 was also kept deliberately low
and mostly edge conditions, there's nothing like the attributes changes
going from chef 10 to chef 11.