Azure Automation Demo

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
14 hours 28 minutes
Difficulty
Intermediate
CEU/CPE
15
Video Transcription
00:00
>> Hello Cybrarians.
00:00
Welcome to Lesson 4.2 of module 4 of this course
00:00
titled AZ-301: Microsoft Azure Architect Design.
00:00
A quick introduction to
00:00
what we'll be covering in this demo.
00:00
I'll start out by reviewing
00:00
the current environment that I have,
00:00
then we'll proceed to create
00:00
an Azure Automation account after
00:00
which we'll import Linux PowerShell DSC modules
00:00
into Azure Automation account.
00:00
We'll create Linux' DSC configuration,
00:00
and we'll on-board Linux VM into Azure Automation.
00:00
We'll apply a configuration to it
00:00
and then verify the applied configuration.
00:00
That's the steps that I'll be walking through today.
00:00
First, let's do a quick review of the environment.
00:00
I'm right now in the Azure portal
00:00
and you can see my resource group over here.
00:00
You can see a virtual machine,
00:00
a Centos Linux Virtual
00:00
Machine that I've deployed in Azure.
00:00
Now, what I want to do is I
00:00
want this Centos Linux Machine,
00:00
I want to create an Azure Automation account
00:00
and then use it to automatically
00:00
configure this Centos Linux machine
00:00
using desired state configuration.
00:00
The first thing that I'll do is I'll create
00:00
an Azure Automation account that
00:00
I'll be using. Let's go to that.
00:00
If I go over to the Azure portal
00:00
>> and I click on "Create a resource",
00:00
>> and I'll search for automation.
00:00
>> Comes up with automation here.
00:00
If I click on, "Automation",
00:00
and I click on, "Create",
00:00
>> I can specify a name for my automation account.
00:00
>> I'll put this in the resource group that I
00:00
created and I'll leave that in UK South.
00:00
Now it's going to create a Run As account,
00:00
which is an account that can simplify rather than
00:00
me having to go create service principles.
00:00
It simplifies the whole process.
00:00
I'll go ahead and click on "Create",
00:00
and it should only take
00:00
a few minutes to create this service.
00:00
My service is successfully created.
00:00
I can see that on the notifications here.
00:00
If I go ahead and click on "Go to resource",
00:00
>> and I can see my Azure Automation account.
00:00
>> Let's go through the rest of the process.
00:00
The next one that I'll show you is how to import
00:00
Linux PowerShell DSC module into Azure Automation.
00:00
Back in the Azure portal,
00:00
if I scroll down on
00:00
the left-hand side and I
00:00
can see where it says process automation.
00:00
I can see my runbooks on my runbook gallery.
00:00
If I scroll down, I have shared resources where I have
00:00
my modules in my modules gallery.
00:00
If I click on, "Modules gallery" here.
00:00
This is a link directly
00:00
to something called PowerShell database.
00:00
You can just Google or use
00:00
whatever favorite search engine that you
00:00
like to search for PowerShell gallery.
00:00
It's going to take you to the PowerShell gallery.
00:00
This links into that.
00:00
I can search for the module that I need.
00:00
I search for nx and I press
00:00
"Enter", and I have this nx module,
00:00
which is the module for DSC Resources for Linux.
00:00
I want to make use of this module.
00:00
I'll be using it in my configuration
00:00
that I'll be creating so
00:00
>> I'll go ahead and click on that.
00:00
>> I'll go ahead and click on "Import".
00:00
The import of this module will begin
00:00
>> when I click "Okay".
00:00
>> The module now successfully imported.
00:00
If I click on "Close" here and if I go back on
00:00
the modules and if I search
00:00
for nx, you can see that this module is available now.
00:00
Let's move on to the next step in our tasks.
00:00
The next thing that I will show you is creation
00:00
of a Linux DSC configuration.
00:00
Let's go to do that.
00:00
If I go over to the Azure portal over
00:00
here and if I scroll up a bit and I click on,
00:00
"State configuration (DSC)" here.
00:00
Then if I go on the configurations,
00:00
this is where I can add
00:00
DSC configurations into the service.
00:00
Now, here's the DSC configuration that I want to have.
00:00
It's a very simple DSC configuration script.
00:00
All it does is it's going to ensure that a web server
00:00
is installed and it's going to ensure that
00:00
all these different packages are
00:00
installed on my Linux server.
00:00
It's going to ensure that these
00:00
different services are enabled.
00:00
That's what this DSC script does,
00:00
and that's what I want to load in.
00:00
If I go to configurations and I click on
00:00
"Add", and I can go specify my configuration file.
00:00
I select my configuration file which is
00:00
going to upload that I can give it a description say,
00:00
Configures Web and Database.
00:00
If I click "Okay" to that.
00:00
I managed to refresh the screen and you can see that
00:00
I have my configuration here.
00:00
The next one I need to do is I need
00:00
to compile this configuration.
00:00
For those that are not familiar with DSC,
00:00
>> when we create our DSC script,
00:00
>> we need to compile, need to generate more file.
00:00
If I go ahead and click on that
00:00
"lampserver", and I have the compile button there.
00:00
If I go ahead and click on "Compile",
00:00
and I say yes, I want to compile,
00:00
this configuration is going to be queued
00:00
and it's going to start in a few seconds,
00:00
and the compilation completed now.
00:00
One of the things you may need to do to be able to
00:00
see that the status as completed is
00:00
>> you may need to click out
00:00
>> and then click back in
00:00
>> to see that the status of the compilation
00:00
>> is completed successfully.
00:00
>> That's great.
00:00
>> Let's move on to the next part of the task.
00:00
>> In the next task,
00:00
I will show you how to on-board
00:00
a Linux Virtual Machine into Azure Automation.
00:00
Back in the Azure portal,
00:00
if I go back to state configuration (DSC),
00:00
if I scroll up a bit here,
00:00
I can see my inventory,
00:00
I can see the change tracking and over here but
00:00
the part that I'm really interested is nodes.
00:00
If I click on "Nodes", I can see that I
00:00
currently do not have any node on-boarded here.
00:00
Why can this, I can click on "Add".
00:00
It's going to give me the option to on-board
00:00
my Azure machines into Azure Automation.
00:00
It's, particularly for DSC.
00:00
I can see my Centos Linux VM here.
00:00
If I go ahead and select that,
00:00
all I need to do is I need to click on, "Connect".
00:00
When I click on "Connect", I can define
00:00
the configuration for the Local Configuration Manager.
00:00
Again, for those that are not familiar with DSC,
00:00
DSC works on the basis of
00:00
this Local Configuration Manager that exists that
00:00
needs to be configured in terms of how
00:00
it's going to retrieve the configuration,
00:00
and now it's going to apply the configuration.
00:00
It's going to register to this
00:00
>> Azure Automation account,
00:00
>> and that's what we're doing here.
00:00
Node configuration, I'll select the configuration
00:00
>> that I created earlier and the frequency,
00:00
>> I'll leave that set to
00:00
>> the default and the configuration mode
00:00
set to the default also.
00:00
I'll leave everything else set to the default.
00:00
If I go ahead and click "Okay" to that,
00:00
it's going to begin
00:00
the on-boarding of Local Configuration Manager.
00:00
My Virtual Machine is now connected. That's good.
00:00
If I go ahead and close this blade,
00:00
and if I close this blade also if I
00:00
refresh the screen I should see
00:00
that it is now on-boarded.
00:00
The next one that I will need to do is I
00:00
need to apply a configuration status.
00:00
Now, before I apply configuration to
00:00
this let's go do some checks.
00:00
If I go to my Linux machine
00:00
that's the public IP address over there.
00:00
If I go to the public IP of my Linux machine
00:00
>> via HTTP, you can see that
00:00
>> there's no web server installed
00:00
>> and it says this page is not working.
00:00
>> Then if I go back to Azure Automation
00:00
>> and if I select my virtual machine over here,
00:00
>> I have the option to assign node configuration.
00:00
>> If I go ahead and click on,
00:00
"Assign node configuration" the configuration
00:00
that I created earlier is there.
00:00
If I click on that configuration and I click on "Okay".
00:00
Once I've done that,
00:00
the configuration is now assigned to this node.
00:00
What I can do is if I close out of
00:00
this and if I
00:00
refresh the screen you can see
00:00
that it's now showing as pending.
00:00
What I expect to happen is that
00:00
once it's fully applied to
00:00
this configuration I expect
00:00
a web server to be installed and to be loaded.
00:00
I'll come back to refresh the screen
00:00
>> after a few minutes.
00:00
>> That took a while to complete but it's
00:00
completed now and it's showing as compliance now.
00:00
What I expect is if I go back
00:00
to this portal and if I refresh,
00:00
and I can get to the web server
00:00
>> that was installed by my configuration.
00:00
>> That brings me to the end of this demo.
00:00
Thanks very much for watching.
00:00
I hope you found it useful and I'll see
00:00
you in the next lesson. Thanks.
Up Next