Giter Site home page Giter Site logo

Comments (6)

johlju avatar johlju commented on June 11, 2024

If "loading facts" stage runs the method Get on all DSC resources then the media must be available at that point since the version of the media (the version of setup.exe) is used to determine the version that is gonna be installed (media must be available for all methods, Get, Test, and Set).

from sqlserverdsc.

johlju avatar johlju commented on June 11, 2024

Is it possible to tell Puppet not to evaluate SqlSetup until runtime?

from sqlserverdsc.

johlju avatar johlju commented on June 11, 2024

my first step is to copy the iso from a corporate file share and extract it

Another option is let SqlSetup do this copy by adding SourceCredential. Then it will mount a share that SourcePath points at and get the version from sqlsetup.exe on that path (it must be already extracted at source). When method Set run it will mount the share and copy the content of the SourcePath to a temporary local path, and install from that local path.

from sqlserverdsc.

unkinected avatar unkinected commented on June 11, 2024

Is it possible to tell Puppet not to evaluate SqlSetup until runtime?

I thought I had done all that by trying dependencies, virtual resources, and run stages, but if there's a way to delay Puppet calling Get-TargetResource until later, I'm not sure.

I took a look at the source code for sqlsetup and tried playing around by adding an optional "SqlVersion" parameter that would obviate the need for SourcePath during Get-TargetResource. I got too far in the weeds and decided to go another route.

It looks like the SourceCredential option wouldn't work for me... the "corporate file share" I mentioned is actually in an Azure storage file share, which is not as easily accessible, so the steps to download the ISO and extract it require more work than sqlsetup can handle.

I've worked around this for now by simply requiring our team to download and extract the ISO before applying the sqlsetup module. This two step process is less than ideal, but at least it gets me to the end goal.

from sqlserverdsc.

johlju avatar johlju commented on June 11, 2024

I took a look at the source code for sqlsetup and tried playing around by adding an optional "SqlVersion" parameter

That was a thought I had too when I read this issue. I think it would be easy enough to just set $sqlVersion to a parameter SqlVersion instead of running these two lines.

$sqlVersion = Get-FilePathMajorVersion -Path $pathToSetupExecutable

$sqlVersion = Get-FilePathMajorVersion -Path $pathToSetupExecutable

Since it would be optional it wouldn't break anything else.

from sqlserverdsc.

johlju avatar johlju commented on June 11, 2024

@unkinected I pushed this change in 16.5.0-preview0001 - try it and report back if there are any issues.

from sqlserverdsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.