Task: Manage a Web App

Video: Azure App Service Management

Estimated time: 20 minutes

Goal

In this task you will manage a web app. You will change the tier of the web app and create a staging deployment slot. You will deploy code to the staging deployment slot and add a configuration setting for the production and staging slots. You will verify that both production and staging are working as expected.

Pre-requisites

  1. Non-production Azure subscription
  2. Azure Web app with code deployed
  3. Archive file with web app deployment

See the Pre-requisite setup for instructions on provisioning the web app and downloading the archive file.

Requirements

  1. Create a deployment slot
  2. Deploy code to the deployment slot
  3. Implement slot-based settings

Pre-requisite setup

You will need to download an archive file with web app code. You can download the archive from:

https://inedemoworkload.blob.core.windows.net/codedeploy/webapp.zip

This task also requires several Azure resources. To deploy the resources required for this task, run the following from a bash cloud shell:

curl https://inedemoassets.blob.core.windows.net/taskfiles/azure_admin/scripts/deploy-3671-T120-pre.sh | sh

This script provisions the following resources:

Resource Name
Resource group task-webapp-rg
Web app **<a unique name>
App service plan mgmt-asp

Support resources are not shown.

Requirement 1: Create a deployment slot

For the first requirement you must create a deployment slot named staging for the web app. Prior to creating the staging slot, you must change the performance tier of the mgmt-asp app service plan to S1 (standard, level 1).

Requirement 2: Deploy code to the deployment slot

For this requirement you will deploy the web app code to the staging slot. To complete this task:

Requirement 3: Implement slot-based settings

Finally, you are going to add a configuration setting to the staging slot. Add an app setting named isTest with a value of true to the staging slot. Mark the setting as a slot setting. After the settings are saved, browse to the staging web app and verify that it now shows the following message near the top of the page:

This is a test site. Changes made to this site will not impact production data.

Clean up

Solution

Having trouble completing this task? View the demonstration video to see how to do it.