Describe the use cases for Azure Automation configuration

Automation of infrastructure state is often refereed to as ‘infrastructure as code’. A key aspect of this practice is Desired State Configuration, that is ensuring through automation that infrastructure services are configured as expected.

  • Azure Automation – Desired State Configuration
    • Ensure installs / configures a component if missing
    • Absent removes a component or configuration setting if present
    • Scripts defined in Powershell Runbooks
    • For Windows platforms automate almost any task
    • Consider System Center Orchestrator for higher level management and GUI
  • Chef – 3rd party product for management, automation & analytics
    • Client installed which periodically checks server for updates
    • Built on Ruby
    • Supports Windows, Linux, Mac
    • Cookbooks (group of scripts) known as recipes
    • Knife plugin used for Azure integration
  • Puppet – similar to Chef
    • Azure supports automatic deployment of Puppet Enterprise Agent
    • Configure client to communicate with Puppet Master Server

Design Azure Automation and PowerShell workflows

It is important to note the importance of PowerShell, it can be used to carry out any task available in the Azure portal and more beyond that. To get started download the Azure module for Powershell, which is installed by the Web Platform Installer. PowerShell must authenticate with Azure before carrying out any operations which can be achieved using:

  • AD account – Add-AzureAccount
  • Computer certificate – Get-AzurePublishSettingsFile

Some common commands to be aware of:

  • Get-AzureAccount (accounts currently connected)
  • Remove-AzureAccount (remove connected accounts)
  • Get-Help (show help on PowerShell commands)

The MSDN Azure Cmdlet Reference site is one useful source of information on available Azure PowerShell cmdlets and commands. The Azure GitHub repository ‘contains a set of PowerShell cmdlets for developers and administrators to develop, deploy and manage Microsoft Azure applications.’

Windows PowerShell workflows (runbooks) can be configured in Azure Automation and provide powerful automation and orchestration capabilities.