Time
7 hours 58 minutes
Difficulty
Intermediate
CEU/CPE
8

Video Transcription

00:00
Welcome back in this episode, we're gonna take a look at it. Another feature inside of our Web APS called Deployment slots.
00:06
My objectives include for you to just understand deployment slots. And then we're gonna jump out to the Azure Portal and demo how they work
00:13
when working inside of the azure app service plans Standard premium, Nice, elated tears. We have the option of using deployment slots.
00:22
Deployment slots are a separate area where you can pull your Web app in order to test it before putting it into production.
00:28
This lot is outside of the production environment and has its own host name for access.
00:34
This allows for valid any changes before putting the Web app into production. And when the time comes, you can swap slots with the production one to make it live.
00:44
The previously stage slot now contains the former production code. So if there is an issue, you can easily swap back
00:52
when working with our deployment slots in our different versions of our applications, there are some things that are gonna be swapped and other things that are not when this action is performed. Some of the things that are swapped includes like the framework version 32 or 64 bit or Web sockets upsetting and connection strings are also going to be swapped,
01:10
but you do have the option of making these sticky
01:11
meaning. Your production slot may have a connection strength that points to the production database, and you don't want this swapped whenever you make this action happen. Other features that are swapped include handler map ings, public certificates and Web jobs content.
01:26
Here's some of the things that aren't swapped, such as the custom domain name or scale settings, and I don't want you to think about that for just a second. You may not want scale settings from your test or deaf stage to be swapped over to production, because maybe you don't care about auto scaling inside of your staging environment
01:42
because that's all it is. It's just a staging environment where you're testing the application code.
01:47
Other things include Web job schedulers, always on settings and our diagnostic settings. To understand this concept a little bit more, listen about to the azure portal created deployment slot and swap it out with an application
02:00
back inside our Web application under deployment. Let's like deployment slots
02:06
and right now we just have our production one. So let's click on at a slot,
02:09
and I'm just gonna name our slot stage.
02:12
And when creating a slot, we do have the option of cloning it from our existing production one. Right now, I'm just gonna slight Do not clone and go ahead and add.
02:23
Now that we have our slot created, let's go ahead and select it.
02:28
Have you see it's gonna take us to an overview page that's very similar to our production slot.
02:32
And right up here we have another your L that matches the name of our Web app, but it has dashed stage to match the slot that we're looking at.
02:40
Let's go ahead and click on browse.
02:44
As you can see, the staging slot has the default app, just like we saw when we first created her Web app.
02:49
Let's go back to our Web app.
02:51
So let's say I have some new code that I want a stage and verify it works before we put it into production,
02:57
just like we did in the last episode. I'm going to use FTP to send our code to our deployment slot here, so let's go back to the deployment center, scroll down to FTP
03:07
and look at our dashboard.
03:09
And I'm gonna grab our end point and credentials because these are gonna be different than what we have in production.
03:15
I also need to go back and turn on F T. P s inside our application settings.
03:30
Here I have the code that I downloaded earlier from get hub with our basic hello world application.
03:38
And here what I'm gonna do is just make a small change inside a V s code.
03:45
And instead of saying hello, world,
03:47
we're going to say hello, Cy Bury a Z 300 students.
03:54
So I'm gonna go ahead and save this.
03:57
Let's bring back our FTP client.
04:00
Let's create a new session.
04:02
I'll input the information I saved earlier,
04:13
and I'm gonna copy over our updated application,
04:20
and I need to delete the default page
04:29
back in the overview. Paige, let's go ahead and restart our application.
04:32
We'll browse to it again,
04:34
and here on reopen it. We see our updated application. Instead of saying hello World were saying Hello, Cy Bury a Z 300 students
04:43
and we know we're in our staging slot by the Earl has dash stage at the end of the name of our Web app.
04:49
So let's go back to the portal.
04:51
Let's pull up the production version of our Web app right now.
04:58
Remember, it's still just says Hello world.
05:03
Here we have our source lot, which is the stage and then our target. So we're gonna be swapping stage and production. So let's go ahead and click on Swap.
05:17
Now that our swap is successful, let's go ahead and click on clothes.
05:21
Let's go back to our production girl here and refresh.
05:26
We can see where the text has been updated with what we previously had in stage.
05:30
And if we go back to our staging app
05:32
and notice the Aureole, it has dashed age in it and we refresh.
05:35
It goes saying Hello world, which was our previous production version.
05:41
So I hope this makes sense and shows how you can stage your code, test it live, and then swap it with production in order to minimize any issues or downtime.
05:49
And if we needed to, we could immediately go back
05:54
and we could select swap again just in case there was an issue with the version. We just deployed.
06:00
The main point of swap is just understanding how it works and then knowing that some of the settings are swapped and are not swapped whenever you do so in some settings can be configured per slot, such as a connection string to a database. Let's say in your staging deployment of the application
06:15
it was connected to a staging or development database. You wouldn't suddenly want this one to become your production.
06:19
So you may want those connections to be sticky to the slot that does it for a demo. Let's jump back to the slides and wrap this up.
06:27
That does it for some of our azure app, Service's and Web app concepts coming up Next, we're going to jump into something else with an introduction to containers. See you in the next episode.

Up Next

AZ-300: Microsoft Azure Architect Technologies

Azure Solution Architects are responsible for taking business requirements and turning them into solutions. This course provides an introduction into Azure, Microsoft’s cloud platform.

Instructed By

Instructor Profile Image
Jeff Brown
Instructor