Netuitive / chef-netuitive

Installs Native Netuitive Agent
MIT License
4 stars 6 forks source link

Backward compatibility for Chef 11 #33

Closed emilhdiaz closed 8 years ago

emilhdiaz commented 8 years ago

@majormoses Running on: Development: Chef 11.10, Ubuntu 14.04.2 LTS on Vagrant 1.8.1 Production: Chef 11.10, Ubuntu 14.04.3 LTS

Chef 11 supports the 'provides' method on Resources but not on Providers. See this issue: https://github.com/chef-cookbooks/chef-vault/issues/36

Would be great to add Chef 11 compatibility (for legacy AWS OpsWorks Chef 11 stacks)

majormoses commented 8 years ago

@emilhdiaz first off thank you for looking into the issue and coming back with useful information about how to solve the problem. While I was hoping to target only chef 12.x when I wrote this I see that there are Netuitive users still using chef 11. This is creating a higher barrier of entry than I had hoped so I am willing to have some chef 11 backwards compatibility. That being said Chef 12.x will be officially supported and Chef 11.x will be best effort.

This particular issue seems like a very simple fix. If you could throw together a patch based off this commit: https://github.com/johnbellone/chef-vault-cookbook/commit/d1d49300ecde1aa7e62217d78a01f845bd9fef2f I would be more than happy to review and merge it.

majormoses commented 8 years ago

@emilhdiaz if you are ready could please include a test suite in your .kitchen.yml so I can start testing?

majormoses commented 8 years ago

@emilhdiaz I was taking a look at the way the .kitchen.yml and the tests are set up here is what I am thinking how we should structure it: I would mv test/integration/default/serverspec test/integration/helpers/serverspec/shared_spec.rb

In test/integration/chef12/serverspec have a simple include on the shared spec and do the same for chef11.

we then rename the default suite in .kitchen.yml to be something like chef12 and set require_chef_omnibus for each version we want to test.

Does this make sense? I am open to other options.

majormoses commented 8 years ago

Just to make sure this is captured here: I have a branch with chef 11 compatibility: https://github.com/Netuitive/chef-netuitive/tree/feature/chef-11-compatibility

This issue is to allow chef 12 and 11 code to coexist peacefully...

majormoses commented 8 years ago

@Createor @shawnbutts I dont have access to make the chef 11 branch a protected branch, could you please do so to prevent accidental deletion?

majormoses commented 8 years ago

@emilhdiaz as per: https://discourse.chef.io/t/chef-owned-community-cookbooks-now-require-chef-12-1-or-later/9435 I think that it would not make sense to put forth any further effort on chef 11. I would strongly encourage you to upgrade to a newer version of opsworks as they do support chef 12.