In this demonstration,
we'll take a look at the Microsoft Azure Migrate App Containerization tool.
We're looking at the desktop of another of my Windows Server 2022
machines, and I've installed the tool, basically the App
Containerization tool when you look for it online.
I can quickly show you. If you just do a search for
Azure Migrate App Containerization tool.
Yeah, if we come to the appropriate Docs article, here it's called
ASP.NET app containerization and migration to AKS, and there's an
additional path for Java web applications as well.
Remember,
those are the two frameworks that are supported as of Summer
2022. And we download and install, it's just a PowerShell script
that stands up a simple web application. And this desktop
shortcut launches the web app.
Let me bring you over.
I've got it running right here. And on my machine,
it's running with a self‑signed certificate on port 44369.
The user interface is very similar to the Azure Migrate UI. So what
we're going to do here, for Application type, we can do either ASP or
Java. Now I don't have a Java Tomcat app, but I do have an ASP.NET web
app running on my other server.
Remember, in the first demo we looked at the AZ‑801 sample
app that I created on my mem1 server.
So we're going to use that. Let me select ASP.NET web apps, and then for our
target Azure service, you can go to AKS or App Service.
I'm going to choose AKS, and we'll click Continue. The prerequisites,
we have to verify we're willing to use prerelease software, and then,
depending upon whether you're doing Linux and Java versus ASP, if
you're doing ASP on Windows,
you'll need Web Deploy, and notice that that can
get picked up as a prerequisite.
If you're doing Java and Linux,
it will be SSH. Here we're using PowerShell remoting instead.
That's something else. I'm in a domain environment, so I
really don't need to worry about that.
Let's click Continue.
We, of course, have to sign into our Azure subscription.
I'll do a browser code flow here by pasting in that one‑time code, and then
signing in with my Azure administrator credential. Yes,
I am trying to sign in here. Let me clean up these browser tabs
here, and then we'll select our Azure Active Directory tenant, and
my subscription, and click Continue.
All right. So we're now discovering applications. We're going
to need the Server IP or FQDN. Now that is, let me see. Go to
my 10.1.10.1.65, 10.1.10.1.65.
The credentials are going to be like this.
Let me add my password, and then let's validate that. Okay,
good. So far so good.
Let's click Continue. One application has been discovered.
Notice that the wizard, the web application will attempt to pick up
an app configuration. Wasn't able to do that here.
My simple ASP is just a straight‑ahead, out‑of‑box example.
I'm going to give the Target container a name.
I'll just call it webapp. So it's discovered at the Default Website, I've
got the name of what the resulting container will be.
We could inspect the app configuration if there was one, Application folders,
it's telling us where it's looking.
We'll click Continue here.
Okay,
after discovery we're going to build up the image. And we're going to
need, first of all, a location to put the resulting image.
That's going to be in Azure Container Registry.
What I like here is that if you don't already have a registry created,
you can create a new one on the fly.
So let's do that.
We'll put one in my subscription.
I'll put it in the AZ‑801 resource group.
I'll call it twaz801acr1. That has to be a globally unique name.
I use East US, and the SKU, I'm going to go for Standard here.
If you want to do things like digitally signing your images and that,
you'll want premium.
I would stay away from basic unless it's just an
evaluation scenario. Create will work here.
Excellent.
Okay,
so Click Build to start building the container image
after reviewing the Dockerfile.
Now if we click Review, it shows us what the wizard here has auto
created for us. And the Dockerfile syntax, again,
I would strongly recommend you look into the Pluralsight library for deep
understanding, but it's just a plain text file called Dockerfile with an
uppercase D and no file extension, and it's always going to start by
grabbing or downloading a base image.
In this case, it looks like it's an asp.net:4.8‑windowsservercore image.
And then we've got a variety of commands like COPY to put files into
the container, RUN if you need to, in this case, it looks like it's
doing Invoke‑WebRequest to download Web Deploy and install it in a
quiet way. And then we're going to do things like creating the entry
point of the container.
What network ports are you going to expose? When the container has
started, what is actually going to run? You see what I mean?
In here it looks like that logic is encapsulated in a PowerShell script.
So this is again, intended to potentially save you quite a bit of effort here.
Let's click Build. And again,
as part of the prerequisites, this web application will install
the appropriate Docker tools on the server so that it can handle
that just in a very automated way,
as you can see. Looks like the build status was successful.
Let's click that link and zoom in. This just gives
you a nice log of what's happened.
All right,
let's come back here. We can now click Continue and specify our deployment specifications.