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

REQ - Windows - Support chocolatey as a package manager #589

Closed
tomasquith opened this issue Dec 1, 2016 · 4 comments
Closed

REQ - Windows - Support chocolatey as a package manager #589

tomasquith opened this issue Dec 1, 2016 · 4 comments
Assignees

Comments

@tomasquith
Copy link

I'm looking to deploy on windows, into a pretty locked down environment - I've noticed that the package.pp gets the client MSI from the internet with no override.

I'd propose using chocolatey as a method of retrieving this for windows, however a package would be needed to be created for the MSI. Ideally, sensu would host a nuget feed with packaged versions of their MSIs, then we could rely on that or a local package feed if required.

I imagine there aren't many windows users of sensu, especially with more locked down environments, but I just thought I'd make my thoughts known.

I'll take a look at the work required.

@jaxxstorm
Copy link
Contributor

however a package would be needed to be created for the MSI

This probably falls under the scope of the sensu project.

If we get this from them, there's nothing stopping this being an option, but not sure it falls under the scope of this module.

@ghost
Copy link

ghost commented Jan 3, 2017

Cheers @jaxxstorm - I'll raise an issue on the main sensu repo to try and start a conversation :)

@jpuskar
Copy link

jpuskar commented Feb 6, 2017

How about providing a variables in sensu::package like 'pkg_provider', and 'pkg_source'?
Then we could set sensu::package::pkg_provider: 'chocolatey', and the source accordingly.

jpuskar added a commit to jpuskar/sensu-puppet that referenced this issue Jun 15, 2017
jpuskar added a commit to jpuskar/sensu-puppet that referenced this issue Jun 15, 2017
jpuskar added a commit to jpuskar/sensu-puppet that referenced this issue Jun 15, 2017
jpuskar added a commit to jpuskar/sensu-puppet that referenced this issue Jun 15, 2017
@jeffmccune jeffmccune self-assigned this Jul 8, 2017
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 8, 2017
Without this patch package resource used to install sensu on Windows defaults
to the `msi` provider and can't easily be changed to the Chocolatey provider.
This patch addresses the problem by adding a new class parameter,
`sensu::windows_package_provider` which defaults to `undef`, the default
behavior of Puppet on windows, and can be set to `'chocolatey'`.

Closes sensu#664
Resolves sensu#589

Original Author: john.puskar <[email protected]>
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 8, 2017
Without this patch package resource used to install sensu on Windows defaults
to the `msi` provider and can't easily be changed to the Chocolatey provider.
This patch addresses the problem by adding a new class parameter,
`sensu::windows_package_provider` which defaults to `undef`, the default
behavior of Puppet on windows, and can be set to `'chocolatey'`.

Closes sensu#664
Resolves sensu#589

Original Author: john.puskar <[email protected]>

The chocolatey package provider may be exercised with `vagrant up
win2012r2-client-chocolatey`.  There is no `senu` package in the public
chocolatey repository, however, so installation will fail with the following error:

    ==> win2012r2-client-chocolatey: Error: Execution of 'C:\ProgramData\chocolatey\bin\choco.exe install sensu -y ' returned 1: Ch
    ocolatey v0.10.7
    ==> win2012r2-client-chocolatey: Installing the following packages:
    ==> win2012r2-client-chocolatey: sensu
    ==> win2012r2-client-chocolatey: By installing you accept licenses for the packages.
    ==> win2012r2-client-chocolatey: sensu not installed. The package was not found with the source(s) listed.
    ==> win2012r2-client-chocolatey:  If you specified a particular version and are receiving this message, it is possible that the
     package name exists but the version does not.
    ==> win2012r2-client-chocolatey:  Version: ""
    ==> win2012r2-client-chocolatey:  Source(s): "https://chocolatey.org/api/v2/"
    ==> win2012r2-client-chocolatey: Chocolatey installed 0/1 packages. 1 packages failed.
    ==> win2012r2-client-chocolatey:  See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Even with this error, the behavior of the chocolatey package provider is
exercised.
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 8, 2017
Without this patch package resource used to install sensu on Windows defaults
to the `msi` provider and can't easily be changed to the Chocolatey provider.
This patch addresses the problem by adding a new class parameter,
`sensu::windows_package_provider` which defaults to `undef`, the default
behavior of Puppet on windows, and can be set to `'chocolatey'`.

Closes sensu#664
Resolves sensu#589

Original Author: john.puskar <[email protected]>

The chocolatey package provider may be exercised with `vagrant up
win2012r2-client-chocolatey`.  There is no `senu` package in the public
chocolatey repository, however, so installation will fail with the following error:

    ==> win2012r2-client-chocolatey: Error: Execution of 'C:\ProgramData\chocolatey\bin\choco.exe install sensu -y ' returned 1: Ch
    ocolatey v0.10.7
    ==> win2012r2-client-chocolatey: Installing the following packages:
    ==> win2012r2-client-chocolatey: sensu
    ==> win2012r2-client-chocolatey: By installing you accept licenses for the packages.
    ==> win2012r2-client-chocolatey: sensu not installed. The package was not found with the source(s) listed.
    ==> win2012r2-client-chocolatey:  If you specified a particular version and are receiving this message, it is possible that the
     package name exists but the version does not.
    ==> win2012r2-client-chocolatey:  Version: ""
    ==> win2012r2-client-chocolatey:  Source(s): "https://chocolatey.org/api/v2/"
    ==> win2012r2-client-chocolatey: Chocolatey installed 0/1 packages. 1 packages failed.
    ==> win2012r2-client-chocolatey:  See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Even with this error, the behavior of the chocolatey package provider is
exercised.
ghoneycutt added a commit that referenced this issue Jul 8, 2017
@ghoneycutt
Copy link
Collaborator

Released in v2.18.0

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

No branches or pull requests

5 participants