Author Posts

April 5, 2016 at 12:41 pm

Might sound strange but we are planning to use Chef utilizing DSC resources. For this to work LCM needs to be in ApplyOnly mode and needs to be able to pull missing DSC resources from centralized location. I'm not sure how to properly implement this tie in without having LCM trying to pull resources from centralized location. Or what is common scenario in such cases?

April 5, 2016 at 1:13 pm

Hi,

yes that's one reason why we can now tell the LCM to take the configuration, resource and reporting from different locations.

https://msdn.microsoft.com/en-us/powershell/dsc/metaconfig

You need to implement the ResourceRepositoryWeb part only so it will only get the missing DSC resources,

Note that you can also use a different method for missing resourced and that's changing the $env:PSModulePath to include a share on your network where all the reousrces are
Or you can always use Push to the node, which I think has better control.
To make it more smart you can always scan the DSC resource for the Import methods and then scan each node to see whats missing and then push those missing bits to the node.

Not all options work in all situations and networks 🙂

April 5, 2016 at 1:20 pm

Thanks.
I don't think it's possible to utilize any of the methods you mentioned with Chef dsc_resource (https://docs.chef.io/resource_dsc_resource.html) except for making LCM to pull neccessary resources from HTTP/SMB share, also HTTP method does not require dealing with authentication like SMB/copying manually would require.