You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
@@ -40,7 +40,7 @@ After you complete this lab, you will be able to:
40
40
41
41
### Exercise 0: Configure the lab prerequisites
42
42
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.
44
44
45
45
#### Task 1: (skip if done) Create and configure the team project
46
46
@@ -65,31 +65,33 @@ In this task you will import the eShopOnWeb Git repository that will be used by
-**src** folder contains the .NET 8 website used on the lab scenarios.
67
67
68
+
#### Task 3: (skip if done) Set main branch as default branch
69
+
68
70
1. Go to **Repos > Branches**.
69
71
1. Hover on the **main** branch then click the ellipsis on the right of the column.
70
72
1. Click on **Set as default branch**.
71
73
72
-
#### Task 3: Create Azure resources
74
+
#### Task 4: Create Azure resources
73
75
74
76
In this task, you will create an Azure web app by using the cloud shell in Azure portal.
75
77
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.
77
79
1. In the Azure portal, in the toolbar, click the **Cloud Shell** icon located directly to the right of the search text box.
78
80
1. If prompted to select either **Bash** or **PowerShell**, select **Bash**.
79
81
> **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**.
80
82
81
83
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').
82
84
83
85
```bash
84
-
RESOURCEGROUPNAME='az400m09l16-RG'
86
+
RESOURCEGROUPNAME='az400m08l14-RG'
85
87
LOCATION='<region>'
86
88
az group create --name $RESOURCEGROUPNAME --location $LOCATION
87
89
```
88
90
89
91
1. To create a Windows App service plan by running the following command:
90
92
91
93
```bash
92
-
SERVICEPLANNAME='az400l16-sp'
94
+
SERVICEPLANNAME='az400l14-sp'
93
95
az appservice plan create --resource-group $RESOURCEGROUPNAME \
94
96
--name $SERVICEPLANNAME --sku B3
95
97
```
@@ -107,62 +109,7 @@ In this task, you will create an Azure web app by using the cloud shell in Azure
107
109
108
110
In this exercise, you will configure CI/CD Pipelines as code with YAML in Azure DevOps.
109
111
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 selecteither**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, selectthe 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
-

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
-

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
166
113
167
114
In this task, you will add a YAML build definition to the existing project.
168
115
@@ -249,7 +196,7 @@ In this task, you will add a YAML build definition to the existing project.
249
196
- Validate **App Service Type** points to Web App on Windows.
250
197
- in the **App Service name** dropdown list, selectthe name of the web app you deployed earlier in the lab (**az400eshoponweb...).
251
198
- 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`.
253
200
1. Confirm the settings from the Assistant pane by clicking the **Add** button.
254
201
255
202
>**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.
269
216
270
217
>**Note**: The **packageForLinux** parameter is misleading in the context of this lab, but it is valid for Windows or Linux.
271
218
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**
273
220
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.
275
222
276
223
>**Note**: Since our original CI-YAML was not configured to automatically trigger a new build, we have to initiate this one manually.
277
224
278
225
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.
279
226
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).
281
228
282
229

283
230
@@ -319,7 +266,7 @@ In this task, you will deploy an Azure Load Testing Resource into your Azure sub
319
266
1. From the 'Create a Load Testing Resource' page, provide the necessary details for the resource deployment:
320
267
- **Subscription**: selectyour Azure Subscription
321
268
- **Resource Group**: selectthe Resource Group you used fordeploying the Web App Servicein the earlier exercise
322
-
- **Name**: eShopOnWebLoadTesting
269
+
- **Name**: `eShopOnWebLoadTesting`
323
270
- **Region**: Select a region that is close to your region
324
271
325
272
>**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
335
282
336
283
In this task, you will create different Azure Load Testing tests, using different load configuration settings.
337
284
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.
339
287
1. Complete the following parameters and settings to create a load test:
340
288
- **Test URL**: Enter the URL from the Azure App Service you deployed in the previous exercise (az400eshoponweb...azurewebsites.net), **including https://**
341
289
- **Specify Load**: Virtual Users
@@ -380,27 +328,24 @@ Get started with automating load tests in Azure Load Testing by adding it to a C
380
328
381
329
After you complete this exercise, you have a CI/CD workflow that is configured to run a load test with Azure Load Testing.
382
330
383
-
#### Task 1: Identify ADO Service Connection Details
331
+
#### Task 1: Identify Azure DevOps Service Connection details
384
332
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.
386
334
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.
388
336
1. From the down left corner, select**Project Settings**.
389
337
1. Under the **Pipelines** section, select**Service Connections**.
390
338
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.
394
341
395
-
#### Task 2: Grant Service Principal Permissions
342
+
#### Task 2: Grant permissions to the Azure Load Testing resource
396
343
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.
398
345
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**.
401
347
1. In the **Role tab**, select**Load Test Contributor**in the list of job functionroles.
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 selectyour user account and click **Select**.
404
349
1. In the **Review + assign tab**, select**Review + assign** to add the role assignment.
405
350
406
351
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
420
365
- *config.yaml*: the load test YAML configuration file. You reference this file in the CI/CD workflow definition.
421
366
- *quick_test.jmx*: the JMeter test script
422
367
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.
424
369
1. Select **Repos**. In the source code folder structure, notice the **tests** subfolder. Notice the ellipsis (...), and select **New > Folder**.
425
370
1. specify **jmeter** as folder name, and **placeholder.txt** for the file name (Note: a Folder cannot be created as empty)
426
371
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
430
375
431
376
#### Task 4: Update the CI/CD workflow YAML definition file
432
377
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
-
435
378
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**.
436
379
1. Select your Azure DevOps organization, and then select **Install** to install the extension.
437
380
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
441
384
- Azure Subscription: Select the subscription which runs your Azure Resources
442
385
- Load Test File: '$(Build.SourcesDirectory)/tests/jmeter/config.yaml'
443
386
- 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`
445
388
- Load Test Run Name: ado_run
446
389
- Load Test Run Description: load testing from ADO
447
390
@@ -452,7 +395,7 @@ In this task, you will import the Azure Load Testing - Azure DevOps Marketplace
@@ -567,30 +510,8 @@ In this task, You'll use load test fail criteria to get alerted (have a failed p
567
510
568
511
1. The FAILED status of the pipeline task, actually reflects a SUCCESS of the Azure Load Testing requirement criteria validation.
569
512
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.
0 commit comments