Experiencing Cloud Benefits: Deploying a Managed Web App in Azure
Describe the benefits of using cloud services
Experiencing Cloud Benefits: Deploying a Managed Web App in Azure
This lab provides a hands-on exploration of the core benefits of cloud computing—specifically manageability, scalability, and high availability—by deploying a Platform-as-a-Service (PaaS) web application using Azure App Service.
[!IMPORTANT] This lab is designed for the AZ-900: Azure Fundamentals curriculum. It focuses on observing how cloud providers handle the "heavy lifting" of infrastructure management.
Prerequisites
- An active Azure Subscription (Free or Pay-As-You-Go).
- Access to the Azure Portal (portal.azure.com).
- Basic familiarity with terminal commands (for the CLI portion).
- Permissions to create Resource Groups and App Services.
Learning Objectives
By the end of this lab, you will be able to:
- Demonstrate Manageability: Deploy a web application without configuring underlying servers.
- Observe Scalability: Configure manual and automatic scaling settings.
- Identify Reliability: Locate built-in backup and redundancy features within the Azure platform.
Architecture Overview
The following diagram illustrates how the cloud abstraction layer works. You manage the code and configuration, while Azure manages the hardware, OS, and patching.
Step-by-Step Instructions
Step 1: Create a Resource Group (Governance)
Resource groups allow you to manage life cycles and apply security policies to a collection of resources. This is a key part of Cloud Governance.
az group create --name brainybee-lab-rg --location eastus▶Console alternative
- Search for Resource groups in the top search bar.
- Click + Create.
- Name:
brainybee-lab-rg| Region:(US) East US. - Click Review + create, then Create.
Step 2: Create an App Service Plan (Scalability)
The App Service Plan defines the region and the compute resources available to your app. Choosing a "Standard" tier allows us to see scaling features.
az appservice plan create --name brainybee-plan --resource-group brainybee-lab-rg --sku S1 --is-linux[!TIP] The
S1(Standard) SKU includes features for Autoscale, which isn't available in the Free tier.
Step 3: Create the Web App (Manageability)
We will now deploy a pre-built "Hello World" container. Notice you never had to install Nginx or configure a Linux kernel.
az webapp create --resource-group brainybee-lab-rg --plan brainybee-plan --name brainybee-app-<UNIQUE_ID> --deployment-container-image-name mcr.microsoft.com/azuredocs/aci-helloworld(Note: Replace <UNIQUE_ID> with random numbers to ensure a globally unique URL.)
▶Console alternative
- Search for App Services.
- Click + Create > Web App.
- Basics: Resource Group:
brainybee-lab-rg| Name:brainybee-app-<unique-id>| Publish:Docker Container| OS:Linux. - Docker: Options:
Single Container| Image Source:Docker Hub| Image:mcr.microsoft.com/azuredocs/aci-helloworld. - Click Review + create, then Create.
Step 4: Explore Scale-Out (Elasticity)
This demonstrates how the cloud handles sudden spikes in traffic without manual hardware installation.
- In the Portal, navigate to your App Service.
- On the left menu, select Settings > Scale out (App Service plan).
- Observe the Manual scale slider. In a cloud environment, you can move this from 1 to 10 instances in seconds.
Checkpoints
| Checkpoint | Action | Expected Result |
|---|---|---|
| Connectivity | Navigate to http://brainybee-app-<UNIQUE_ID>.azurewebsites.net | You see a "Welcome to Azure Container Instances" page. |
| Governance | Go to the Resource Group in the Portal. | You see two resources: the App Service and the App Service Plan. |
| Reliability | Look at the "Backups" menu in the App Service. | You see options to automate backups, proving built-in Reliability. |
Troubleshooting
| Error | Likely Cause | Fix |
|---|---|---|
Conflict: The name is already in use | Web App names must be globally unique. | Change the <UNIQUE_ID> to a different string of numbers. |
AuthorizationFailed | Lack of permissions in the subscription. | Ensure you have 'Contributor' or 'Owner' access to the subscription. |
| Site shows "404 Not Found" | Container is still pulling from the registry. | Wait 2-3 minutes and refresh the browser. |
Clean-Up / Teardown
[!WARNING] Failure to delete these resources will result in ongoing charges against your Azure credit or credit card.
To delete everything created in this lab, run the following command in the Azure Cloud Shell:
az group delete --name brainybee-lab-rg --yes --no-wait- In the Portal, go to Resource groups.
- Select
brainybee-lab-rg. - Click Delete resource group.
- Type the name of the group to confirm and click Delete.