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

Installing resources #398

Open
mgreenegit opened this issue Apr 10, 2024 · 1 comment
Open

Installing resources #398

mgreenegit opened this issue Apr 10, 2024 · 1 comment
Labels
Issue-Enhancement The issue is a feature or idea

Comments

@mgreenegit
Copy link
Member

Summary of the new feature / enhancement

From PS & DevOps Summit session on authoring DSCv3 modules - we will need some way to install resources.

ideally, this could even happen on demand but only from trusted sources.

@joshcorr

Proposed technical implementation details (optional)

Since each language has distinct ways to install "things", we could make "install" a capability of adapters.

dsc resource install 'computermanagementdsc' --adapter 'microsoft.dsc/powershell'
(would run install-psresource computermanagementdsc)

@mgreenegit mgreenegit added the Issue-Enhancement The issue is a feature or idea label Apr 10, 2024
@michaeltlombardi
Copy link
Collaborator

Related issues include:

There are two related problems that this issue is discussing, both highlighted in the linked issues:

  1. How do I discover DSC Resources that aren't already on my machine?
  2. How do I install those resources other than finding and downloading/installing them manually or with separate software depending on my platform, how the software is packaged, etc?

#92 addresses the discoverability problem by proposing a registry of DSC Resources, similar to the PowerShell Gallery.

#47 is specifically discussing a functional-within-DSC mechanism for the installation problem.

This situation is more complicated for DSCv3 than in PSDSC - in PSDSC, you could always just rely on a PowerShell repository for both discovery and install, because there was only one package type independent of platform. For DSCv3, a resource might be available through one or more package management tools and only some subset of available operating systems.

It seems unlikely that we'll write a meta resource that itself handles installing apt, yum, winget, MSI, standalone binary, and OSX packages. More likely, we'll have to do something like I proposed in #92, where resource manifests advertise how to install their associated CLI software (and any resource without the install property can only be manually installed):

{
    "$schema": "https://aka.ms/dsc/schemas/resource_manifest",
    "manifestVersion": "1.0",
    "type": "TSToy/gotstoy",
    "version": "0.1.0",
    "install": {
        "type": "DSC/Intall.GitHubRelease",
        "properties": {
            "repo":  "TSToy/gotstoy"
            "version": "0.1.0"
        }
    },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement The issue is a feature or idea
Projects
None yet
Development

No branches or pull requests

2 participants