Introduction to Azure Automation
Azure Automation: Runbooks
Azure Automation: Desired State Configuration (DSC)
Join Trevor Sullivan, a Microsoft MVP for Windows PowerShell, in this conceptual and practical course covering the Microsoft Azure Automation service! This course from Cloud Academy guides you through the fundamental concepts of Azure Automation, and offers live demonstrations for all of its major components, including cloud-based PowerShell Runbooks, and a cloud-hosted Pull Server for PowerShell Desired State Configuration (DSC)! Leave a comment on the course, get involved in the discussion, and tell us what you'd like to see more of!
The Microsoft Azure Automation service offers two key components, both of which are covered in depth, in this course:
- Runbook Automation - Execute PowerShell-based Runbooks securely in the cloud. Runbooks can be authored as PowerShell scripts, PowerShell Workflows, or as Graphical Runbooks, using an in-browser designer. Azure Automation provides an "asset store" that enables you to store supporting variables, credentials, schedules, and other resources, which can be referenced by Runbooks. Once you've created or imported an Azure Automation Runbook, you can invoke it directly from the Azure Portal, from the Azure Resource Manager (ARM) PowerShell module, or even from external services through the use of Webhooks!
- Automation Desired State Configuration (DSC) - Manage your cloud and on-premises Windows or Linux infrastructure using declarative configuration files that are hosted in the cloud! With Azure Automation DSC, there's no need to set up a PowerShell DSC Pull Server, which normally would require additional infrastrucutre, complex configuration, and ongoing maintenance! Simply create an Automation Account, upload your PowerShell DSC configurations and compile them into "node configuraitons" (MOF files)! After "onboarding" (registering) your managed nodes with Azure Automation, you can assign the node configurations to each node, and you're done! There isn't an easier way to get stared declaratively managing your nodes, than signing up for Azure Automation DSC.
After watching this Cloud Academy course, you'll be empowered to start automating tasks, using Windows PowerShell, in a cloud-first approach! You'll also be able to set up Azure Automation as a cloud-based PowerShell DSC Pull Server, making it incredibly easy to start managing your nodes using declarative PowerShell syntax. If you have any comments for this course, please leave a comment on the course, or e-mail email@example.com!
This course isn't intended to be a deep dive on authoring PowerShell scripts and PowerShell Desired State Configuration (DSC) documents, but keep an eye out for content surrounding these topics!
Welcome to Microsoft Azure Automation, the Overview lecture. In this lecture, we're going to cover an overview of the Azure Automation service. We'll take a brief look at a couple of use cases for Azure Automation. We'll then take a quick look at runbooks and Desired State Configuration at an introductory level. In future lectures, we'll go into those services in much more depth.
Before we get started, we need to agree on some common terminology. In the context of Microsoft Azure Automation, the following terms will be quite common. First is the runbook, and a runbook refers to any PowerShell script that is executed in the cloud. This included PowerShell Workflows, PowerShell script code, as well as graphical runbooks. Configuration documents are PowerShell configurations that are declared as part of the Desired State Configuration feature. Configuration data is environmental-specific data that is fed into a configuration document when it's compiled into a node configuration or MOF file. The node configuration is the MOF version of the configuration document that is expressed in PowerShell syntax. PowerShell scripts refer to a single PowerShell script file that could contain entities, such as functions, workflows, DSC configurations, and other generic PowerShell code. The Managed Object Format, or MOF, is a standard from the distributed management task force that defines a textural representation, or syntax, for Common Information Model, another standard, objects. Finally, in the context of Azure Automation, a workflow is a PowerShell Workflow code block, and PowerShell Workflows run in the context of the Windows Workflow Foundation Engine.
Let's introduce the two service offerings that are provided by Azure Automation. First, we have Runbook Automation, and what this service allows us to do is to create Automation scripts using PowerShell, or using a graphical interface, and execute those PowerShell scripts securely in the cloud. The Runbook Automation service provides an asset store that allows you to store and retrieve variables, schedules, credentials, and other types of information securely in the service.
Azure Automation also provides a Desired State Configuration pull server service. Essentially what this is, is a cloud-based DSC pull server that reduces the requirement for you to set up and manage your own Windows Server instance to act as a DSC pull server.
Let's take a few looks at some use cases for Azure Automation. The first may be that you want to start up and shut down, or simply scale up or scale down virtual machines using Automation. The Azure Automation service allows you to deploy a runbook, or PowerShell script, that performs operations on virtual machines such as starting or stopping them, or resizing them.
Azure Automation also provides the facility through runbooks to perform periodic database maintenance on your Azure SQL Databases, or Azure SQL Databases that are hosted on Azure Infrastructure Virtual Machines. In the context of Desired State Configuration, Azure Automation as we mentioned before acts as a DSC pull server, so that your virtual machines that are running inside of Azure or on-premises can pull their DSC configuration from the Azure Automation service.
So which regions in Azure are supported by the Azure Automation feature? Well, Azure Automation actually supports a subset of all the available regions inside of Microsoft Azure. As of today, five of those regions are supported, ranging from West Europe to East US 2, and Japan.
How can I stay up to date with Azure Automation features? Well, first of all, you can follow the Azure Automation Twitter account, which posts periodic updates. You can also watch the Microsoft Azure blog for posts that are tagged with the Azure Automation service.
About the Author
Trevor Sullivan is a Microsoft MVP for Windows PowerShell, and enjoys working with cloud and automation technologies. As a strong, vocal veteran of the Microsoft-centric IT field since 2004, Trevor has developed open source projects, provided significant amounts of product feedback, authored a large variety of training resources, and presented at IT functions including worldwide user groups and conferences.