02 - Create a Web App
In this walkthrough, we will create a new web app that runs a Docker container. The container displays a Welcome message.
Task 1: Create a Web App (10 min)
Azure App Service is actually a collection of four services, all of which are built to help you host and run web applications. The four services (Web Apps, Mobile Apps, API Apps, and Logic Apps) look different, but in the end they all operate in very similar ways. Web Apps are the most commonly used of the four services, and this is the service that we will be using in this lab.
In this task, you will create an Azure App Service Web App.
Sign-in to the Azure portal.
From the All services blade, search for and select App Services, and click + Add, + Create, or + New
On the Basics tab of the Web App blade, specify the following settings (replace xxxx in the name of the web app with letters and digits such that the name is globally unique). Leave the defaults for everything else, including the App Service Plan.
Setting Value Subscription Choose your subscription Resource Group myRGWebApp1 (create new) Name myDockerWebAppxxxx Publish Docker Container Operating System Linux Region East US (ignore any service plan availability warnings)
Note - Remember to change the xxxx so that it makes a unique Name
Click Next > Docker and configure the container information. The startup command is optional and not needed in this exercise.
Note: This is same container that was used in the Container Instances walkthrough to display a hello world message.
Setting Value Options Single container Image Source Docker Hub Access Type Public Image and tag microsoft/aci-helloworld
Click Review + create, and then click Create.
Task 2: Test the Web App
In this task, we will test the web app.
Wait for the Web App to deploy.
From Notifications click Go to resource.
On the Overview blade, locate the URL entry.
Click on the URL to open the new browser tab and display the Welcome to Azure Container Instances page.
Switch back to the Overview blade of your web app and note that it includes several charts. If you repeat step 4 a few times, you should be able to see correspoding telemetry being displayed in the charts. This includes number of requests and average response time.
Note: To avoid additional costs, you can remove this resource group. Search for resource groups, click your resource group, and then click Delete resource group. Verify the name of the resource group and then click Delete. Monitor the Notifications to see how the delete is proceeding.