Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit 6e122d1

Browse files
committed
Update instructions and remove tasks
1 parent 672ea51 commit 6e122d1

1 file changed

Lines changed: 29 additions & 108 deletions

File tree

Instructions/Labs/AZ400_M08_L14_Monitor_Application_Performance_with_Azure_Load_Testing.md

Lines changed: 29 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ After you complete this lab, you will be able to:
4040

4141
### Exercise 0: Configure the lab prerequisites
4242

43-
In this exercise, you will set up the prerequisites for the lab, which consist of a new Azure DevOps project with a repository based on the [eShopOnWeb](https://github.com/MicrosoftLearning/eShopOnWeb).
43+
In this exercise, you will set up the prerequisites for the lab.
4444

4545
#### Task 1: (skip if done) Create and configure the team project
4646

@@ -65,31 +65,33 @@ In this task you will import the eShopOnWeb Git repository that will be used by
6565
- **.github** folder container YAML GitHub workflow definitions.
6666
- **src** folder contains the .NET 8 website used on the lab scenarios.
6767

68+
#### Task 3: (skip if done) Set main branch as default branch
69+
6870
1. Go to **Repos > Branches**.
6971
1. Hover on the **main** branch then click the ellipsis on the right of the column.
7072
1. Click on **Set as default branch**.
7173

72-
#### Task 3: Create Azure resources
74+
#### Task 4: Create Azure resources
7375

7476
In this task, you will create an Azure web app by using the cloud shell in Azure portal.
7577

76-
1. From the lab computer, start a web browser, navigate to the [**Azure Portal**](https://portal.azure.com), and sign in with the user account that has the Owner role in the Azure subscription you will be using in this lab and has the role of the Global Administrator in the Microsoft Entra tenant associated with this subscription.
78+
1. From the lab computer, start a web browser, navigate to the [**Azure Portal**](https://portal.azure.com), and sign in.
7779
1. In the Azure portal, in the toolbar, click the **Cloud Shell** icon located directly to the right of the search text box.
7880
1. If prompted to select either **Bash** or **PowerShell**, select **Bash**.
7981
> **Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and select **Create storage**.
8082
8183
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a resource group (replace the `<region>` placeholder with the name of the Azure region closest to you such as 'eastus').
8284

8385
```bash
84-
RESOURCEGROUPNAME='az400m09l16-RG'
86+
RESOURCEGROUPNAME='az400m08l14-RG'
8587
LOCATION='<region>'
8688
az group create --name $RESOURCEGROUPNAME --location $LOCATION
8789
```
8890

8991
1. To create a Windows App service plan by running the following command:
9092

9193
```bash
92-
SERVICEPLANNAME='az400l16-sp'
94+
SERVICEPLANNAME='az400l14-sp'
9395
az appservice plan create --resource-group $RESOURCEGROUPNAME \
9496
--name $SERVICEPLANNAME --sku B3
9597
```
@@ -107,62 +109,7 @@ In this task, you will create an Azure web app by using the cloud shell in Azure
107109

108110
In this exercise, you will configure CI/CD Pipelines as code with YAML in Azure DevOps.
109111

110-
#### Task 1: (skip if done) Create a Service Connection for deployment
111-
112-
In this task, you will create a Service Principal by using the Azure CLI, which will allow Azure DevOps to:
113-
114-
- Deploy resources on your Azure subscription.
115-
- Have read access on the later created Key Vault secrets.
116-
117-
> **Note**: If you do already have a Service Principal, you can proceed directly to the next task.
118-
119-
You will need a Service Principal to deploy Azure resources from Azure Pipelines. Since we are going to retrieve secrets in a pipeline, we will need to grant permission to the service when we create the Azure Key Vault.
120-
121-
A Service Principal is automatically created by Azure Pipelines, when you connect to an Azure subscription from inside a pipeline definition or when you create a new Service Connection from the project settings page (automatic option). You can also manually create the Service Principal from the portal or using Azure CLI and re-use it across projects.
122-
123-
1. From the lab computer, start a web browser, navigate to the [**Azure Portal**](https://portal.azure.com), and sign in with the user account that has the Owner role in the Azure subscription you will be using in this lab and has the role of the Global Administrator in the Microsoft Entra tenant associated with this subscription.
124-
1. In the Azure portal, click on the **Cloud Shell** icon, located directly to the right of the search textbox at the top of the page.
125-
1. If prompted to select either **Bash** or **PowerShell**, select **Bash**.
126-
127-
> **Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and select **Create storage**.
128-
129-
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following commands to retrieve the values of the Azure subscription ID and subscription name attributes:
130-
131-
```bash
132-
az account show --query id --output tsv
133-
az account show --query name --output tsv
134-
```
135-
136-
> **Note**: Copy both values to a text file. You will need them later in this lab.
137-
138-
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a Service Principal (replace the **myServicePrincipalName** with any unique string of characters consisting of letters and digits) and **mySubscriptionID** with your Azure subscriptionId :
139-
140-
```bash
141-
az ad sp create-for-rbac --name myServicePrincipalName \
142-
--role contributor \
143-
--scopes /subscriptions/mySubscriptionID
144-
```
145-
146-
> **Note**: The command will generate a JSON output. Copy the output to text file. You will need it later in this lab.
147-
148-
1. Next, from the lab computer, start a web browser, navigate to the Azure DevOps **eShopOnWeb** project. Click on **Project Settings > Service Connections (under Pipelines)** and **New Service Connection**.
149-
150-
![Screenshot of the new service connection button.](images/new-service-connection.png)
151-
152-
1. On the **New service connection** blade, select **Azure Resource Manager** and **Next** (may need to scroll down).
153-
154-
1. The choose **Service Principal (manual)** and click on **Next**.
155-
156-
1. Fill in the empty fields using the information gathered during previous steps:
157-
- Subscription Id and Name.
158-
- Service Principal Id (appId), Service principal key (password) and Tenant ID (tenant).
159-
- In **Service connection name** type **`azure subs`**. This name will be referenced in YAML pipelines when needing an Azure DevOps Service Connection to communicate with your Azure subscription.
160-
161-
![Screenshot of the Azure service connection panel.](images/azure-service-connection.png)
162-
163-
1. Click on **Verify and Save**.
164-
165-
#### Task 2: Add a YAML build and deploy definition
112+
#### Task 1: Add a YAML build and deploy definition
166113

167114
In this task, you will add a YAML build definition to the existing project.
168115

@@ -249,7 +196,7 @@ In this task, you will add a YAML build definition to the existing project.
249196
- Validate **App Service Type** points to Web App on Windows.
250197
- in the **App Service name** dropdown list, select the name of the web app you deployed earlier in the lab (**az400eshoponweb...).
251198
- in the **Package or folder** text box, **update** the Default Value to `$(Build.ArtifactStagingDirectory)/**/Web.zip`.
252-
- Expand **Application and Configuration Settings** and add the value `-UseOnlyInMemoryDatabase true -ASPNETCORE_ENVIRONMENT Development`
199+
- Expand **Application and Configuration Settings**, and in the App settings text box, add the following key-value pairs: `-UseOnlyInMemoryDatabase true -ASPNETCORE_ENVIRONMENT Development`.
253200
1. Confirm the settings from the Assistant pane by clicking the **Add** button.
254201

255202
> **Note**: This will automatically add the deployment task to the YAML pipeline definition.
@@ -269,15 +216,15 @@ In this task, you will add a YAML build definition to the existing project.
269216

270217
> **Note**: The **packageForLinux** parameter is misleading in the context of this lab, but it is valid for Windows or Linux.
271218

272-
1. Before saving the updates to the yml-file, give it a more clear name. On top of the yaml-editor window, it shows **EShopOnweb/azure-pipelines-#.yml**. (where # is a number, typically 1 but could be different in your setup.) Select **that filename**, and rename it to **m09l16-pipeline.yml**
219+
1. Before saving the updates to the yml-file, give it a more clear name. On top of the yaml-editor window, it shows **EShopOnweb/azure-pipelines-#.yml**. (where # is a number, typically 1 but could be different in your setup.) Select **that filename**, and rename it to **m08l14-pipeline.yml**
273220

274-
1. Click **Save**, on the **Save** pane, click **Save** again to commit the change directly into the master branch.
221+
1. Click **Save**, on the **Save** pane, click **Save** again to commit the change directly into the main branch.
275222

276223
> **Note**: Since our original CI-YAML was not configured to automatically trigger a new build, we have to initiate this one manually.
277224

278225
1. From the Azure DevOps left menu, navigate to **Pipelines** and select **Pipelines** again. Next, select **All** to open all pipeline definitions, not just the Recent ones.
279226

280-
> **Note**: if you kept all previous pipelines from previous lab exercises, this new pipeline might have reused a default **eShopOnWeb (#)** sequence name for the pipeline as shown in below screenshot. Select a pipeline (most probably the one with the highest sequence number, select Edit and validate it points to the m09l16-pipeline.yml code file).
227+
> **Note**: if you kept all previous pipelines from previous lab exercises, this new pipeline might have reused a default **eShopOnWeb (#)** sequence name for the pipeline as shown in below screenshot. Select a pipeline (most probably the one with the highest sequence number, select Edit and validate it points to the m08l14-pipeline.yml code file).
281228

282229
![Screenshot of Azure Pipelines showing eShopOnWeb runs.](images/m3/eshoponweb-m9l16-pipeline.png)
283230

@@ -319,7 +266,7 @@ In this task, you will deploy an Azure Load Testing Resource into your Azure sub
319266
1. From the 'Create a Load Testing Resource' page, provide the necessary details for the resource deployment:
320267
- **Subscription**: select your Azure Subscription
321268
- **Resource Group**: select the Resource Group you used for deploying the Web App Service in the earlier exercise
322-
- **Name**: eShopOnWebLoadTesting
269+
- **Name**: `eShopOnWebLoadTesting`
323270
- **Region**: Select a region that is close to your region
324271

325272
> **Note**: Azure Load Testing service is not available in all Azure Regions.
@@ -335,7 +282,8 @@ In this task, you will deploy an Azure Load Testing Resource into your Azure sub
335282

336283
In this task, you will create different Azure Load Testing tests, using different load configuration settings.
337284

338-
1. From within the **eShopOnWebLoadTesting** Azure Load Testing Resource blade, navigate to **Tests**. Click the **+Create** menu option, and select **Create a URL-based test**.
285+
1. From within the **eShopOnWebLoadTesting** Azure Load Testing Resource blade, navigate to **Tests** under **Tests**. Click the **+ Create** menu option, and select **Create a URL-based test**.
286+
1. Uncheck the **Enable advanced settings** checkbox, to display the advanced settings.
339287
1. Complete the following parameters and settings to create a load test:
340288
- **Test URL**: Enter the URL from the Azure App Service you deployed in the previous exercise (az400eshoponweb...azurewebsites.net), **including https://**
341289
- **Specify Load**: Virtual Users
@@ -380,27 +328,24 @@ Get started with automating load tests in Azure Load Testing by adding it to a C
380328

381329
After you complete this exercise, you have a CI/CD workflow that is configured to run a load test with Azure Load Testing.
382330

383-
#### Task 1: Identify ADO Service Connection Details
331+
#### Task 1: Identify Azure DevOps Service Connection details
384332

385-
In this task, you will grant the required permissions to the Azure DevOps Service Connection's Service Principal.
333+
In this task, you will grant the required permissions to the Azure DevOps Service Connection.
386334

387-
1. From the **Azure DevOps Portal**(<https://dev.azure.com>), navigate to the **eShopOnWeb** Project.
335+
1. From the **Azure DevOps Portal**(<https://aex.dev.azure.com>), navigate to the **eShopOnWeb** Project.
388336
1. From the down left corner, select **Project Settings**.
389337
1. Under the **Pipelines** section, select **Service Connections**.
390338
1. Notice the Service Connection, having the name of your Azure Subscription you used to deploy Azure Resources at the start of the lab exercise.
391-
1. **Select the Service Connection**. From the **Overview** tab, navigate to **Details** and select **Manage Service Principal**.
392-
1. This redirects you to the Azure Portal, from where it opens the **Service Principal** details for the identity object.
393-
1. Copy the **Display Name** value (formatted like Name_of_ADO_Organization_eShopOnWeb_-b86d9ae1-7552-4b75-a1e0-27fb2ea7f9f4) aside, as you will need this in the next steps.
339+
1. **Select the Service Connection**. From the **Overview** tab, navigate to **Details** and select **Manage service connection roles**.
340+
1. This redirects you to the Azure Portal, from where it opens the resource group details in the access control (IAM) blade.
394341

395-
#### Task 2: Grant Service Principal Permissions
342+
#### Task 2: Grant permissions to the Azure Load Testing resource
396343

397-
Azure Load Testing uses Azure RBAC to grant permissions for performing specific activities on your load testing resource. To run a load test from your CI/CD pipeline, you grant the **Load Test Contributor** role to the service principal.
344+
Azure Load Testing uses Azure RBAC to grant permissions for performing specific activities on your load testing resource. To run a load test from your CI/CD pipeline, you grant the **Load Test Contributor** role to the Azure DevOps service connection.
398345

399-
1. In the **Azure portal**, go to your **Azure Load Testing** resource.
400-
1. Select **Access control (IAM)** > Add > Add role assignment.
346+
1. Select **+ Add** and **Add role assignment**.
401347
1. In the **Role tab**, select **Load Test Contributor** in the list of job function roles.
402-
1. In the **Members tab**, select **Select members**, and then use the **display name** you copied previously to search the service principal.
403-
1. Select the **service principal**, and then select **Select**.
348+
1. In the **Members tab**, select **Select members**, and then find and select your user account and click **Select**.
404349
1. In the **Review + assign tab**, select **Review + assign** to add the role assignment.
405350

406351
You can now use the service connection in your Azure Pipelines workflow definition to access your Azure load testing resource.
@@ -420,7 +365,7 @@ Perform the following steps to download the input files for an existing load tes
420365
- *config.yaml*: the load test YAML configuration file. You reference this file in the CI/CD workflow definition.
421366
- *quick_test.jmx*: the JMeter test script
422367
423-
1. Commit all extracted input files to your source control repository. To do this, navigate to the **Azure DevOps Portal**(<https://dev.azure.com>), and navigate to the **eShopOnWeb** DevOps Project.
368+
1. Commit all extracted input files to your source control repository. To do this, navigate to the **Azure DevOps Portal**(<https://aex.dev.azure.com/>), and navigate to the **eShopOnWeb** DevOps Project.
424369
1. Select **Repos**. In the source code folder structure, notice the **tests** subfolder. Notice the ellipsis (...), and select **New > Folder**.
425370
1. specify **jmeter** as folder name, and **placeholder.txt** for the file name (Note: a Folder cannot be created as empty)
426371
1. Click **Commit** to confirm the creation of the placeholder file and jmeter folder.
@@ -430,8 +375,6 @@ Perform the following steps to download the input files for an existing load tes
430375
431376
#### Task 4: Update the CI/CD workflow YAML definition file
432377
433-
In this task, you will import the Azure Load Testing - Azure DevOps Marketplace extension, as well as updating the existing CI/CD pipeline with the AzureLoadTest task.
434-
435378
1. To create and run a load test, the Azure Pipelines workflow definition uses the **Azure Load Testing task extension** from the Azure DevOps Marketplace. Open the [Azure Load Testing task extension](https://marketplace.visualstudio.com/items?itemName=AzloadTest.AzloadTesting) in the Azure DevOps Marketplace, and select **Get it free**.
436379
1. Select your Azure DevOps organization, and then select **Install** to install the extension.
437380
1. From within the Azure DevOps Portal and Project, navigate to **Pipelines** and select the pipeline created at the start of this exercise. Click **Edit**.
@@ -441,7 +384,7 @@ In this task, you will import the Azure Load Testing - Azure DevOps Marketplace
441384
- Azure Subscription: Select the subscription which runs your Azure Resources
442385
- Load Test File: '$(Build.SourcesDirectory)/tests/jmeter/config.yaml'
443386
- Load Test Resource Group: The Resource Group which holds your Azure Load Testing Resources
444-
- Load Test Resource Name: ESHopOnWebLoadTesting
387+
- Load Test Resource Name: `eShopOnWebLoadTesting`
445388
- Load Test Run Name: ado_run
446389
- Load Test Run Description: load testing from ADO
447390
@@ -452,7 +395,7 @@ In this task, you will import the Azure Load Testing - Azure DevOps Marketplace
452395
```yml
453396
- task: AzureLoadTest@1
454397
inputs:
455-
azureSubscription: 'AZURE DEMO SUBSCRIPTION(b86d9ae1-1234-4b75-a8e7-27fb2ea7f9f4)'
398+
azureSubscription: 'AZURE DEMO SUBSCRIPTION'
456399
loadTestConfigFile: '$(Build.SourcesDirectory)/tests/jmeter/config.yaml'
457400
resourceGroup: 'az400m05l11-RG'
458401
loadTestResource: 'eShopOnWebLoadTesting'
@@ -567,30 +510,8 @@ In this task, You'll use load test fail criteria to get alerted (have a failed p
567510

568511
1. The FAILED status of the pipeline task, actually reflects a SUCCESS of the Azure Load Testing requirement criteria validation.
569512

570-
### Exercise 3: Remove the Azure lab resources
571-
572-
In this exercise, you will remove the Azure resources provisioned in this lab to eliminate unexpected charges.
573-
574-
> **Note**: Remember to remove any newly created Azure resources that you no longer use. Removing unused resources ensures you will not see unexpected charges.
575-
576-
#### Task 1: Remove the Azure lab resources
577-
578-
In this task, you will use Azure Cloud Shell to remove the Azure resources provisioned in this lab to eliminate unnecessary charges.
579-
580-
1. In the Azure portal, open the **Bash** shell session within the **Cloud Shell** pane.
581-
1. List all resource groups created throughout the labs of this module by running the following command:
582-
583-
```sh
584-
az group list --query "[?starts_with(name,'az400m09l16')].name" --output tsv
585-
```
586-
587-
1. Delete all resource groups you created throughout the labs of this module by running the following command:
588-
589-
```sh
590-
az group list --query "[?starts_with(name,'az400m09l16')].[name]" --output tsv | xargs -L1 bash -c 'az group delete --name $0 --no-wait --yes'
591-
```
592-
593-
> **Note**: The command executes asynchronously (as determined by the --nowait parameter), so while you will be able to run another Azure CLI command immediately afterwards within the same Bash session, it will take a few minutes before the resource groups are actually removed.
513+
> [!IMPORTANT]
514+
> Remember to delete the resources created in the Azure portal to avoid unnecessary charges.
594515

595516
## Review
596517

0 commit comments

Comments
 (0)