Getting Started With Azure Automation

What is Azure Automation?

As its almost clear from name, Azure Automation provides a way for users to automate the manual, long-running tasks in the Azure environment. It saves time, humane errors and increases the reliability of day to day administrative tasks in Azure. It is also possible to schedule these automated processes to run at specific intervals.

You can automate processes using runbooks or automate configuration management using Desired State Configuration and even integrate it with your continuous integration tools.

What is Azure Runbook?

A runbook is nothing but a set of related tasks that perform some automated process together. It may be a simple process such as few lines of PowerShell or a very complex one like deploying multiple services across multiple clouds and on premise environments.

For example, you might have an existing manual process for data disk that if its approaching a certain threshold, expand the disk, delete old log files and then notify admins. This includes several steps such as getting a notification first, connecting to Azure, connecting to virtual machine, logging in etc. Instead of manually performing each of these steps, you could create a runbook that would perform each of these required steps as a single process. You then only need to set a schedule for the runbook and let it run and do the steps for you.

What can I automate using runbooks?

Runbooks in Azure automation are based on either Windows PowerShell or Windows PowerShell workflow, so they can do anything that PowerShell can do.

Since Azure automation runbooks run in Azure itself, they can pretty much access all cloud resources as well as external resources.

You can also use hybrid runbook worker, to manage local resources in the local datacenter.

How to create Runbooks with Azure Automation

You can create your own runbooks from scratch or modify runbooks from the Runbook Gallery for your own requirements. There are three different runbook types that you can choose from based on your requirements and PowerShell experience. If you prefer to work directly with the PowerShell code, then you can use a PowerShell runbook or PowerShell Workflow runbook that you edit offline or with the textual editor in the Azure portal. If you prefer to edit a runbook without being exposed to the underlying code, then you can create a Graphical runbook using the graphical editor in the Azure portal.

Automating configuration management with Desired State Configuration

You can use Azure Automation DSC, which is a cloud based solution for PowerShell DSC that provides services required for enterprise environments. You can manage your DSC resources in the Azure automation and apply configurations to virtual or physical machines. You can define configurations on a central DSC Pull server that target machines can automatically retrieve and apply.

Creating your own DSC configurations

You can create a configuration using any text editor on your local machine and then import it into Azure Automation where you can compile it and apply it nodes. Creating a configuration is very similar to PowerShell DSC configurations.

How does Azure Automation relate to other automation tools?

Service Management Automation (SMA) is intended to automate management tasks in the private cloud. It is installed locally in your data center as a component of Microsoft Azure Pack. SMA and Azure Automation use the same runbook format based on Windows PowerShell and Windows PowerShell Workflow, but SMA does not support graphical runbooks.

System Center 2012 Orchestrator is intended for automation of on-premises resources. It uses a different runbook format than Azure Automation and Service Management Automation and has a graphical interface to create runbooks without requiring any scripting. Its runbooks are composed of activities from Integration Packs that are written specifically for Orchestrator.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s