Azure App Service Web Apps | Azure Friday

Azure App Service Web Apps | Azure Friday


>>Hey friends. It’s Azure
Friday and we’re going to talk about one of
my most favorite subjects, Azure App Service with
Birand Tardiff. How are you sir?>>Doing good and you?>>App Service is like
the powerhouse for me. I know for some people
it’s virtual machines, but when it comes to
platform as a service, I’ve got 19 or 20 different web
apps and they’re all running on various flavors
of Azure App Service.>>Right. The beauty of
having a platform instead of a VM is that you don’t get to worry about
all the infrastructure, you don’t need to
worry about updating and playing patches, any of that. You just focus on your code, use the tools that
you’re familiar with and focus on what you need to do.>>Yeah. The thing
that I thought was interesting about App Service and once I got my head around it, it became really powerful was
the reminder that there was the App Service which is like a web app or whatever mobile app, and then an App Service plan.>>Correct.>>Which is kind of like a VM but you don’t really
think about it like a VM.>>Right. It’s the way
that we basically separate your code from
what is running your code. So, the App Service plan, you can think of it as
your computer into cloud. The only difference is that
this computer can go to 10 instances or 20 instances
as you need for scale.>>Right. It’s not
a virtual machine that I remote into or->>Right.>>SSH into. So, for
example in the West US, I’ve got a small.>>Right.>>I could also
have a basic but I wanted a small because
it has more features. I’ve got I think 19 on that
one or 17 or 18, a lot. Like I run it pretty hot.>>Right. Yeah, you can run multiple different apps depending on all on how much memory you’re using and how many of them
are running at the same time. But you can create 10, 20 different apps as long as they’re not all running
at the same time. They all can share
one App Service plan. So, if you’re doing
small hobbies type of stuff, it’s very easy to throw
everything pretty much in there.>>Yeah, I haven’t had
any issues at all. Maybe you could make one for us.>>Sure. To create
our web app, it’s very easy. You just go to basically
the “Create” on the Portal. Just go to the “Create”
on the Portal, and you’re going to
find it right here, is one of the most popular
things that people go create. Once you drill in, you’ll
notice that we not only have Windows but we
also have a Linux offering. So you can, if you’re
basically working with open source platforms, they tend to run better on Linux. People prefer to
run them on Linux, things like Python,
stuff like that. So, you get the option to
choose one or the other.>>Okay. Then once I’ve set the App Service plan at this point either
Windows or Linux, then all of my websites that sit on top of it then inherit that. They all have become Linux.>>Right. So, let’s go
through and create one.>>Sure.>>I’m just going to call
this BK-Azure Friday. You can see here that I’m putting it in an existing
App Service plan that I already had created
before but you can also go and create
a new one as needed. When I click “Create,” this is going to take 30 seconds and then you’re going to have
a completely new app that then you can go
and publish content to. If we look at, I had
a couple of apps that I had already created
here in the dashboard. We can take a look
and we can see that there’s sitting on
this App Service plan. I can go take a look at
the App Service plan. I can see that I can have multiple apps running
on that App Service plan.>>Right.>>So, that gives you an idea of the relationship between
apps and App Service plans.>>It might seem
obvious initially an obvious to us as we
spend some time with it. But once you get
your head around that, that the App Service
plan can have N number of App Services.>>Right.>>You can have all kinds of fun. Then of course App Services
can have slots.>>Right. Yeah, that’s the very next thing that people look at is once
you create an app, you can create what we
call Deployment Slots. So, depending on what
plan you’re using, you can have five or 10. Deployment Slots are very practical when you’re doing things like automated deployment. So for example, one
of the features that the platform gives
you is the ability to automatically deploy
code every time you push stuff to things
like either VSTS, or GitHub, or Bitbucket. So, you don’t want to have
that code to go directly to your production because maybe not all programmers are perfect. We sometimes develop bugs
and we throw them in there. So, having the staging slot
update automatically makes it very natural for
people that are doing agile type development, because you can
check in, get push, your website is updated by
the time you look at it in the portal and you can do
that last mile validation.>>Yeah.>>The next thing
that the staging slot lets you do is it
lets you do a swap. So, without having to
redeploy your bits so, your bits never change, we do all of the DNS trickery and acrobatics to basically
start routing new traffic into
the staging slot when you do the swap and basically, all traffic drains out
of the old instance.>>Right. It’s instant.>>It’s instant. Yeah.>>Yeah, that’s really great because there’s
so many bits of flexible parts that you can plug into App Service and I just
use mine as an example. I’ve got my podcast. I’ve got a podcast
called Hansell Minutes and I run it on App Service. I have Hansell Minutes-staging.>>Right.>>There’s different ways
you can deploy. I can deploy with
GitHub like you said in a branch on GitHub could
become the staging slot.>>Right.>>Or I can push directly to App Service as if App Service
was a Git Repo itself.>>Right. So, we
have the option of doing what we call Local Git, which is basically hosting a Git Repository for you
directly on the app.>>Then I’m also a member of a homeowners’ association and they have a static website
they want me to manage. Like you said
a small hobby is website. I don’t need a whole
App Service for it. Turns out you support Dropbox.>>Right.>>Who would have thought it. So then the other homeowners, they just changed the text in Visual Studio Code
and they save it and I go into the
Azure portal and say “Sync” and I deploy the Dropbox. Something I thought I would never do. I do it all the time.>>Right. That is
kind of like one of the drivers for
the App Service team, is making sure that
we enable people to use the tools that
they’re familiar with.>>Exactly.>>Like you said,
like you don’t need to know anything about Azure, you don’t need to know
anything about the Cloud to be able to use this.>>Yeah. So, I’ve got
flexible deployment.>>Right.>>I’ve got N number
of staging slots.>>Right.>>I can go and I can do Python, and PHP, and.NET,
and Java and Arno. I can mix and match with
every single App Service plan.>>Also Instant Scale. You can very easily increase the number of instances that your App Service plan is running on and is basically as fast as your code can go through
the startup routine. That’s as fast as
you get instances.>>Yeah. That actually that’s
a really good point that you bring that up because
I found that I had some code that was starting up quite slowly because
I prime a cache, and then when I fixed
that bit of code and made my startup faster and then
I prime the cache later, that actually made my App
Service experience better. So, then my app is smart about the fact that
it’s an App Service. Azure and App Service
works better for me.>>Right. Yeah.
The main thing is we want to have people moving into cloud development paradigms. We were starting to think about your application
being a lot more stateless, because that lets you take
advantage of the parallelism. You can go and run in
on 20 instances and it doesn’t matter if one
goes away and comes back. If you’re not doing
anything that affects a specific instance in a very special way like
making a state full, you can get advantage of
the economies of the cloud.>>Yeah. Another thing with App Service that made me
really happy and I was surprised as a person that has a small
business on the side, is I’m just one person and I made an App Service in
Asia, in Europe, in Central US, and then I
put a traffic manager in front of it and I’m doing all of this in five or 10 minutes. I think there’s
an Azure Friday video on this. Suddenly now, I have this big global stateless
application at one URL.>>Right.>>I did it myself in
five or 10 minutes. This is the kind of stuff
that would take a whole team of DevOps people a week.>>Yeah. If you want to go
into more details about high performance or high skill architectures
where you want to go and do like
multiple deployments, we have a video
that we can link in the description where
I go over techniques and things that
you wanted to look at when you’re building
those types of apps. But like you said, it
makes it very easy. You don’t need to go into
complex network configuration, you just throw traffic manager. The fact that App Service
is a tier one service, meaning that every time that an Azure region comes online,
App Service is there.>>Yeah.>>Makes it so that you have, I think there’s
over 20 different regions in which you can deploy your app.>>Yeah. It’s everywhere that you want your
business to be one. A true story, I
was going to Japan and I wanted my little startup application
to be in Japan. It was right there
and at the hotel, before I gave my presentation, I deployed to Japan, I added it to the traffic
manager and I had an App Service instance running locally in the place I
wanted to do business.>>Right. That is you can be as fancy as you want with
your code but there’s nothing that’s going to give
you those performance gains as being in the same geography.>>In next door.>>Yeah.>>Yeah, absolutely. Do you
have another demo for me?>>Sure. So, one of
the things that we can look at is when we’re talking about the
deployment options. So, it’s very easy to go and
configure as you can see, all of these different providers. So, what I’ve done is I have already configured
an application that is just a very simple ASP.NET core actually application and I have done a couple deployments. You can see that there’s
a couple of things here.>>Looks like you’re
going from GitHub.>>Right. I’m going from
GitHub in this case. Let just go take
a look at the app. This is going to be
the first time that I’m visiting the app so it might be a little bit slow when it loads.>>So that’s a cold
startup right there.>>It’s a cold startup
right there. This is basically
just a very simple Hello World. So, because I’m very audacious, I’m going to do
a live code edit here, and I’m going to do, instead of Hello World,
Hello Azure Friday.>>All right.>>I’m just going to save this. Like I said, like
I could push this directly from Visual Studio Code, but I’m going to use
the GitHub client in Windows. I’m going to do a description, “Commit to Master,” and “Push.” If everything is going
according to plan, when I go back here to
deployment options, I’m going to see that.>>So, you just
pushed it to GitHub?>>I just pushed it to GitHub.>>Then GitHub makes a call
over to Azure, does it?>>Right. There’s a Web Hook
that gets triggered, and there’s a Back in
Process that is part of the website that basically receives the call
from this Web Hook, and then basically starts
the deployment process. Sometimes it takes
a minute or two. I’m going to just try
and force it right now.>>Okay.>>There we go. We see
the new change coming in. So, this is basically pulling all of the changes from GitHub. If it needs to do a build, it’ll do a build right there on the back side of your web app.>>Right.>>If you have.>>The app is still live.>>Yeah, the app is still live.>>[inaudible] have
that checkbox indicates the app is still up and
running and working just fine.>>We can go here and hit it and it’s just going to run.
Now we can see the change.>>Looks like it was too fast.>>It was faster than us.>>Yeah. That’s the kind of convenience that you get
with App Service and why even though there’s so
much that we’re excited about on Azure and why I do Azure Friday and I talk about all these
other things but I keep coming back to App Service. It’s my tier one. It’s my go to service
for getting things done.>>Right. App Service won’t
solve all of your problems, but we do see it as a core piece that you’re going to use whenever you’re building out. Like for example, if you
have a bunch of images, you probably don’t want to
store them inside of your app. You can always use storage. Or if you have things that are going to be kind
of like a functional, where you want to
pay per interaction, you want to go use
Azure functions. But you can kind of like use App Service as the core
of your application and have the use of the other different Azure
services as needed, because you always want
us to use the tool that’s better suited
to your needs.>>All right. I love App Service and I appreciate you coming
to talk to me about it. I am learning all about my favorite Azure App Service
here on Azure Friday.

Danny Hutson

2 thoughts on “Azure App Service Web Apps | Azure Friday

  1. I can see from the demo that the app gets deployed to a mywebapp.azurewebsites.net
    Would you instead be able to deploy to your own custom domain (i.e. www.andrea.com) if you had it?
    And how easy it is to use https?

Leave a Reply

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