-
Notifications
You must be signed in to change notification settings - Fork 177
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
WIP : Add chocolatey support #237
Conversation
Thanks for all the work on this so far. I've added a few comments on what you've done so far, but this is significantly more then I would have been able to set up. |
f59c21f
to
583fedf
Compare
hi @pcfens I did the change you asked. Can you please review them ? Thanks ! |
Looks great. If you have time, could you add the new parameters to the comments in init.pp and to the README? A note that Thanks for putting all of this together. As soon as you drop the WIP flag I'm happy to merge it. |
If this version is ok for you, last thing to do is to test on a windows box. |
Thanks a ton for putting this together. I don't have access to a good setup to test - do you? If not, we can probably merge whenever since the changes won't break existing installs (I'll just add a note that chocolatey support is experimental or something). |
I do have windows server so I'll be able to test as soon as I've got some time. |
I just run one test : it fails beause by default we set 7.1.0 for package_ensure, but this version doesn't exist in chocolatey repository. either we upgrade the value of 7.1.0 to something like 7.2.0 or I need to set a case statement in params.pp what do you prefer ? Here is the available release : |
Last but not least, chocolatey install the package into C:\ProgramData\chocolatey\lib\filebeat\tools by default, hence we need to manage this as well. I'll give a look if I can specify specific value when using chocolatey |
Thanks for all your work on this - I'm sorry we keep running in to little things. Feel free to update the default to 7.2.0 (or latest, I imagine most folks set some value). |
this code doesn't work. The if statement return false, I don't understand why.
|
I'm not sure that conditional defaults are possible since params.pp is evaluated before the init.pp. I think the logic might have to be implemented either in init.pp or in the install/windows.pp file. I've seen this done before by setting all of the values to undef, then checking them later on (kind of like we're doing for the download URL) |
This reverts commit 9041e51
Hi @pcfens I've working hard trying to make this work, but I'm stuck. I'm not able to manage properly the path file for Chocolatey. Any help are more than welcome. Thanks |
@@ -100,11 +102,17 @@ | |||
Optional[String] $systemd_beat_log_opts_override = undef, | |||
String $systemd_beat_log_opts_template = $filebeat::params::systemd_beat_log_opts_template, | |||
String $systemd_override_dir = $filebeat::params::systemd_override_dir, | |||
|
|||
Variant[String, Enum['exec', 'chocolatey']] $package_provider = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I would expect this to use exec by default as one of the params. $filebeat::params::package_provider
, but I can see why maybe not drop it into the params since it would not be platform agnostic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I want exec by default and chocolatey as an option. Not sure what I can do here ? I want to let the choice to the user. what do you recommend ?
$filebeat_path = join([$cmd_install_dir, 'Filebeat', 'filebeat.exe'], '\\') | ||
} | ||
else { | ||
$filebeat_path = 'C:/ProgramData/chocolatey/lib/filebeat/tools/filebeat.exe' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$env:ChocolateyInstall/bin/filebeat.exe" (needs ruby code for environment) - also I'm pointing to the shim in the bin folder, but you can stick with lib if you want.
I would like to see source be a possibility as most folks using Puppet are not likely to be using the community repo (the default). However, If they've already configured default sources, then choco will just use those - so not being explicit has a way to just work. 👍 |
Hi @ferventcoder thanks, my main issue is that I'm not able to make $package_provider by default exec and switch to chocolatey if specified. In my test environment it just fail to run with chocolatey. |
Hi, i've been debuging this. It doesn't works because params.pp is evaluated first (init.pp herits from params.pp). |
I close this ins favor of #247 |
No description provided.