In my previous posts, the focus was on giving some background information about how the desired state configuration is working (DSC), some ideas how to use and some details for a very simple example.
Here I'm going to pass ~~ POS = TRUNC go a configuration that a configuration in the DSC resources to apply a number of uses built.
First, I want to back up a bit and call a concept. If you made a lot of blog posts and TechNet documents there read all examples see, you could easily describe as installation focused. Or only changes to the system that you would do if something install. And this observation is correct. DSC is still in this state v1 to this letter, which means that people are accustomed to use it, it stretches. And frankly talk about install actions is relatively simple.
One thing I want to mention now is that anyone can build a custom resource. And if you want to configure an application, this is the way to go. Put all your complex logic in this custom resource. Or wait for the software vendors that the custom resource to write, so you can use it. And you have to ask them to do that, for you to bring the ball rolling. There is nothing that says that DSC is not the applications are configured to be installed in a previous step. We are closer to that later on
Back to this example, a Citrix license server with DSC resources Installation
Before getting into my example I would like to mention a few things: ..
- In my setup I'm using the full XenDesktop media ISO as a ZIP archive, and I am hosing it on an HTTP endpoint (IIS server). This is an internally hosted, isolated and unsecured endpoint - strictly to demonstrate it an example of various resources and opportunities. In other words, you learn from the example but please "do not do this at home."
- I am also no orders show that Citrix eDocs not already documented in even the DSC documentation in TechNet . You need to read these sources for the final and current documentation
Here, the configuration script is example :.
Let's start by this work. Example
In line 3 is something new; Import DscResource. This will now modules are called if they are not sent as part of the operating system. able to take on this configuration, the xPSDesiredStateConfiguration module must be in the PowerShell path before. If you observe the behavior of a pull configuration, you will notice that it uses the path "% Program Files% Windows Modules" - and for this reason I tend to me, that you can use. More on custom resource
In lines 7 later - .. 12 of [File] see citrixFolder resource that I have shown in previous articles
In lines 14 to 31 is something new Good. The resource script.
This is a utility resource that fills a gap when there is no other resource available to perform your actions. If you use the script resource, write essentially a mini custom resource -. It has all the same basic requirements of a custom resource provider
In this case, I have the Web Client'm using the XenDesktop media to the% download program% path I defined with [File] citrixFolder. You might also notice that there is a dependency on this earlier resource to ensure that the download path exists before
lines. 33-39 Use the archive resource. Here I define the way that I know that the ZIP (previous function) is present, and the goal I want it withdrawn.
If you are running the Verbose switch when configuring the application you will find something interesting behavior with this notice provider. The archive provider actually opens the ZIP, reads each file and checks the destination of the existence of the file. If a file is present, it will not be extracted, if it is not present it is extracted. This is just a little insight into the thinking how desired state works and what it means to apply a configuration
lines. 41 - 50 to the package of resources. This resource is used to install or uninstall packages. It is centric to MSI packages, but it can also be used with .exe packages. The installer must support automatic installation. Also, as you can see, I left the ProductId empty -. This is a feature of MSI packages, so I had to define it in this way
rows 52 to 57 are the reason for the import DscResource. Within this module is the provider xRemoteFile. This resource allows me to use a URI as the source. I define the source file and my goal - and that is my license file exactly where my license server is the default path. Ready to go!
Why did not I use this instead of the script extension? Good question. It's because I'm downloading the file the script resource is too large and using the download fails at 1.7 Gb in a very reliable manner (it's actually a very old mistake).
This is it. The hardest part is getting the infrastructure work the media and files get delivered.
But honestly, is MSFT working on this problem. Have you heard of or OneGet PSGet? OneGet is all about the packages, packages that could be used by DSC. PSGet is about PowerShell modules. And, you can set up your own internal version, if you do not trust the public repositories. But the nice thing is this; ISVs can publish packages to OneGet - and their customers only points to it and before it, that the application to know is downloaded and installed. Really nice delivery method -. Almost like yum for Windows
Like what you read here? Read other posts about desired state configuration
very interesting blog your resource is very helpful.
ReplyDeleteFinal Year Iot Projects Chennai
Latest ieee Paper Titles 2020
Final Year Projects 2020
Final Year Matlab Project Centers Chennai