In this demo,
we'll cover the continuous delivery with Azure
Virtual Machines AZ‑800 objective.
Here we are in the Azure portal.
And remember that the deployment group is a logical collection of VMs,
we're going to assume that they're all in Azure,
that we want to use as deployment targets in our Azure DevOps release pipelines.
So in this example,
let's say we want to include vm1 and vm2 in a deployment group.
One way we can do that,
assuming we already have a connection to Azure DevOps organization,
is that we can go to the VM right in the Azure portal
and come down to Continuous delivery.
Let me clean up the view a little bit here by contracting the settings.
And the way you do this is that when we come from the VM,
like we are here,
we are onboarding the VM and automating the deployment of the setup script that
will handshake the virtual machine into a deployment group.
And again,
I've already set up my link between my Azure DevOps
organization and my Azure subscription.
And the project I'm going to use here is my PartsUnlimited‑GUI project.
And we can either create a new deployment group and join it or join an existing.
And I created a deployment group called AZ800‑DeploymentGroup,
and we're going to connect it to my PartsUnlimitedE2E build pipeline,
and we'll click OK.
So like I said,
Azure is now going to deploy that script file that
onboards this VM to that deployment group.
Now another thing we can do is in the Azure DevOps console here,
dev.azure.com, we can go into our project.
And if we come down into Pipelines here,
Deployment groups,
this is where you can create new and manage existing deployment groups.
I have the one that I created,
and this is a run of that onboarding script that I told you about.
So if you wanted to include on‑premises VMs or VMs in
other clouds in a deployment group,
you would want to run this PowerShell script with elevated credentials.
And at the end of that process,
the system would be registered and available in this deployment group.
Now how do we consume a deployment group?
Well, we do that in the release pipeline.
So let's go in this example project.
I've got a release pipeline here.
And we don't need to get deep into the weeds here because it's out of scope.
You just need, the reason I'm doing this demo,
I'm going a bit above and beyond what you might see on AZ‑800.
AZ‑800 just wants you to understand that one of the options you
have for your Azure VMs is to include them in your release
automation if you're using Azure DevOps.
And the way that works is via the deployment group.
So let me go to my Dev stage here.
And the idea with this pipeline is that we would have a CodeCommit,
a developer,
an infrastructure person would commit a code change
to the Azure Repos code base.
That normally serves as a build trigger,
and that would kick off a software build where we could do unit testing,
and regression testing, and security vulnerability testing,
and these sorts of things.
And then the output of your build pipeline is called a release artifact.
And what we have here,
the release pipeline picks up where the build pipeline leaves off.
That build artifact becomes the deployment trigger into your release process.
And here we've got a staged deployment with three
separate environments in Azure for Dev, QA,
and Production, respectively.
I'm just going to, in this demo, look at the Dev stage.
And in this graphical representation,
there are a number of task scripts that do different things.
For example,
the Azure Resource Group Deployment task allows you to deploy
Azure infrastructure using ARM templates,
simple as that.
In order to connect to your subscription,
you need to create what's called a service connection.
I've already done that, so I'm good with that.
I'm running a deployment, and there is our ARM template and parameter files.
But to tie into a deployment group specifically,
that shows up under Advanced deployment options for virtual machines.
And for Enable prerequisites, this was set to None originally,
I'm doing Deployment Group here.
And then I have to create a service connection specifically for that,
and then I navigated into my team project and to my deployment group.
So this is one example of how deployment groups are surfaced and managed in Azure DevOps.