Now a day, I am exploring Azure Automation State Configuration concepts and here I found that, it has dependencies with other Azure components like, Azure VM Agent, Azure Extension, Powershell Desired State Configuration (DSC). It took a long time to actually understand the concept and it is a big chapter to write in a single blog. So today here we will, go through the basic concept of Azure Automation State configuration and it’s dependents. We will post another blog, where we would go with examples, how to Configure Azure Automation State Configuration.
Azure Automation State Configuration :
Azure Automation State Configuration is an Azure service that allows you to write, manage, and compile PowerShell Desired State Configuration (DSC) configurations, import DSC Resources, and assign configurations to target nodes, all in the cloud.
To work with Azure State Configuration, We must have knowledge about, Azure VM Agent, Azure VM Extensions, Azure Powershell Desired State Configuration (DSC).
Azure Automation State Configuration provides following nice features.
- Built-in pull server
- Management of all your DSC artifacts
- Import reporting data into Log Analytics
Azure VM Agent :
The Microsoft Azure Virtual Machine Agent (VM Agent) is a secure, lightweight process that manages virtual machine (VM) interaction with the Azure Fabric Controller. The VM Agent has a primary role in enabling and executing Azure virtual machine extensions. Without the Azure VM Agent, VM extensions cannot be run. Recently we had posted a blog , where we have specify, how to configure a VM with Azure VM Agent.
This is very simple, we need to download “Window Azure VM Agent” and start installing the downloaded MSI file as shown in the following figure.
Figure 1: Azure Certification 70-532 – Installing Window Azure VM Agent
To make sure that the installation done successfully, we can check it from running Services on Virtual Machine.As shown in the following figure, the following two service must be on running state.
- Window Azure Telemetry Service
- Window Azure Guest Agent Service
Azure VM Extensions :
Azure virtual machine (VM) Extensions are small applications that provide post-deployment configuration and automation tasks on Azure VMs. For example, if a virtual machine requires software installation, anti-virus protection, or to run a script inside of it, a VM extension can be used. VM extensions also enable recovery features such as resetting the administrative password of a VM. Without the Azure VM Agent, VM extensions cannot be run. To add new Extensions, We need to go to the required VM and select Extensions form Setting Section of VM and then click + Add to add a new Extension s shown in the following figure. After that it will show a list of available Azure Extensions and we need to select one of them and click Create button to deploy/install the extension.
Azure Desired State Configuration (DSC) Extension :
Desired State Configuration (DSC) is an essential part of the configuration, management and maintenance of servers. It allows a PowerShell script to specify the configuration of the machine using a declarative model in a simple standard way that is easy to maintain and understand. Using Azure automation DSC, one can create and manage PowerShell Desired State Configurations, import DSC resources, and generate DSC node configurations. The Azure DSC extension can use DSC configuration documents to directly configure Azure VMs during deployment.
To Start with the Azure DSC configuration, following basic steps need to be taken care .
- Add Powershell DSC Extension to the VM : As shown in the above figure,After Powershell DSC Extension created, this will consider as a handler to all DSC configuration.
- Prepaire DSC Configuation document : To use DSC to configure our environment, first, we need to define a Windows PowerShell script block using configuration keyword.This script will be with detail configuration of Node and Resources.
- Importing a configuration into Azure Automation : Once Configuration document prepaired, import to Azure to be compiled.
- Compile DSC Configuration file : When we compile a configuration in Azure Automation, it automatically deploys any created node configuration MOFs to the pull server.
- Assign a node configuration to a managed node : Now we can assign the compiled node configuration to the VM we want to configure.
- Check the compliance status of a managed node : we can get reports on the compliance status of a managed node.
As we know, it is possible to configure Azure Automation State Configuration and Azure Powershell Desired State Configuration (DSC) in two different approaches. One is using powershell and other one is through Azure portal.We have post one blog on Configure Azure PowerShell Desired State Configuration (DSC) Through Azure Portal.
Thanks for reading 🙂
Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.
Stay tuned on Knowledge-Junction, will come up with more such articles.
More Posts On Exam : Developing Microsoft Azure Solutions :