- Published 4/10/2015
- 1st Edition
Microsoft Azure Essentials from Microsoft Press is a series of free ebooks designed to help you advance your technical skills with Microsoft Azure.
The second ebook in the series, Microsoft Azure Essentials: Azure Automation, introduces a fairly new feature of Microsoft Azure called Azure Automation. Using a highly scalable workflow execution environment, Azure Automation allows you to orchestrate frequent deployment and life cycle management tasks using runbooks based on Windows PowerShell Workflow functionality. These runbooks are stored in and backed up by Azure. By automating runbooks, you can greatly minimize the occurrence of errors when carrying out repeated tasks and process automation.
Watch Microsoft Press’s blog and Twitter (@MicrosoftPress) to learn about other free ebooks in the Microsoft Azure Essentials series.
Sample Pages
Download the sample content
Table of Contents
Introduction 7
Who should read this ebook 7
Assumptions 7
Organization of this ebook 7
Conventions and features in this ebook 8
Acknowledgments 9
Errata, updates, & support 9
Free ebooks from Microsoft Press 9
Free training from Microsoft Virtual Academy 9
We want to hear from you 10
Stay in touch 10
Chapter 1 Introduction to Azure Automation 11
Why automation? 11
Repeatable deployment 12
Consistent testing configurations 12
Why Azure Automation? 12
Windows PowerShell workflow 13
End-to-end automation service 13
Off-premises redundancy backed storage 14
Runbook authoring and importing 14
Scenarios 14
Azure Automation pricing 15
Enabling Azure Automation 15
Creating an Azure Automation account 16
Chapter 2 Runbook management 19
What is a runbook? 19
Runbooks support in the Azure Management Portal 19
Import a runbook 20
Import a runbook from the Script Center 20
Import or export a runbook via the Azure Management Portal 21
Create a runbook 22
Create a runbook using Quick Create 22
Create a runbook from the Gallery 23
Author a runbook 26
Runbook parameters 29
Runbook checkpoints 29
Resume or suspend a runbook 32
Chapter 3 Assets 33
Management certificates 33
Azure Active Directory and automation 35
Azure Automation assets 36
Asset scope 37
Variable assets 38
Using a variable asset 40
Integration module assets 43
Importing an integration module asset 43
Integration modules versus runbooks 43
Credential assets 45
Creating a credential asset 46
Connection assets 48
Creating a connection asset 48
Using the Connect-Azure runbook 50
Calling the Connect-Azure runbook using certificates 51
Using Azure Active Directory without the Connect-Azure runbook 53
Schedule assets 54
Creating a schedule asset 54
Using the schedule 55
Chapter 4 Runbook deployment 57
Publishing a runbook 57
Invoking a runbook 58
Invoke from code within another runbook 58
Invoke a child runbook using inline scripts 62
Invoke a child runbook using Start-AzureAutomationRunbook 63
Use Start-ChildRunbook to start an Azure Automation job 64
Invoke a runbook manually from the Azure Management Portal 67
Invoke a runbook using a schedule asset 70
Troubleshooting a runbook 73
Use the Dashboard 73
Enable logging 74
Backing up a runbook 76
Chapter 5 Azure Script Center, library, and community 78
Windows PowerShell workflows and runbooks 78
Azure workflow execution 79
Resources 81
Chapter 6 Best practices in using Azure Automation 83
Runbooks 83
Concurrent editing of runbooks 85
Azure Automation accounts 85
Checkpoints 86
Assets 87
Importing integration modules 88
Credentials and connections 88
Schedules 88
Authoring runbooks 89
Chapter 7 Scenarios 91
Scenario: Provisioning of IaaS resources 92
Provisioning resources 92
Authentication processing 93
Using the New-AzureEnvironmentResourcesFromGallery runbook 94
Creating assets for the runbook 94
Defining parameters and variables 95
Configuring authentication 96
Processing details 97
Scenario: Maintaining and updating Azure IaaS resources 101
Summary of upgrade process 101
Using the Update-AzureVM runbook 102
Supporting runbooks 105
Install-ModuleOnAzureVM runbook 106
Copy-FileFromAzureStorageToAzureVM runbook 107
Copy-ItemToAzureVM runbook 108
Some final thoughts 109
About the Author 110