You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Exercise - Deploy a web app by using deployment slots
4
-
metadata:
5
-
title: Exercise - Deploy a web app by using deployment slots
6
-
description: In this exercise, you'll swap deployment slots to roll out a new version of a site. You'll also use the auto swap feature and roll back a new version of a web app.
title: Exercise - Deploy a web app by using deployment slots
4
+
metadata:
5
+
title: Exercise - Deploy a web app by using deployment slots
6
+
description: In this exercise, you swap deployment slots to roll out a new version of a site. You also use the auto swap feature and roll back a new version of a web app.
Copy file name to clipboardExpand all lines: learn-pr/azure/stage-deploy-app-service-deployment-slots/includes/1-introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
When you have a successful or business-critical web app, you need to update it to respond to business changes, user demands, or security issues, but you can't allow service interruptions.
2
2
3
-
Suppose you work for a company that runs a popular social media web platform. The user interface for this platform is set up as an ASP.NET Core MVC web app that's hosted in Azure App Service. You regularly update the app's source code and roll out the updates to production. These updates occasionally cause problems when testers fail to catch bugs. Also, service is briefly interrupted when you roll out an update, and responsiveness is slow while the code is deployed and compiled.
3
+
Suppose you work for a company that runs a popular social media web platform. The user interface for this platform is set up as an ASP.NET Core MVC web app hosted in Azure App Service. You regularly update the app's source code and roll out the updates to production. These updates occasionally cause problems when testers fail to catch bugs. Also, service is briefly interrupted when you roll out an update, and responsiveness is slow while the code is deployed and compiled.
4
4
5
5
You want a way to deploy a new version of the app without downtime or a service interruption. You also want to be able to rapidly roll back a new deployment to the previous version if it causes problems.
6
6
@@ -10,7 +10,7 @@ In this module, you will:
10
10
11
11
- Create a deployment slot as a staging environment in App Service.
12
12
- Use git to deploy a new version of a web app to a slot.
13
-
- Configure which app settings are swapped and which are not swapped when you deploy a slot.
13
+
- Configure which app settings are swapped and which aren't swapped when you deploy a slot.
14
14
- Swap slots to deploy a web app or roll back a deployment.
Copy file name to clipboardExpand all lines: learn-pr/azure/stage-deploy-app-service-deployment-slots/includes/2-create-deployment-slots.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,24 @@
1
-
Organizations often need to run web apps in isolated environments to test them before deployment. They also need to deploy quickly and without affecting users.
1
+
Organizations often need to run web apps in isolated environments to test them before deployment. They also need to deploy quickly and without affecting users.
2
2
3
-
Suppose you're trying to decide whether to use slots as a streamlined way to deploy a web app in your social media system. You want to find out if deployment slots will reduce downtime during deployments, if they'll ease rollbacks, and if you can set them up in Azure.
3
+
Suppose you're trying to decide whether to use slots as a streamlined way to deploy a web app in your social media system. You want to find out if deployment slots reduce downtime during deployments, if they ease rollbacks, and if you can set them up in Azure.
4
4
5
-
Here, you'll learn how deployment slots ease the testing and rollout of new code.
5
+
Here, you learn how deployment slots ease the testing and rollout of new code.
6
6
7
7
## Use a deployment slot
8
8
9
9
Within a single Azure App Service web app, you can create multiple deployment slots. Each slot is a separate instance of that web app, and it has a separate hostname. You can deploy a different version of your web app into each slot.
10
10
11
11
One slot is the production slot. This slot is the web app that users see when they connect. Make sure that the app deployed to this slot is stable and well tested.
12
12
13
-
Use additional slots to host new versions of your web app. Against these instances, you can run tests such as integration tests, acceptance tests, and capacity tests. Fix any problems before you move the code to the production slot. Additional slots behave like their own App Service instances, so you can have confidence that your tests show how the app will run in production.
13
+
Use the other slots to host new versions of your web app. Against these instances, you can run tests such as integration tests, acceptance tests, and capacity tests. Fix any problems before you move the code to the production slot. The other deployment slots behave like their own App Service instances, so you can have confidence that your tests show you how the app runs in production.
14
14
15
15
After you're satisfied with the test results for a new app version, deploy it by swapping its slot with the production slot. Unlike a code deployment, a slot swap is instantaneous. When you swap slots, the slot hostnames are exchanged, immediately sending production traffic to the new version of the app. When you use slot swaps to deploy, your app is never exposed to the public web in a partially deployed state.
16
16
17
17
If you find that, in spite of your careful testing, the new version has a problem, you can roll back the version by swapping the slots back.
18
18
19
19
## Understand slots as separate Azure resources
20
20
21
-
When you use more than one deployment slot for a web app, those slots are treated as separate instances of that web app. For example, they're listed separately on the **All resources** page in the Azure portal. They each have their own URL. However, each slot shares the resources of the App Service plan, including virtual machine memory and CPU, as well as disk space.
21
+
When you use more than one deployment slot for a web app, those slots are treated as separate instances of that web app. For example, they're listed separately on the **All resources** page in the Azure portal. They each have their own URL. However, each slot shares the resources of the App Service plan, including virtual machine memory and CPU, and disk space.
22
22
23
23
## Create deployment slots and tiers
24
24
@@ -37,7 +37,7 @@ Deployment slots are available only when your web app uses an App Service plan i
37
37
38
38
Many of the technologies that developers use to create web apps require final compilation and other actions on the server before they deliver a page to a user. Many of these tasks are completed when the app starts up and receives a request. For example, if you use ASP.NET to build your app, code is compiled and views are completed when the first user requests a page. Subsequent requests for that page receive a faster response, because the code is already compiled.
39
39
40
-
The initial delay is called a *cold start*. You can avoid a cold start by using slot swaps to deploy to production. When you swap a slot into production, you "warm up" the app because your action sends a request to the root of the site. The warm-up request ensures that all compilation and caching tasks finish. After the swap, the site responds as quickly as if it had been deployed for days.
40
+
The initial delay is called a *cold start*. You can avoid a cold start by using slot swaps to deploy to production. When you swap a slot into production, you "warm up" the app because your action sends a request to the root of the site. The warm-up request ensures that all compilation and caching tasks finish. After the swap, the site responds as quickly as if it were deployed for days.
41
41
42
42
## Create a deployment slot
43
43
@@ -68,8 +68,8 @@ The new slot's hostname is derived from the web app name and the name of the slo
68
68
69
69

70
70
71
-
You can deploy your code to the new slot the same way you deploy it for the production slot. Just substitute the new slot's name or URL in the configuration of the deployment tool you use. If you use FTP to deploy, you'll see the FTP hostname and username just under the slot's URL.
71
+
You can deploy your code to the new slot the same way you deploy it for the production slot. Just substitute the new slot's name or URL in the configuration of the deployment tool you use. If you use FTP to deploy, you see the FTP hostname and username just under the slot's URL.
72
72
73
-
The new slot is effectively a separate web app with a different hostname. That's why anyone on the internet can access it if they know that hostname. Unless you register the slot with a search engine or link to it from a crawled page, the slot won't appear in search-engine indexes. It will remain obscure to the general internet user.
73
+
The new slot is effectively a separate web app with a different hostname. Anyone on the internet can access it if they know that hostname. Unless you register the slot with a search engine or link to it from a crawled page, the slot doesn't appear in search-engine indexes. It remains obscure to the general internet user.
74
74
75
-
You can control access to a slot by using IP address restrictions. Create a list of IP address ranges that you'll allow accessing the slot or a list of ranges that you'll deny access to the slot. These lists are like the allow ranges and deny ranges that you can set up on a firewall. Use this list to permit access only to computers that belong to your company or development team.
75
+
You can control access to a slot by using IP address restrictions. Create a list of IP address ranges that are allowed access to the slot or a list of ranges that are denied access to the slot. These lists are like the allow and deny ranges that you can set up on a firewall. Use this list to permit access only to computers that belong to your company or development team.
0 commit comments