Learning Azure Desired State Configuration for use with Azure DevOps practices.
Azure provides a DSC Pull server, which can check for VM Server state changes and make sure your VM is always in compliance with your powershell desired state configuration file.
- Create a Azure/AWS VM that you want to use. (if you want to use a local machine you must configure it to point to a DSC Pull server - google that it's there)
- Create a .ps1 DSC Configuration file similar to ConfigureWeb.ps1
- Test the PS1 file on your local machine by running the configuration in a powershell command prompt.
- Create an Azure Automation account.
- In the Azure Automation account select desired state configuration
- Add a new Configuration, upload the ps1 file.
- Click on "Compile" to verify and validate your powershell can run.
- Once compiled, Click on the Node tab in the Desired State Configuration section of the Azure Automation app.
- Add a new node - select the VM (AWS or Azure or local machine you want to use).
- Select the Configuration node to apply.
- That's it...!