Why Desired State Configuration?

As mentioned previously, Desired State Configuration is a configuration management framework. With DSC, many problems can be tackled, especially related to DevOps scenarios. See the following table for examples:

Problem

What DSC can do for you

Manual deployments are labor-intensive and error-prone

Enacts configuration as code, write once, deploy over and over.

Development, test, and production environments drift apart

Keep the same configuration with different configuration data in source control, deploy at any time.

Complex deployment scripts can stop or break during deployment

DSC can handle reboots and other disruptive influences, and will enact the configuration regardless

Dev is agile, Ops is not

Ops becomes agile by defining infrastructure in code. Less time for emergency fixes, more time for improvements.

Server configuration drifts over time after outages or manual intervention

DSC keeps the configuration applied until forced not to.

Since Desired State Configuration is just a framework, you are free to choose or build the tooling around it. It is based on open standards such as the Common Information Model, the Managed Object Format (MOF), and the Open Management Infrastructure. All your configurations will become human-readable text files that can be put into source control, and can be built and deployed on demand. To support DevOps, the same configuration can be fed with different configuration data depending on the environment you are in.

PowerShell is capable of using domain-specific languages (DSL) with modules such as Pester, psake, and others. DSC is no exception to that and provides its own DSL, which consists of several key elements for you to combine—configuration, node, and resources:


To control the Local Configuration Manager and push configurations, and verify the validity of your configurations, there are several cmdlets. These differ very much between WMF 4.0, 5.0, and 5.1. In particular, troubleshooting has been much improved in WMF 5.0:

Cmdlet WMF 4 WMF 5
Configuration x x
Get-DscConfiguration x x
Get-DscLocalConfigurationManager x

x

Get-DscResource x x
New-DscChecksum x x
Restore-DscConfiguration x x
Test-DscConfiguration x x
Set-DscLocalConfigurationManager x x
Start-DscConfiguration x x
Remove-DscConfigurationDocument KB300850 x
Stop-DscConfiguration KB300850

x

Update-DscConfiguration KB300850 x
Find-DscResource x
Get-DscConfigurationStatus x
Invoke-DscResource x
Publish-DscConfiguration x
Enable-DscDebug x
Disable-DscDebug x
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.67.251