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
Copy file name to clipboardExpand all lines: learn-pr/azure/stage-deploy-app-service-deployment-slots/includes/3-exercise-create-deployment-slots.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,13 @@ Start by creating a new web app resource in the Azure portal.
33
33
| Windows Plan | Accept default. |
34
34
| Sku and size | Accept default. |
35
35
36
+
1. Select **Next : Database**.
37
+
1.
36
38
1. Select **Next : Deployment**.
37
39
38
40
1. Select **Next : Networking**.
39
41
40
-
1. Select **Next : Monitoring**, and enter the following value for the setting.
42
+
1. Select **Next : Monitoring + secure**, and enter the following value for the setting.
41
43
42
44
| Setting | Value |
43
45
|---|---|
@@ -108,7 +110,7 @@ We're going to use git to deploy the source code to the web app's production slo
108
110
:::image type="content" source="../media/3-copy-git-clone-url.png" alt-text="Screenshot of the Essentials section, where you Copy the git clone URL." lightbox="../media/3-copy-git-clone-url.png":::
109
111
110
112
> [!NOTE]
111
-
> If you don't see a git clone URL where it's shown in the preceding screenshot, refresh the portal.
113
+
> If you don't see a git clone URL in the location shown in the preceding screenshot, refresh the portal.
112
114
113
115
1. Hover over the **Git clone url** and select the *Copy to clipboard* icon. This value also contains your deployment username.
114
116
@@ -147,7 +149,7 @@ For your web app, you created one slot, the production slot, and you deployed so
147
149
148
150
1. In the command bar, select **+ Add Slot**. The **Add a slot** pane appears.
149
151
150
-
1. In the **Name** field, enter *Staging*, accept the default for**Clone settings from**, and thenselect**Add**.
152
+
1. In the **Name** field, enter *staging*, accept the default for **Clone settings from**, and then select **Add**.
151
153
152
154
1. After the deployment slot is successfully created, select **Close**.
Copy file name to clipboardExpand all lines: learn-pr/azure/stage-deploy-app-service-deployment-slots/includes/4-deploy-a-web-app-by-swapping-deployment-slots.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Here, you learn the correct configuration to swap the web app into production.
8
8
9
9
When you swap two slots, the app's configuration travels to the new slot along with the app. You can override this behavior for individual application settings and configuration strings by configuring them as **slot settings**.
10
10
11
-
Suppose, for example, you have two databases. You use one for production and the other for acceptance testing. You always want the app version in the staging slot to use the testing database. The app version in the production slot should always use the production database. To achieve this, you can configure the database connection string as a slot setting.
11
+
Suppose, for example, you have two databases. You use one for production and the other for acceptance testing. You always want the app version in the staging slot to use the testing database. The app version in the production slot should always use the production database. You can achieve this overall configuration by configuring the database connection string as a slot setting.
12
12
13
13
### Configure slot settings
14
14
@@ -40,15 +40,15 @@ To swap two slots in the Azure portal:
40
40
41
41
## Understand the slot-swapping preview
42
42
43
-
When you swap slots, the settings in the target slot (which is typically the production slot) are applied to the app version in the source slot before the hostnames are swapped. You might discover problems at this point. For example, if the database connection string is configured as a slot setting, the new version of the web app uses the existing production database. If you forgot to upgrade the database schema in the production database before the swap, you could see errors and exceptions when the new app version attempts to use the old schema.
43
+
When you swap slots, the settings in the target slot (typically the production slot) are applied to the app version in the source slot, before the hostnames are swapped. You might discover problems at this point. For example, if the database connection string is configured as a slot setting, the new version of the web app uses the existing production database. If you forgot to upgrade the database schema in the production database before the swap, you could see errors and exceptions when the new app version attempts to use the old schema.
44
44
45
45
To help you discover problems before your app goes live into production, Azure App Service offers a swap-with-preview feature. When you choose this option, the swap proceeds in two phases:
46
46
47
47
-**Phase 1**: Slot settings from the target slot are applied to the web app in the source slot. Azure then warms up the source slot. At this point, the swap operation pauses so you can test the app in the source slot to make sure it works with the target slot configuration. If you find no problems, begin the next phase.
48
48
-**Phase 2**: The hostnames for the two sites are swapped. The version of the app now in the source slot receives its slot settings.
49
49
50
50
> [!IMPORTANT]
51
-
> Test your web app thoroughly while it's in the staging slot. Eliminate code bugs and problems with non-slot settings. The swap-with-preview feature can only help you spot and eliminate problems caused by the production-slot settings. Make sure everything else is sound before you start any kind of swap into production.
51
+
> Test your web app thoroughly while it's in the staging slot. Eliminate code bugs and problems with nonslot settings. The swap-with-preview feature can only help you spot and eliminate problems caused by the production-slot settings. Make sure everything else is sound before you start any kind of swap into production.
Copy file name to clipboardExpand all lines: learn-pr/azure/stage-deploy-app-service-deployment-slots/includes/5-exercise-deploy-a-web-app-by-using-deployment-slots.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,13 @@ To configure slot settings:
14
14
15
15
1. Navigate to the **Configuration** pane for the deployment slot.
16
16
17
-
1. Select **+ New application setting**. Add a new setting with the name **ENVIRONMENT_NAME**, and a value of **production**. Check the **deployment slot setting** box to make this a slot setting. Select **OK**.
17
+
1. Select **+ New application setting**. Add a new setting with the name **ENVIRONMENT_NAME**, and a value of **production**. Check the **deployment slot setting** box to make this setting a slot setting. Select **OK**.
18
18
19
-
1. Add another setting called **APP_VERSION**, and enter the value *1*. *Don't* make this a slot setting. Select **OK**.
19
+
1. Add another setting called **APP_VERSION**, and enter the value *1*. *Don't* make this setting a slot setting. Select **OK**.
20
20
21
21
1. In the top menu bar, select **Save**, then select **Continue**.
22
22
23
-
1. Repeat the preceding steps on the **Staging** slot, but use the following values:
23
+
1. Repeat the preceding steps on the **staging** slot, but use the following values:
24
24
25
25
| Name | Value | Deployment slot setting |
26
26
|---|---|---|
@@ -29,7 +29,7 @@ To configure slot settings:
29
29
30
30
## Swap the slots
31
31
32
-
Now that you've tested version 2 of the web app in the staging slot, you can deploy it by swapping the slots. Follow these steps:
32
+
Now that you tested version 2 of the web app in the staging slot, you can deploy it by swapping the slots. Follow these steps:
33
33
34
34
1. To make sure you're configuring the production slot, select **All resources**, and then select the production slot of the web app.
35
35
@@ -47,7 +47,7 @@ Now that you've tested version 2 of the web app in the staging slot, you can dep
47
47
48
48
## Configure auto swap for the staging slot
49
49
50
-
Suppose that now that you're using deployment slots, you want to enable continuous deployment. You do this by using the auto swap feature for your web app. In a system that uses auto swap, when you deploy new code to the staging slot, Azure automatically warms it up and deploys it to production by swapping the staging and production slots. To configure auto swap, follow these steps:
50
+
Now that you're using deployment slots, you can use the auto swap feature for your web app to enable continuous deployment. When auto swap is enabled, you can deploy new code to the staging slot and Azure automatically warms it up and deploys it to production by swapping the staging and production slots. To configure auto swap, follow these steps:
51
51
52
52
1. Go to the **Configuration** pane of the staging slot's web app and go to the **General settings** tab.
53
53
@@ -92,9 +92,9 @@ Now, you modify the code to create version 3 of the web app. When you deploy it
92
92
git push staging
93
93
```
94
94
95
-
Wait for the deployment to finish. Near the end of the text output, you see a message that indicates that the deployment has requested an auto swap to the production slot.
95
+
Wait for the deployment to finish. Near the end of the text output, you see a message that indicates that the deployment requested an auto swap to the production slot.
96
96
97
-
1. In the Azure portal, go to the **Overview** page for the production slot's web app, and select**Browse**. The third version of the web app appears on a new browser tab. If the old version is shown, you mightneed to wait briefly and then refresh the page. The swap operation is atomic and occurs instantly, but it takes App Service a few moments to prepare the swap operation before running it.
97
+
1. In the Azure portal, go to the **Overview** page for the production slot's web app, and select**Browse**. The third version of the web app appears on a new browser tab. If the old version is shown, you might need to wait briefly and then refresh the page. The swap operation is atomic and occurs instantly, but it takes App Service a few moments to prepare the swap operation before running it.
98
98
99
99
## Roll back the new version
100
100
@@ -104,4 +104,4 @@ Suppose that deploying version 3 of your app to production revealed an unexpecte
104
104
105
105
1. Swap the staging and production slots.
106
106
107
-
1. When the swap finishes, on the **Overview** page, select **Browse** to view the app one last time. You'll see that version 2 was redeployed to production.
107
+
1. When the swap finishes, on the **Overview** page, select **Browse** to view the app one last time. You can see that version 2 was redeployed to production.
0 commit comments