Netherlands: Software

Introductie Windows Server 2016

Issue link:

Contents of this Issue


Page 154 of 173

145 C H A P T E R 7 | Systems management } PartialConfiguration IndexFile { Description = 'Configuration for Index File' ConfigurationSource = '[ConfigurationRepositoryWeb]PullServer2' DependsOn = '[PartialConfiguration]IISInstall' } } } ChangeLCMProperties -OutputPath "C:\DSC" Set-DscLocalConfigurationManager -Path "C:\DSC" Assuming that the pull servers are already available on the mentioned servers, you must change the LCM Meta Configuration settings on all servers that will participate and pull configurations from them. The preceding configuration sample has a node section named DemoServerWin. It signifies that the configuration modifies the LCM configuration of DemoServerWin. Attribute DSCLocalConfigurationManager mandates that only resources applicable for LCM Meta Configuration can be used in this configuration. General resources cannot be used in such configurations. Using this attribute is the way to indicate to DSC that this configuration relates to LCM configuration. The Settings resource is configured with the RefreshMode property set to Pull, the ConfigurationMode property set to ApplyandAutoCorrect, the ConfigurationID property set to fcd03a8d-5a64-4982-92b3-5c89680add39, and the RebootNodeIfNeeded property set to True. LCM downloads configuration files from the pull server whose name has the same GUID as that assigned to the ConfigurationID. In Listing 5-7, LCM would download configuration files with fcd03a8d-5a64- 4982-92b3-5c89680add39 in their names from all pull servers. You also need to provide the pull server details to LCM. In LCM v2, you can do so by using the WebConfigurationRepository resource. There can be multiple pull servers (WebConfigurationRepository resources) defined in a configuration. In the previous sample, two pull servers are defined: PullServer1 with server URL http://serverwin10:9000/PSDSCPullServer.svc/ and AllowUnsecureConnection set to True, and PullServer2 with server URL http://Demoserverwin10:8090/PSDSCPullServer.svc/ and AllowUnsecureConnection set to True. AllowUnsecureConnection allows LCM to request configuration on HTTP protocol instead of HTTPS protocol. The PartialConfiguration resource defines configuration fragments. Two partial configurations, IISInstall and IndexFile, are defined. IISInstall configuration is available on PullServer1, whereas IndexFile configuration is available on PullServer2. Important to note are the names of the partial configurations because they should exactly match the names of the configurations on the pull server. The next section will show that IISInstall configuration is authored and available on PullServer1 and IndexFile configuration is available on PullServer2. The ConfigurationSource property attaches the pull server to the partial configuration. Also, note that the pull server URL, ConfigurationID, and Configuration Name combined provide LCM with complete information to uniquely identify configuration on the pull server. LCM cannot pull partial configurations if any of these three pieces of information is missing. The configuration previously shown generates the DemoServerWin.meta.mof file at the C:\DSC folder location. You use the Set-DSCLocalConfigurationManager cmdlet to push and apply the MOF file to DemoServerWin. Authoring the configurations Next, we examine authoring the configurations that will participate in partial configuration. In this section, two configurations, IISInstall and IndexFile, are authored on separate servers, DemoServerWin10 and ServerWin10, respectively.

Articles in this issue

Archives of this issue

view archives of Netherlands: Software - Introductie Windows Server 2016