Automation Desired State Configuration (DSC)
Share this post
In the previous step, we discussed Automation DSC and in this step, we will view a demo.
DSC Configuration Files
DSC configurations are PowerShell scripts that define a special type of function. Review this simple configuration.
The Configuration block is the outermost script block. In this case, the name of the configuration is LabConfig. Notice the curly brackets to define the block
There can be one or more Node blocks. These define the nodes (computers and VMs) that you are configuring. In this example, the node targets a computer called WebServer.
Lastly, there can be one or more resource blocks. This is where the configuration sets the properties for the resources. In this case, there is one resource block called WindowsFeature. Notice the parameters that are defined.
Note: You can create the configuration in any editor, such as the PowerShell ISE. Save the file as a PowerShell script with a ps1 file type
Import and Compile
After you create your DSC configuration file, you must import the file and compile it to the DSC pull server. Compiling will create the MOF file.
Note: If you prefer, you can use the PowerShell Start-AzureRmAutomationDscCompilationJob to compile the configuration file.
Registering DSC Nodes
After your configuration is in place, you select the Azure virtual machines or on-premises virtual machines that you would like to onboard:
For each machine, you need to configure the registration data
Monitoring DSC Jobs
Each time that Azure Automation DSC performs a consistency check on a managed node, the node sends a status report back to the pull server. You can view these reports on the blade for that node.
Notice that you can also Unregister the node and Assign it a different configuration.
In our next step, we will complete our second CloudSwyft Hands-On Lab focusing on standardising environments.
Share this post
Microsoft Future Ready: Fundamentals of DevOps and Azure Pipeline

Microsoft Future Ready: Fundamentals of DevOps and Azure Pipeline

Reach your personal and professional goals
Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.
Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.
Register to receive updates
-
Create an account to receive our newsletter, course recommendations and promotions.
Register for free