Build, Deploy and scale apps with Azure App Service

ArticlesBlog

Written by:


>>Hello and welcome to
Microsoft Tech Summit. My name is Jennifer Lee and I’m a Program Manager on
Azure App Service. Today, I’m going to be
talking about how to build, deploy, and scale
web apps on App Service. First, let’s talk about
different ways with which you can host
your application in the Cloud. Let’s say that hosting
a Cloud based application is like figuring out how to get a car for your next road trip. One option is that you
can purchase a car. You own, operate, and control
everything about the car. However, you also
need to purchase insurance for it, maintain, and fix any problems that your car will have
over its lifetime, figure out parking, get
your driver’s license, so you can drive
the car, and so on. This is like hosting
your application in Infrastructure as
a Service or IaaS, where you purchase, maintain, and secure your own virtual
machine. You own it. But, that also means you have full responsibility whenever
something goes wrong. On the other end of the spectrum, there is Software as
a Service or SaaS, where the product is
pre-built for you. This is like ordering
a taxi or taking Uber. You can get from
point A to Point B, and you don’t need to
figure out parking, or even have a driver’s license. On the other hand, there
are limits on flexibility. You can’t choose
what model you get. You may have to wait
for your ride to come. You can’t control how
bumpy the ride may be. Finally, we have
Platform as a Service, which is like renting a car. You can choose what
car model to get, how fast you drive it, go back and upgrade your car, but you don’t have to worry about all the infrastructure
and maintenance of it. With your web app on PaaS, you don’t have to worry about the VM and maintaining
high availability. All you have to do
is bring your code. As you can see,
the main difference between all these different services is a balance of responsibility. How many of these
building blocks do you want Microsoft to handle and how many building blocks
do you want to control and customize
for your own solution? As you can see, PaaS is in the middle here because
all you have to do is bring your app and bring your data and will
take care of the rest. Because PaaS strikes
this balance of responsibility, our customers who use PaaS see an incredible return
on time savings. That saves money in the long run. Our customers and IT pros have no need to hire more people to maintain their VMs or to build additional
productivity features. You can develop, deploy
your application faster, cutting your time to launch
your next big thing. So, what is Azure App Service? Azure App Service is a PaaS
platform where you can easily bring your web app to the Cloud on either
Windows or Linux, and quickly build, deploy, and scale your app. We promise you high availability, so we’ll deal with
patching the VMs, auto scaling, maintaining
the infrastructure, and security, so
that you can just focus on developing your web app. Additionally,
App Service comes with a whole slew of features for free that you don’t
have to build yourself. Our customers running Enterprise
grade apps love that we have global centers around the world that are
secure and compliant. We are fully managed platforms, so that means you can reduce your operating costs and we’ll deal with maintaining
the infrastructure. Third, we made sure to support a variety of
different stacks, that we keep adding to, as well as have features
that help you with staging, deployment, and testing, so you’re as highly
productive as possible. Here is actually
only a partial feature list, some of which I’ll be showing in a little bit during our demo. Our engineering team
is constantly iterating on this list
and adding to it, all according to your feedback. What kind of web apps
do customers usually use App Service for? Some common scenarios include digital marketing
applications where global campaigns take
advantage of being able to run in our data centers
all over the world. E-commerce shopping
sites are also some of our more
popular customers, since it’s easy to
scale up during high volume shopping seasons and scale down appropriately, and also line of
business applications. These use our identity
management features frequently, so their internal
company resources, and this helps reduce
their IT costs. So, there are actually three different flavors
of App Service. Our most popular, is our regular Azure
App Service offering which is our
multi-tenant platform. That’s what I’ll be
demoing shortly. Second, our App Service
Environment offering, where you can deploy and
run your apps inside your own virtual network and
have your own version of our app service
frontend load balancers in an isolated environment
or a single tenant that is just running just
for your applications. Finally, do you have
on-premise infrastructure? You can leverage app
service on Azure Stack to bring the power of our
platform to your data centers. Later, everything works
in a similar way. So, when you decide
to move to a Cloud, there’s no learning curve
for you and your team. If you’re still deciding whether App Service
is right for you, don’t just trust me.
Trust your customers. Join our over 500,000 active customers who are hosting
almost 2 million apps in App Service and creating 19 billion requests per
day on App Service. All right, let’s jump to a demo. We’ll start here in
the Azure portal. Click on this “+” sign, and right here, you see “Web App” right in
the first page. Or you can search for it
in the text box above. You can also search for
App Service Environment there. All right. Let’s
name our web app. All right, so we’ve
named our web app and then choose an Azure
subscription for it to go under, then we’ll create
a Resource Group. A Resource Group is just a logical entity that helps you put all the resources belonging to your application in
a single umbrella. Think of it as a folder, where you can put your
app and your data in one place and also
share that with your co-workers giving
them contributor and access rights that helps you
keep yourself organized. All right, so we’ve existing one called techsummitwelcome, I’ll use that one for this demo. Next, we can choose our OS. So, here you have two options. You can choose a
Windows or Linux OS. We’ll choose Windows here, but definitely check
our other session about App Service on Linux. Next, we’ll create
App Service Plan. An App Service Plan is a fancy
term for our server farm. So, we’ll create a new one, and here we can actually, we’ll name it first. Here is where we
can actually choose our location where we
want our App to run in. So as you can see we have the Data Centers
all over the world. And since we’re
such a popular service whenever a new Azure
data center opens, App Service will be a part
of it from day one. All right, so let’s
choose West US, right. Next thing we do is we
choose our pricing tier. So as you can see up here these isolated SKUs are for App Service environments
where you have those dedicated front
end load balancers and also Vinux support that
our customers love. Next we have our premium
V2, premium, standard, basic, free and shared, all these other pricing
tiers that we offer. So for this demo since I get to expense it to
the Microsoft Account, I’ll choose the four
core premium V2 SKU. I actually get faster
CPU SSD and also the scaling up to 20 instances and 20 slots with any of
the premium V2 slews. It sounds like a good deal to me. So like that, all right. Now I can choose to enable
application insights, to trace my App and give me insights on how
my App is behaving. So I’ll do that here as well and come back to my dashboard
and click “Create”. I will take just a minute
for it to deploy. What’s happening here is
that our architecture isn’t creating a full
blown server or anything, but it is associating
your web App name in your subscription in that region, in that scale unit, with that exercise
that you chose, two resources are already
been provisioned. Basically it just assigned
a worker to a web app. I will click back. Now that the web app
is up and running, this is the overview play. All the features in
the feature list earlier that I showed you
are right here to the left. You can see on
this overview play, the URL web app service plan
you’re running in, all the FTP information that
you would be interested in. So as you can see here if I click the URL it takes me to
this default App Service page. So your Azure App Service
web app is up and running. Great. But how can I deploy
my code to my web app? I spent all this time
developing my web app on my Github repo using VS code
or whatever ID you like, and now is the time to
deploy my own code. First, I’m going to go to
deployment slots right here. This is important
because I want to create a staging slot for
QA and because I want me and my team
to be able to test our app before it goes
live in production. Later on I’ll show you how we can swap staging for
your production slots. All right, so we’re going
to add the slot here, so here I can create
a staging slot right here and I’ll click “Okay”,
and there it is. So, if I click here, so basically what slots do in the background is that it creates another web app on the same App Service plan
at no additional cost. As you can see, the slot was
ready and when we clicked on that this looks exactly
like another web app, but the key difference is
right here in the URL. You see this is my web app
name plus the dash staging. When we click on that we see the sample site
up and running again. Great, so far so good. Okay, so now I’m willing
to put my site into the staging slot by going
to deployment options. All right, so here we
select the source. So, I have my Github right here. I already had this
Pre-authenticated so it has all my information
and I will choose my project also web app, Branch master and
you can also even configure your performance
test right here as well. I will click “Okay”. So as you can see it is connecting to
Github. All right, great. So, we have our Web hook
for our stage slot setup. So it will continually listen to any changes that
I make in Github. So, if I go back here
and refresh the page. Great, so, we have
my site up and running. So this is Awesome web app,
Hello Tech Summit, Welcome to Azure App Service
and I decided to put a really awesome photo
I took of Seattle. So you can hear, you can see
the space a little here. So, I want to show you how this webhook allows me to continuously keep
this up to date. So, let’s say I actually
don’t want this picture, it kind of looks like
a rainy Seattle. So, I want to make edits here and I’ll make edits in
the staging slot before I go live to production to
make sure everything is right before we actually debut
this to our customers. So I’ll go into make
it a Github account. So here this is my fork
of Awesome web app and instead of
a rainy Seattle picture, I want a sunny one. All right, I will
commit my changes and then go back to
deployment options, and I’ll just take a few seconds
for this to sink up. All right, awesome,
let’s check it out. All right, that’s better already. This is what Seattle
looks like most of the time. I’m Just kidding. Great. So, now that we have everything ready to go
live to production, let’s actually go and
perform a slot swap. So go here and say swap. So we want to do a swap and
we want to swap from staging, which we rigorously tested
out already to production. All right. So then this was our staging site
and as you can see this is the URL for
production site, and we will refresh
that and there it is. So this is the site that
I wanted to go live, and if we go back to
the staging slot, the staging slot now has the sample web app that we
had in our production slot. So we actually just swapped them. So now that we have our Awesome
web app up and running, I want to talk to you about some of the settings
that we have. So these are some of the
features I promise will help you with being more
productive and things that you otherwise would
have had to build yourself. You decided to go with
an IaaS approach. So right here are our settings
in the left hand side. So these are everything
that was included in the feature list I talked
about in the PowerPoint. So, one thing I want to
point out first right here is Scale Out
App Service Plan. So a lot of our users
when they first come they start with
a single instance, because they’re running
a very small workload. Klavern, they grow and we
want to be able to grow along with their site as they get more
customers themselves. So, right here easy slider and I can actually
go all the way up to my 20 instances that I have on this premium V2 instance and
enable Auto Scale as well. So, basically I can choose to go all the way up to 20 instances
or create a rule here that basically tells App Service whenever I get
this amount of traffic, or this amount of
CPU to scale out to let’s say
five instances at a max. That way I don’t
have to worry about configuring any of
these scaling rules myself. So, I will still get traffic as my shopping experience
hopefully booms in the holiday season. This will accommodate
for that automatically. So, that’s a really cool
feature that you would have otherwise had to maybe
implement yourself. Something else that’s really
neat is our custom domains. So, even if you love your.azure website.net URL
that we already provide you, you may want to connect to domains that you already
have or buy one. So, in this tab you’re able to add your host name right here, or buy your domain
in a single click. So we made that all easy for you. You don’t have to go elsewhere. It’s all in the same portal. Additionally, we have
our slew of SSL certificates. So, similar to custom domains, you can also import your App Service certificate
here and turn it automatically so then you’ll have your HTTPS right
and ready for you. Later on, I’ll also talk about our authentication and
authorization feature. So, I’ll talk about this in more detail but if you want
know how to access it, it is just right here
under the settings. Same with networking. So, App Service has a lot of networking features that we offer such as VNET integration, hybrid connections,
IP restrictions, and that can also be easily accessible in the left hand menu. All right. So, something else that people
also really like to use is this advanced tool that we call Kudu or your SCM site. So, if we navigate to there, we’ll give it a second. This is your SCM site. So, this is called Kudu and basically in
our debug console here, you’re able to figure out what’s going on if there
is a problem in the Web App, all your logs are here. So this is something
that our users use if they want
to know more about the processes that are going on and Kudu can help you debug that. All right. So, I don’t
have time to go through all these different features
on this left hand sides. But these are all
well documented in our App Service Documentation
and in our team blog that will be linked at
the end of this presentation. Next, I want to talk to
you about what happens when something goes wrong with your Web App and you’re
encountering issues. Let’s say your Web App is down, and your users are
telling you that you should need to get your website
back up and running. We actually have a feature
that we released back in November 2017 called
App Service Diagnostics. What is App Service Diagnostics? It is an intelligent and interactive
troubleshooting experience that actually guides you
through their problems, giving you the correct
data correlated to when your Web App
went down or when you experienced slowness issues, to more quickly and easily point you to
the right direction. So, you can troubleshoot and prevent this issue
from happening again. So, there are several
things that you can use diagnostics for. You can perform a health checkup, figuring out if the issues
related to their platform or to your app and then investigate
Web App down issues, Web App slow issues, high CPU. But it’s better if I just
show you how it works. So, we have our app here
called Baggy Bakery. And as you can see, this is the same
overview page that I showed you earlier in
my awesome Web App. So, in this tab right here, “Diagnose and Solve Problems”. We’ll click on
that. And I’ll take you to “App Service Diagnostics”. So, as you can see, how this screen is laid out, is kind of like a chat bot like interactive
guided experience. So, let’s say you have
no idea what’s going on. This is the first time you tried App Service or had
issues with Web App. You’ll want to run
a health checkup. So, all you have to do is click “Yes” to perform
a health checkup. And this basically fires off all these detectors
that we have running on our App Service infrastructure that monitors
your Web App and actually looks at a few
different parameters to organize them in a way
for you to consume. So, here, we have requested
errors at performance, CPU usage, and memory usage. And App Service
Diagnostics noticed that my Web App was experiencing high CPU usage within
the last 24 hours. And if I want to
see the CPU issues. So, I say, “Yes” and it shows me a graph actually of all the
instances I have running. And actually shows me which app is actually
causing the issue. So, here it’s clear
that Baggy Bakery is the one consuming
all the CPU I have, and that may be related to
my Web App down issues. So, I know that now but what I really want to do
is be able to solve this, troubleshoot it, and get
my Web App back up and ready. So, App Service Diagnostics actually helps you
with that as well. So, I’ll click and it’ll ask you if you want to see more troubleshooting
suggestions. And it’ll load up
this really neat widget. So, this is our trouble shooting in next steps widget which has different sorts
of suggestions. So, right here we have
a mitigations step, but we also have different ones for
further investigation, quick fixes and things like that. So, as you can see, one of the things
that came out was our scale out App Service
plan mitigation. So, here, it looks
like augmentation. Right? You can read about
why you should scale up, why you should not scale up, and see what your apps, current App Service Plan
is right now. But what I really love about this is that it’s actionable. So if I click
this blue button here, is actually a quick
“Fix it” button. It will actually go and
directly scale out. And you don’t have to click elsewhere or find
it out yourself. You can actually do it
one click from here. And then you go to the end, hopefully you found
this experience useful. And we really love your feedback. So, this is a great way for you to help us improve
App Service Diagnostics. So, you can type
something in here. So, you scroll back
up to the top. Let’s say you came to this
before and now you know exactly what’s going on and you want to try out
our tilers shortcuts. So that’s what we
call these colorful boxes little here
at our shortcuts. So let me click on
“Web App Down”. So, here you see this graph of platform availability
and app availability. So, this can distinguish
whether your app is healthy, our platform is healthy, or both. So, here, we notice and correlate all these
different issues they have into downtimes that you can select with these
horizontal orange bars. We organize this page in
three different categories. One called observations, one
for application insights, and one for troubleshooting
next steps. Our observations are correlated directly to the downtime
that you have selected. So in this case in
the downtime that I selected, we had high CPU issues. And we also, our application
hit an Auto Heal measures. So, actually it broke our Auto Heal rule,
and our platform, the Azure App Service
platform actually tried to help you out and
recycle your applications. So, it goes back to 100 percent availability or
helps you out with that. So, it kind of does
that preemptively. And then finally,
you can also see where the file requests
are coming from. Next, we talked a little bit earlier about
application insights. So, if we have that enabled and you are throwing exceptions, we actually highlight
the common exceptions that were thrown during
this particular downtime. So, hopefully you’ll
see this here, or maybe see something in these exceptions related
to dependencies or something in your app code
that will help you diagnose and debug the issue. And you click here, you’ll enter into application
insights directly. And finally is
that troubleshooting in next step widget that
I’ve already showed you. But it also shows
up here as well. So here you can again easily scale up
your App Service Plan. So, I hope next time you
run into issues with your Web App on
App Service that you go to App Service
Diagnostics first. Chances are you’ll see something here that will help you out. And there is a lot of
really neat observations and ways for you to prevent
this from happening again. So we actually suggest
preventative measures so you can preemptively make sure
your Web App is up and running. If this doesn’t help you out, in this main screen, you can actually view a lot
of different links and more advance support tools
on the right hand menu or contact us in any of
these community forums as well. All right, awesome.
So, let me check out App Service Diagnostics next time you run to a new Web App issues. Finally, to highlight some
of our most love features, we have Easy Auth and our App Service
networking features. Easy Auth, otherwise known as authorization and
authentication, is great. If you want to limit
your Website so that is not just a public website. This is great if you have a internal company website
and you wants a log in first. This is a single
click configuration. They can turn on for auth. So this protects your site
from public access and redirects the login to
Azure Active Directory, Facebook, Google, other
Microsoft ADDTs and so on. Next, here is a summary of our networking features
for App Service. These include IP restrictions,
high reconnections, VNET integration, with some specific to App
Service Environment. So, if you want a private
IP address in your VNET, you would use
an App Service Environment versus a regular App Service. So, this allows you to communicate with
other Azure assets, not even just within
the public Cloud as hybrid connections
actually allow you to access your On-prem solutions. All right. So, that’s all for me. If you have any questions at all, feel free to reach
out and I’ll answer your questions or connect you to another one of my team members
to help you out. And finally, follow
our Azure App Service team blog. So, we actually have
all our updates here. You can leave comments,
add suggestions. We look at this very carefully. And if we have anything that we want to showcase or warn you of, this is where all the
information will be located. So, I hope you enjoyed
this presentation and are interested in
trying our App Service. If you visit the second
link right here, aka.ms/TryAppService,
you can actually Try App Service right now without a credit card for 24 hours. Really see how everything works. And then once you decide that something that
you want to use, you can continue on using those same credentials and
create a Azure account. All right, thank you.

One Reply to “Build, Deploy and scale apps with Azure App Service”

  1. Vishal Sharma says:

    Continuous Delivery and Deployment credential missing from Deployment Menu?? Help

Leave a Reply

Your email address will not be published. Required fields are marked *