Good day, Cloud Gurus,
and welcome back for this introductory lesson
on Azure Automation.
Let's take a look at what we're going to cover.
First up, we'll take a moment to answer the question,
what is Azure Automation?
And then we'll take a look at deploying Azure Automation.
including the relationship between automation accounts
and Log Analytics workspaces.
And we'll also explore
some of the Azure Automation use cases.
And then finally,
we'll do a demo where we will deploy an automation account
and perform some of the initial configuration.
Now, Azure Automation is one of my favorite Azure services
and it's also potentially one of the most underrated
Azure services.
Now, if you've been a Windows Server admin for a while
and you've never seen it, you're in for a real treat.
Let's get started.
So what is Azure Automation?
Well, Azure Automation provides configuration management,
update management, and process automation.
And it works well on Azure,
but it also works in hybrid and multi-cloud environments
that are outside of Azure.
So what are each of these features of Azure Automation?
Well, the configuration management feature
of Azure Automation provides the capabilities
to collect an inventory of your servers,
what's running on them, track change over time,
and control the configuration of servers
through desired state configuration.
Now, I know the term desired state configuration
might be foreign right now,
but we'll cover it in detail later in this section.
And the update management component of Azure Automation
provides software update compliance reporting
and the ability to automate software updates
for your servers and virtual machines.
And the process automation component provides automation
across Azure and outside of Azure
using both PowerShell and Python runbooks.
And runbooks are just a fancy name for an automation script.
I think Microsoft chose to keep the name runbook
to keep it familiar for those that have used
Microsoft's older products
like system center orchestrator.
The other great thing about Azure Automation
is that it integrates really well with other Azure services
like Azure Monitor, Azure Arc, Event Grid, and more.
Now, if you want to use Azure Automation,
you'll start with the deployment of an automation account.
An automation account includes a range of shared resources
that are used across the automation account.
These include things like variables,
which are common values you can use
across your automation services;
credentials, which allows you to securely save credentials
that you can use across your automation services;
shared certificates, connections to other Azure accounts,
shared schedules, PowerShell modules, and more.
And you can start using process automation
right out of the box.
It'll allow you to create runbooks
and execute those runbooks either in Azure
or outside of Azure on what's known as hybrid workers.
And we'll explore how this done later in this section.
If you want to make use of the configuration management,
you'll need to link your automation account
to a Log Analytics workspace in the same region.
The Log Analytics workspace
is used as the repository for all the data
that's collected by the configuration management
and update management features.
To use update management inventory and change tracking,
you need to enable those solutions
in your connected Log Analytics workspace.
And we'll take a look at this in the demo
at the end of this lesson.
Now, there are a few good use cases for Azure Automation.
Let's take a look at them.
Azure Automation is great at helping you deploy
and maintain your Azure infrastructure.
You can use configuration management
to configure your servers to keep them in a desired state.
Now, you'll notice I keep using the term desired state.
And you might be thinking, "What's up with that?"
Well, I say desired state intentionally
because we all have a goal
for how we want our service to be configured.
And that's what I mean by desired state.
And this is achieved in Azure Automation
using PowerShell desired state configuration.
And we'll cover that too later in this section.
And you can also keep your servers up to date
and keep an eye on them throughout their life cycle.
And you can report on compliance
with the inventory capabilities.
Inventory and change tracking,
in conjunction with change management processes,
are extremely powerful.
You can correlate changes made to your servers
with the change requests made
through your other IT processes.
And if unauthorized changes are made to your servers,
you can quickly identify them.
And we all know that unauthorized changes
are a big cause for unexpected downtime.
You can also use Azure Automation to automate processes.
You might have something that you need to do
periodically on a schedule,
like backup a database or move some data
or even shut down some VMs when they're not being used.
Azure Automation is great for that, but it can also be used
through integration with Azure Monitor alerts,
site recovery, or webhooks
to automatically respond when events occur.
Throughout my career, I've used Azure Automation
to automate a huge number of IT and business processes.
It's extremely powerful and cost effective.
All right, enough talking, let's take a look at a demo
of deploying an Azure Automation account
and performing the initial configuration.
In this demo, we'll deploy a Log Analytics workspace,
and then we'll deploy an automation account
in the same region.
And finally, we will link the Log Analytics workspace
to the automation account
by enabling the update management solution
in our Log Analytics workspace.
Let's take a look at the demo.
All right, so here we are on the Azure portal,
and I've gone ahead and created a new resource group
that we're going to use to house our Log Analytics workspace
and our automation account.
Let's go ahead and get started
by creating our Log Analytics workspace.
So we'll go ahead and hit Create,
and then we'll search for Log Analytics,
we'll select Log Analytics Workspace,
go ahead and hit Create,
and then it's pre-selected our resource group for us.
So we'll just go ahead and provide a name, and
I'm going to go ahead and use the name law-australiaeast.
We're okay with the Australia East region.
So we'll go ahead and hit Review and Create.
It'll run final validation,
and then we can go ahead and hit Create.
All right, and this will just take a moment to deploy.
So we'll come back when this is done.
All right, the deployment of our Log Analytics workspace
is now complete.
Now, let's go ahead and create our automation account.
So we'll navigate back to the resource group,
and then we'll go ahead and hit Create,
and then we'll search for automation.
Go ahead and press Enter,
and then we'll select Create under Automation,
and then we'll select Automation again.
Now it's pre-selected our resource group for us,
so we'll go ahead and provide an automation account name,
and I'm just going to use the name aa
for automation account, and then a dash,
and then the region, which is Australia East.
And then we'll go ahead and flip that region
over to Australia East.
Now, this is important
because if we want to use an automation account
and a linked Log Analytics workspace,
they need to be in the same region.
Now, we don't need to set any advanced settings
for this automation account,
so I'm going to go ahead and click Review and Create,
and then I'll go ahead and hit Create.
This will just take a moment to deploy,
so we'll come back when this is done.
All right, the deployment of our automation account
is now complete.
So let's go ahead and click Go To Resource.
Now, you'll notice that
as I'm going through deploying these resources,
I'm using the Azure portal.
And you'll also notice that I'm not applying any tags
to the resources that I'm deploying.
Now, while this is fine
while I'm demonstrating these services,
it's not something I would do in a production environment.
In a production environment,
I would always use tools like ARM templates or Bicep
to create the resources.
And I would also always apply tags.
We're just skipping those in this demo
and the other demos in this course
to make things easier to follow.
All right, let's take a look at the automation account.
So you can see here we get those main services
that we spoke about, which is configuration management,
update management, and process automation.
And you also get those shared resources
like shared schedules, shared modules, shared credentials,
connections, certificates, and variables.
And these shared resources can be used across things
like process automation, update management,
and configuration management.
Now, let's go ahead
and enable the update management solution.
We'll navigate to update management,
and then we'll select our Log Analytics workspace,
and then we'll go ahead and click Enable.
Now, this does 2 things.
It links our Log Analytics workspace
to the automation account,
and it enables the update management solution
in the Log Analytics workspace.
This will just take a moment to deploy.
So we'll come back when this is done.
All right, the deployment of the update management solution
is complete,
and we get this weird message from Azure
asking us to reselect the menu item to open the solution.
So we'll just go ahead and select Runbooks,
and then we'll click OK to discard our changes,
and then we'll navigate back to Update Management.
All right, the update management solution is now deployed
and it's ready to go.
And that concludes this demo.
In the upcoming lessons,
we'll dive into each of the other features
in the Azure Automation account in much more detail.
Now, let's wrap up with a bit of a summary
of what we've covered in this lesson.
All right, so what have we covered?
Azure Automation provides update management,
process automation,
and configuration management capabilities
from your Azure Automation account.
And update management enables you to deploy software updates
to your virtual machines,
and then report on their compliance.
Whereas, process automation
enables you to automate hybrid processes using runbooks,
which are just really a fancy name for scripts.
And configuration management enables you to configure
inventory and track changes in your hybrid environment.
And you need to link a Log Analytics workspace
to your automation account
to enable both the configuration management,
and the update management solutions.
All right, that concludes this lesson.
Thanks for being with me, and I hope you found it useful.
And I look forward to seeing you in the next lesson.