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

adding defaults for chef_omnibus_root for windows and unix-like/linux systems #1619

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tarcinil
Copy link
Contributor

This work patches #923 so that the issue will stop bugging people, and we can discuss implementing mixlib-install but that has downstream affects against cinc.

@tarcinil tarcinil force-pushed the patch/923 branch 2 times, most recently from 40fa9f0 to 8dc6de4 Compare January 30, 2020 04:25
… systems

This work patches test-kitchen#923 so that the issue will stop bugging people, and we can discuss implementing mixlib-install but that has downstream affects against cinc.
Copy link
Contributor

@robbkidd robbkidd left a comment

Choose a reason for hiding this comment

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

I am very PRO not bugging people. I thiiiink this will work. From this code change, I'm uncertain what the consequences for people performing the omnibus install will be.

@@ -44,6 +44,13 @@ module Provisioner
class ChefBase < Base
default_config :require_chef_omnibus, true
default_config :chef_omnibus_url, "https://omnitruck.chef.io/install.sh"
default_config :chef_omnibus_root do |provisioner|
if provisioner.powershell_shell?
"/opt/chef" # I know that we don't need this, but it leaves things flexible.
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason not to set this to the Windows default of "$env:systemdrive\\opscode\\chef"?

Copy link
Contributor Author

@tarcinil tarcinil Jan 30, 2020

Choose a reason for hiding this comment

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

I based that on content that I had seen inside of the spec tests.

spec/kitchen/provisioner/chef_base_spec.rb#L604
which looks to expect the same path as unix-like/linux systems. I did contemplate using an elsif to provisioner.windows_os? to "$env:systemdrive\\opscode\\chef" entry.

Copy link
Contributor

Choose a reason for hiding this comment

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

that should be c:\opscode\chef though not /opt/chef for windows

@tarcinil
Copy link
Contributor Author

As I am setting the default, anything done in the later functions "should" overload the default_config. I have been thinking adding additional unit tests that would overload this using lets say Cinc as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants