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 chocolatey dependency type #24

Closed
RamblingCookieMonster opened this issue Jan 7, 2017 · 5 comments · Fixed by #109
Closed

Add chocolatey dependency type #24

RamblingCookieMonster opened this issue Jan 7, 2017 · 5 comments · Fixed by #109

Comments

@RamblingCookieMonster
Copy link
Owner

We support PackageManagement, but, that's not exactly recommended over choco.exe at the moment.

@gaelcolas
Copy link
Contributor

gaelcolas commented Jan 9, 2017

Maybe supporting DSC as a Dependency type via Invoke-DSCResource is a more generic option here.
The main drawbacks I can think of are:

  • it's PSv5 and up only,
  • it does not cater for more complex DSC Configuration (does not work with composite resouces)

The advantage is that it allows to then extending the Dependency Types by proxying the DSC Dependency type (i.e. creating a Choco dependency type by proxying the DSC Dependency type on the Choco DSC resource). Thus leveraging all the existing DSC Resources...

Maybe a fully fledged DSC dependency can be created using the LCM (hence supporting Composite resource), but that sounds a bit more work.

@RamblingCookieMonster
Copy link
Owner Author

So! If we end up creating a chocolatey dependency type, I'm inclined to include a test/bootstrap bit in the dependency script.

Given that folks can preload (we'll include a param for path that defaults to choco command resolution path), any concern simply calling the standard install script in the off case a bootstrap is needed?

@gaelcolas
Copy link
Contributor

Good idea, but I think that script is missing 1 feature: a configurable Nuget server (say you want to install from a local feed, and retrieve the latest versions).
It's possible to extract that and populate the $Env:chocolateyDownloadUrl, but making it a bit more transparent to the user would be nice.

for other functions, I wrote a few here that could help out: https://github.com/gaelcolas/PackageProviderBootstrap/tree/master/PackageProviderBootstrap/public

@gaelcolas
Copy link
Contributor

FWIW, I re-wrote the Install script and that module for Chocolatey + DSC here: https://github.com/gaelcolas/Chocolatey/

So to bootstrap you could use Install-ChocolateySoftware (it defaults to https://chocolatey.org/api/v2 but you can override to your internal NuGet feed). Beware, that file has dependency on 2 other file/functions.

At that point, I wonder if it's not worth implementing a DSC Dependency type instead, so that could just use this chocolatey module directly...?

@michaeltlombardi
Copy link
Contributor

Thinking of this way, way late, but @ferventcoder might have thoughts on this.

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 a pull request may close this issue.

3 participants