I’m still somewhat a newby and trying to get my first Pull server working properly. The basic idea is to develop a module that will install our company’s product (a web-app with multiple databases and config files to be updated).
I have got as far as creating a DSC resource that runs well standalone (that is, the server pushes to itself) or in Push mode. The basic flow is 1) copy zip file; 2) unzip zip file; 3) set permissions for specific folders. I’m sure I’ll be modifying it in detail in the coming weeks, but getting these basics down is very important in setting the fundamentals for the rest of the steps.
The resource relies on the Carbon-Permissions module in order to set permissions, and obviously that works well in Push mode when I have already installed the module. However, when a client without the resources tries to pull the module from the pull server, I get the following error (via the Pull Client’s event log):
Error Message: Cannot find module Carbon_2.1.1 from the server http://tpz-dsc-pkg.topaz-dsc.private:8080/PSDSCPullServer.svc//Module(ConfigurationId=‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’,ModuleName=‘Carbon’,ModuleVersion=‘2.1.1’)/ModuleContent.
Message ID: WebDownloadManagerModuleNotFound,Microsoft.PowerShell.DesiredStateConfiguration.Commands.GetDscModuleCommand
The Pull Server’s web.config clearly points to the Program Files location for Modules:
[appSettings] [add key="MaxConcurrentRequests" value="10000" /] [add key="MaxRequestsPerTimeslot" value="10000" /] [add key="TimeslotSize" value="1" /] [add key="dbprovider" value="ESENT" /] [add key="dbconnectionstr" value="C:\Program Files\WindowsPowerShell\DscService\Devices.edb" /] [add key="ConfigurationPath" value="C:\Program Files\WindowsPowerShell\DscService\Configuration" /] [add key="ModulePath" value="C:\Program Files\WindowsPowerShell\DscService\Modules" /] [add key="RegistrationKeyPath" value="C:\Program Files\WindowsPowerShell\DscService" /] [/appSettings]
I have made sure that the module (both in .zip file format as well as trying to copy the 2.1.1 version in a custom-configuration deployment format) is available in the C:\Program Files\WindowsPowerShell\DscService\Modules folder, with contents as follows:
Carbon-2.1.1
…DscResources
…Carbon_Permission
…Carbon_+Permission.psm1
…Carbon_Permission.schema.mof
…Carbon.pds1
…Carbon.psm1
…Carbon.types.ps1xml
…Import-Carbon.ps1
…Carbon-2.1.1.zip
…Carbon-2.2.0.zip
(I know that’s a long-winded way of trying to show the folder structure. If there are any tips for this, I’d appreciate it )
So, after a couple of hours of searching and reading blogs, book chapters and the like, I’m at a loss for trying to find out why I can’t deploy this resource, or at least how to stage it to ensure that it gets deployed.
Any ideas? (btw, if one is to configure PowerShell Gallery or Chocolatey as a default download site, that’s a possibility, but we are going to have customers who will be reluctant to opening their firewalls to downloading anything, so if we can serve up all that we need, that would be great).