The next few minutes, we'll look at the latest options
for assessing and migrating your apps
and their underlying code into Azure.
Now, there are lots of options to migrate your apps
and infrastructure into Azure,
and we've covered your options
for Virtual Machine migration, database migration,
Dev-Test migration, and even VDI migration,
and if you've missed any of those,
you can check those out at aka.ms/MechanicsAzureMigrate
to learn more.
Now those options for the most part
involve managing the underlying infrastructure,
the operating systems or database instances.
But with Azure App Service there's another option
that allows you to bring your code and your containers
straight into Azure
and connect to integrated databases,
whether those are on-premises or in Azure.
Now, in many cases, this is going to be the easiest path
to migrate your existing .NET apps into Azure.
And if you're new to Azure App Service,
it's an HTTP-based service for hosting web applications,
REST APIs and also mobile back-ends.
It's flexible, so you can develop in your favorite language
like .NET, .NET Core, Java, Node.js or Python.
And the apps run on both Windows
and Linux-based environments,
and there you can learn more at aka.ms/appservice.
And because they run on Azure,
they can also auto-scale to meet any demand level
and even sudden spikes.
We take care of things like: load balancing,
automated OS patching, faster version releases,
and you can start to take advantage of hybrid
and DevOps capabilities,
like Continuous Deployment and GitHub actions,
as well as connecting to your on-prem resources via VNets,
once your app is up and running.
So what I want to walk through today
is how you'd bring an app
that you already have running on-premises
into Azure App Service.
Now, as with any other migrations
that we've covered on Mechanics,
migrating .NET apps into Azure,
follows those same two primary steps.
First, assessment.
In this, we're going to look at all the technologies
that your app uses,
and whether it can be hosted on Azure App Service.
Second, migration.
This is where you're going to actually migrate your code
into Azure App Service,
then move your app into production on Azure.
So, let's start with our app.
So, this is a Parts Unlimited app,
and it's an ASP.NET two-tier app
that runs on Windows Server 2016 machines
with a SQL Server back-end and a web server front-end.
Now, to get to the tools
that we need for the assessment and migration,
we'll do that first by going into the Azure portal.
We'll scroll down to Azure Migration Tools,
and then you'll see once we're in Azure Migrate,
we'll click into Web Apps.
Now, here you can see it's already got a couple of tiles
for the assessment tools and the migration tools,
and to get started, we're going to click on where it says
Download the App Service Migration Assistant tool from here.
So, we'll go ahead and click on the word, here.
And now we're in the Migrate to Azure App Service page,
that gives us the ability to assess
and also download tooling that we're going to need later.
So, we're going to start out by assessing
the Microsoft.com website,
just to show how we can assess a public-facing website.
So, here as we look through the assessment,
we can see the frameworks
and all the different dock info that we found.
All the green that we can see here means
everything's ready for migration into Azure App Service.
Now, if we go back into our
Migrate to Azure App Service page,
here's where we can download what we need
to migrate our own site that's running on-premises.
So, here you can see we're on the Migration Assistant page,
and we've got one for both Windows as well as Linux.
And note that for Windows,
you'll have to be running IIS 7.5,
and have admin privileges on that machine to run the tools.
So, now we'll go ahead and download our Migration Assistant.
There's our licensing terms, we'll accept that and download.
And now, once that's been downloaded,
we can go ahead and install that on our server.
And like any other installer,
that's going to go ahead and run.
And once that's complete,
that will be available for us on our server running our app.
So let's go ahead and open up the Migration Assistant.
So that's going to drop a link on the desktop.
We'll go ahead and open it, elevate again,
because we need to be admins.
In this case, we'll start the tool,
and then run the assessments.
So, we're going to click on the Default Web Site,
which it found already on the server,
and that's going to run a set of assessments.
So here, if we expand out Success 13,
we can see all the different things that's assessed.
It's looking at things like ports, protocols, certificates,
authentication, paths, or configurations
that might impact compatibility.
Now, if you see any errors in your case,
you're going to want to address those
and resolve them prior to migrating.
But in my case, you can see here that
all 13 different assessments that were performed
were successful.
So, I can continue on to the next step in the process.
So, I'm going to go ahead and click Next,
and here I'll be offered a device code,
and I'm going to go ahead and copy that.
Because it's going to ask me to authenticate
into the Azure portal.
So, then I'm going to paste the code in,
and it's going to ask me to authenticate
with my username and password.
So, I'll go ahead and enter my username email address.
And once that's done,
you'll see that the Azure App Service Migration Assistant
has brokered the connection between your server
and the Azure service in your subscription.
All right,
so once I'm authenticated with the right permissions,
I can then return to the Migration Assistant,
I got to do a couple more things.
Let's do that.
And here I'm going to add my Azure Migrate project.
In this case, I'm going to find mine, I'll scroll down,
and I want to use the one that's called AzureMigrateDemo,
there it is.
Now, here's where I'll enter things like, resource group.
In my case, I want to use an existing resource group.
So, I'll navigate to the one I want,
and I'll give my site a new name,
in this case, I'll call it, partsunlimiteddemomechanics.
And then we can choose the region that we want to be in.
So I'm going to go ahead and navigate down,
I want to be in South Central US, there it is.
And now here for the database,
this is where I need to configure
the back-end server connection for my application.
So in my case,
I'm actually going to set up a hybrid connection
to connect to our existing on-prem server.
Note that here you can also choose to migrate your database
into Azure SQL, and we just published that process
at aka.ms/MechanicsAzureMigrate.
Now the great thing is,
the tool is actually going to find your web.config settings
and automatically apply those from your database.
So all I have to do now is click on Migrate to continue.
Now you'll see the migration starts.
This is going to take some time based on the size
of your site and also the connection speed that you have.
So now we have to set up the hybrid connection from Azure
to our on-prem SQL Server.
So to do that it's pretty easy.
We'll go ahead and download the Hybrid Connection Manager
from this page.
That's going to download another MSI that will install here.
So we'll go ahead and run that.
I'll accept the license terms, click Install,
and that should automatically find everything we need
to complete the process.
And there it is, it succeeded, everything's ready.
Now from the Migration Results page,
we can actually get straight to our new website
and check that everything's migrated successfully.
And I'll have to do to do that, is click on
Go to your website,
and you'll see here that everything is running in Azure.
There's our partsunlimiteddemomechanics field
that we just configured earlier.
And right there, our Parts Unlimited website is loading
inside of azurewebsites.net, everything's up and running.
So as a final step
you'll need to redirect your public domain,
so DNS knows where to look to get to your public website.
Now because your app is running in App Service,
you can use all the capabilities I mentioned earlier.
Plus I want to point out a few others.
First, if we click on Diagnose and solve problems,
you'll see here a selection of diagnostics that we can use,
such as Availability and Performance,
Configuration and Management, SSL and Domains,
Diagnostic Tools and Navigator just to name a few.
And also, once your site starts to see some traffic,
if you click into one of these,
you'll see additional diagnostics tools within each one.
But because my site here is brand new
and has no traffic, that hasn't yet populated,
but you'll see more later.
And another thing I want to point out
is actually the Deployment slots that you can use as well.
And this is great if you want to do things like AB testing
or site staging.
And to add a slot you simply click on Add Slot,
and then you can put in a second
or third instance of your website
for whatever purpose that you need to do.
Now another thing I want to show is the Deployment Center.
Now here is where you can start to use things like DevOps
and Continuous Deployment via GitHub or Azure Repos,
and that can be configured right here through App Service.
Next, we'll take a look at Authentication/Authorization.
So, you'll notice here that as I click on
and expand that radio button,
we've got multiple different identity providers.
So, you can look at things like Azure AD, Microsoft,
Facebook, Google and Twitter,
just to name a few as part of
how you would authenticate your site.
I'll click into the Custom domains,
and here you can see we can manage the domain
directly from the App Service,
and then through TLS and SSL settings.
A couple things I want to point out.
One of my favorites is actually using
not just private and public keys,
but also creating an App Service Managed Certificate
directly from the portal.
Now, the last thing I want to show you is Scale out.
So, if we do custom auto-scaling,
we can go ahead and click on Add a rule.
In here you can basically scale to any level of demand
using these different metrics
that I'm showing here on the right.
So when you see peaks
in any of these metrics that we're using
as the scale trigger,
it will automatically scale your site to meet the need.
That was a quick walkthrough of how to migrate
a .NET app to Azure App Service,
and some of the capabilities that you can use
once you've migrated.
Now, if you'd like to get started with assessing
and migrating your apps to Azure,
you can learn more at aka.ms/AzureMigratePortal.
And of course,
you can check out the rest of our Azure Migration series,
at aka.ms/mechanicsazuremigrate.
That's all the time we have for this show.
Thanks for watching, we'll see you next time.
(air whooshing)
(upbeat music)