This repository contains labs for the Azure Hands-On Session.

Prerequisites

What You'll Learn

Clone Repo to Azure Cloud shell

Login to Azure Portal with your designated email.

Click on Cloud Shell icon on the top navigation bar.

Azure

Make sure that you have selected PowerShell in the left drop-down within Cloud shell.

Azure

Within the Cloudshell terminal, type in the below.

git clone https://github.com/Nodnarboen/AzureWebService.git
cd AzureWebService/weather-service

The above command will download the git from the repo into your Cloud bastion host. This is setup based on your Storage Account location.

Deploy Weather Service WebApp

Negative :Depending on your cloud shell location, you may change the $location value within the publish.p1 to fit your region. Full list of regions are here

$resourceGroupName=$args[0]
$webappname=$args[1]
$location="Australia East"

Replace the firstname-lastname from the below command and adapt that to your own.

./publish.ps1 firstname-lastname-dynatrace firstname-lastname-weather-service

Example

./publish.ps1 brandon-neo-dynatrace brandon-neo-weather-service

Enter Y when prompted to deploy the content of the Weather Service app (AzureWebService/weather-service/weather-service-app.zip)

Azure-shell

Verify Resource Group creation

Now that your app has been deployed, verify that the resource group has been deployed as well.

Azure-shell

Append /weather/current/Linz to your URL from your firstname-lastname-weather-service App Service

Example

https://brandon-neo-weather-service.azurewebsites.net/weather/current/Linz

You should get a page reflecting JSON results.

Azure-shell

Deploy Weather Express WebApp

Navigate to weather-express folder with cd ../weather-express command

$resourceGroupName=$args[0]
$webappname=$args[1]
$location="Australia East"

Replace the firstname-lastname from the below command and adapt that to your own.

./publish.ps1 firstname-lastname-dynatrace firstname-lastname-weather-express

Example

./publish.ps1 brandon-neo-dynatrace brandon-neo-weather-express

Enter Y when prompted to deploy the content of the Weather Service app (AzureWebService/weather-service/weather-express-app.zip)

Verify Resource Group creation

Similar to the Weather Service App verfication, check on the Weather Express App App Service URL. Is it working?

Debugging

Within the Weather Express App Service, go to the Advanced Tools under Deployment Tools.

Within the Kudu page, dropdown Debug Console to CMD and go to site/LogFiles/Application

Edit logging-errors.txt and you can find the error message with the problem

Azure-shell

Resolution and Verification

Go to App Service Editor (Preview) and under WWWROOT/config/main.js, resolve the following based on the GIF

Azure-shell

Once you have resolved the issue, you should be able to access your Weather Express Portal

Leveraging Site Extensions

Deployment the OneAgents cross both Weather Express App and Weather Service Apps

Azure-shell

Full Documentation here

Creating Function App

Create a Azure App based on the following:

Azure-shell

Adding A Function

Create a Azure Function based on the following:

Azure-shell

Leveraging Site Extensions

Deploy and instrument the Function App with Site Extension

Azure-shell

We hope you enjoyed this lab and found it useful. We would love your feedback!

How was your overall experience with this lab?

Excellent Good Average Fair Poor

What did you benefit most from this lab?

How to deploy Azure Web Apps How to instrument Web Apps How to Debug instrumenting Web Apps How to deploy and instrument Azure Function