Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 2.17 KB

Instructions.md

File metadata and controls

90 lines (62 loc) · 2.17 KB

Lab: Static WebApp

Lab Scenario

Create a static HTML WebApp. Static HTML code is copied from a GitHub repo. Deployment is done by running a two parameter az command:

az webapp run --name <name> --location <location>

This Lab ist stolen from

Microsoft docs: Create a static HTML web app in Azure.

Lego Building Blocks

Lab Instructions

Start Cloud Shell (Bash)

az account list -o table

Set variables

Location="westeurope"
App_Name="viking"

Add an Az Cli extension

Syntax: Add an extension

az extension list-available -o table
az extension add --name webapp
az extension list -o table
az extension show --name webapp

Copy static HTML files from GitHub repo

mkdir ~/git
cd ~/git
git clone https://github.com/Azure-Samples/html-docs-hello-world.git
ls -l

Create and deploy WebApp

Syntax: Create and deploy existing local code to the WebApp

cd html-docs-hello-world
az webapp up --location $Location --name $App_Name

Browse the WebApp

Discover the WebApp

az webapp list -o table
az webapp list -o json --query '[0].resourceGroup'
RGroup=$(az webapp list -o json --query '[0].resourceGroup' | tr -d '"')
az webapp show --name $App_Name --resource-group $RGroup

Make some changes to and redeploy WebApp

vi index.html
az webapp up --location $Location --name $App_Name

Remove WebApp by removing resource group

Syntax: Delete a resource group

az group delete --name $RGroup --yes --no-wait
az group list -o table