Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for chef-client 19 license requirement and habitat install location to chef provisioner #29

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Stromweld
Copy link

Description

Adds --chef-license-key flag and value if configured in kitchen.yml file

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@Stromweld Stromweld requested review from a team as code owners February 4, 2025 21:07
Comment on lines +111 to +112
# Added for Chef-Client 19+
args << "--chef-license-key=#{config[:chef_license_key]}" if config[:chef_license_key]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the RC1 release, we updated only the kitchen-Dokken driver to download the chef-infra-19, which has its own provisioner. We haven't updated the chef_infra provisioner to download and install the hab version of chef-infra-19.

So, if we pass the license key here, it will be used along with the chef-infra-18 and will cause it to fail because it is an unrecognized argument for infra-18.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

converting to draft, but the if statement only adds the flag if they add the chef_license_key option to the kitchen.yml file. So without it the flag wont be added and thus would work with older versions of chef-client. Still a work in progress as more commands need it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by updating the default provisioner here many other kitchen-* plugins will work out of the box, like kitchen-vagrant, without us needing to fork them like kitchen-dokken and can simply be added to chef-test-kitchen-enterprise as additional bundled gems.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also needed to get additional testing of VM's in chef/chef repo's github actions for community testing of code.

@Stromweld Stromweld marked this pull request as draft February 5, 2025 15:08
…when installed via habitat package or omnibus

Signed-off-by: Corey Hemminger <[email protected]>
@Stromweld Stromweld changed the title add chef license to chef-client cmd parameters Add support for chef-client 19 license requirement and habitat install location to chef provisioner Feb 5, 2025
Signed-off-by: Corey Hemminger <[email protected]>
Signed-off-by: Corey Hemminger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants