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.
Copy file name to clipboardExpand all lines: Instructions/Labs/AZ400_M03_L03_Configuring_Agent_Pools_and_Understanding_Pipeline_Styles.md
+46-33Lines changed: 46 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,47 +39,61 @@ After you complete this lab, you will be able to:
39
39
40
40
### Exercise 0: Configure the lab prerequisites
41
41
42
-
In this exercise, you will set up the prerequisite for the lab, which consists of the pre-configured Parts Unlimited team project based on an Azure DevOps Demo Generator template.
42
+
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
43
44
-
#### Task 1: Configure the team project
44
+
#### Task 1: (skip if done) Create and configure the team project
45
45
46
-
In this task, you will use Azure DevOps Demo Generator to generate a new project based on the **PartsUnlimited** template.
46
+
In this task, you will create an **eShopOnWeb**Azure DevOps project to be used by several labs.
47
47
48
-
1. On your lab computer, start a web browser and navigate to [Azure DevOps Demo Generator](https://azuredevopsdemogenerator.azurewebsites.net). This utility site will automate the process of creating a new Azure DevOps project within your account that is pre-populated with content (work items, repos, etc.) required for the lab.
48
+
1. On your lab computer, in a browser window open your Azure DevOps organization. Click on **New Project**. Give your project the name **eShopOnWeb** and leave the other fields with defaults. Click on **Create**.
49
49
50
-
> **Note**: For more information on the site, see <https://docs.microsoft.com/azure/devops/demo-gen>.
50
+
#### Task 2: (skip if done) Import eShopOnWeb Git Repository
51
51
52
-
2. Click **Sign in** and sign in using the Microsoft account associated with your Azure DevOps subscription.
53
-
3. If required, on the **Azure DevOps Demo Generator** page, click **Accept** to accept the permission requests for accessing your Azure DevOps subscription.
54
-
4. On the **Create New Project** page, in the **New Project Name** textbox, type **Configuring Agent Pools and Understanding Pipeline Styles**, in the **Select organization** dropdown list, select your Azure DevOps organization, and then click **Choose template**.
55
-
5. On the **Choose a template** page, click the **PartsUnlimited** template, and then click **Select Template**.
56
-
6. Click **Create Project**
52
+
In this task you will import the eShopOnWeb Git repository that will be used by several labs.
57
53
58
-
> **Note**: Wait for the process to complete. This should take about 2 minutes. In case the process fails, navigate to your DevOps organization, delete the project, and try again.
54
+
1. On your lab computer, in a browser window open your Azure DevOps organization and the previously created **eShopOnWeb** project. Click on **Repos>Files** , **Import a Repository**. Select **Import**. On the **Import a Git Repository** window, paste the following URL https://github.com/MicrosoftLearning/eShopOnWeb.gitand click **Import**:
59
55
60
-
7. On the **Create New Project** page, click **Navigate to project**.
-**src** folder contains the .NET 6 website used in the lab scenarios.
61
62
62
63
### Exercise 1: Author YAML-based Azure Pipelines
63
64
64
-
In this exercise, you will convert a classic Azure Pipeline into a YAML-based one.
65
+
In this exercise, you will create an application lifecycle build pipeline, using a YAML-based template.
65
66
66
67
#### Task 1: Create an Azure DevOps YAML pipeline
67
68
68
69
In this task, you will create a template-based Azure DevOps YAML pipeline.
69
70
70
-
1. From the web browser displaying the Azure DevOps portal with the **Configuring Agent Pools and Understanding Pipeline Styles** project open, in the vertical navigational pane on the left side, click **Pipelines**.
71
+
1. From the web browser displaying the Azure DevOps portal with the **EShopOnWeb** project open, in the vertical navigational pane on the left side, click **Pipelines**.
71
72
2. On the **Recent** tab of the **Pipelines** pane, click **New pipeline**.
72
73
3. On the **Where is your code?** pane, click **Azure Repos Git**.
73
-
4. On the **Select a repository** pane, click **PartsUnlimited**.
74
-
5. On the **Review your pipeline YAML** pane, review the sample pipeline, click the down-facing caret symbol next to the **Run** button, click **Save**.
74
+
4. On the **Select a repository** pane, click **EShopOnWeb**.
75
+
5. On the **Configure your pipeline** pane, click **Existing Azure Pipelines YAML File**.
76
+
6. On the **Select an existing YAML file**, select **main** for the Branch, and **/.ado/eshoponweb-ci-pr.yml** for the Path.
77
+
7. Click **Continue**.
78
+
8. On the **Review your pipeline YAML** pane, review the sample pipeline. This is a rather straight-forward .NET application Build pipeline, which does the following:
79
+
- A single Stage: Build
80
+
- A single Job: Build
81
+
- 3 tasks within the Build Job:
82
+
- Dotnet Restore
83
+
- Dotnet Build
84
+
- Dotnet Publish
85
+
86
+
9. On the **Review your pipeline YAML** pane, click the down-facing caret symbol next to the **Run** button, click **Save**.
87
+
88
+
> Note: we are just creating the pipeline definition for now, without running it. You will first set up an Azure DevOps agent pool and run the pipeline in a later exercise.
75
89
76
90
### Exercise 2: Manage Azure DevOps agent pools
77
91
78
92
In this exercise, you will implement a self-hosted Azure DevOps agent.
79
93
80
94
#### Task 1: Configure an Azure DevOps self-hosting agent
81
95
82
-
In this task, you will configure the LOD VM as an Azure DevOps self-hosting agent and use it to run a build pipeline.
96
+
In this task, you will configure your lab Virtual Machine as an Azure DevOps self-hosting agent and use it to run a build pipeline.
83
97
84
98
1. Within the Lab Virtual machine (Lab VM) or your own computer, start a web browser, navigate to [the Azure DevOps portal](https://dev.azure.com) and sign in by using the Microsoft account associated with your Azure DevOps organization.
85
99
> **Note**: The Lab Virtual machine should have all necessary prerequisite software installed. If you are installing on your own computer, you will need to install Visual Studio 2022 Community Edition and the .NET SDKs necessary to build the demo project.
@@ -88,7 +102,7 @@ In this task, you will configure the LOD VM as an Azure DevOps self-hosting agen
88
102
89
103
| Setting | Value |
90
104
| --- | --- |
91
-
| Name |**Configuring Agent Pools and Understanding Pipeline Styles lab**|
105
+
| Name |**EShopOnWeb**|
92
106
| Scope (custom defined) |**Agent Pools** (show more scopes option below if needed)|
93
107
| Permissions |**Read and manage**|
94
108
@@ -100,12 +114,12 @@ In this task, you will configure the LOD VM as an Azure DevOps self-hosting agen
100
114
6. On the **Personal Access Token** pane of the Azure DevOps portal, click **Azure DevOps** symbol in the upper left corner and then click **Organization settings** label in the lower left corner.
101
115
7. To the left side of the **Overview** pane, in the vertical menu, in the **Pipelines** section, click **Agent pools**.
102
116
8. On the **Agent pools** pane, in the upper right corner, click **Add pool**.
103
-
9. On the **Add agent pool** pane, in the **Pool type** dropdown list, select **Self-hosted**, in the **Name** text box, type **az400m05l05a-pool** and then click **Create**.
104
-
10. Back on the **Agent pools** pane, click the entry representing the newly created **az400m05l05a-pool**.
105
-
11. On the **Jobs** tab of the **az400m05l05a-pool** pane, click the **New agent** button.
117
+
9. On the **Add agent pool** pane, in the **Pool type** dropdown list, select **Self-hosted**, in the **Name** text box, type **az400m03l03a-pool** and then click **Create**.
118
+
10. Back on the **Agent pools** pane, click the entry representing the newly created **az400m03l03a-pool**.
119
+
11. On the **Jobs** tab of the **az400m03l03a-pool** pane, click the **New agent** button.
106
120
12. On the **Get the agent** pane, ensure that the **Windows** and **x64** tabs are selected, and click **Download** to download the zip archive containing the agent binaries to download it into the local **Downloads** folder within your user profile.
107
121
108
-
> **Note**: If you receive an error message at this point indicating that the current system settings prevent you from downloading the file, in the Internet Explorer window, in the upper right corner, click the gearwheel symbol designating the **Settings** menu header, in the dropdown menu, select **Internet Options**, in the **Internet Options** dialog box, click **Advanced**, on the **Advanced** tab, click **Reset**, in the **Reset Internet Explorer Settings** dialog box, click **Reset** again, click **Close**, and try the download again.
122
+
> **Note**: If you receive an error message at this point indicating that the current system settings prevent you from downloading the file, in the Browser window, in the upper right corner, click the gearwheel symbol designating the **Settings** menu header, in the dropdown menu, select **Internet Options**, in the **Internet Options** dialog box, click **Advanced**, on the **Advanced** tab, click **Reset**, in the **Reset Browser Settings** dialog box, click **Reset** again, click **Close**, and try the download again.
109
123
110
124
13. Start Windows PowerShell as administrator and in the **Administrator: Windows PowerShell** console run the following lines to create the **C:\\agent** directory and extract the content of the downloaded archive into it.
111
125
@@ -130,8 +144,8 @@ In this task, you will configure the LOD VM as an Azure DevOps self-hosting agen
130
144
| Enter server URL | the URL of your Azure DevOps organization, in the format **<https://dev.azure.com/>`<organization_name>`**, where `<organization_name>` represents the name of your Azure DevOps organization |
131
145
| Enter authentication type (press enter for PAT) | **Enter** |
132
146
| Enter personal access token | The access token you recorded earlier in this task |
133
-
| Enter agent pool (press enter for default) | **az400m05l05a-pool** |
134
-
| Enter agent name | **az400m05-vm0** |
147
+
| Enter agent pool (press enter for default) | **az400m03l03a-pool** |
148
+
| Enter agent name | **az400m03-vm0** |
135
149
| Enter work folder (press enter for _work) | **Enter** |
136
150
| **(Only if shown)** Enter Perform an unzip for tasks for each step. (press enter for N) | **WARNING**: only press **Enter** if the message is shown|
137
151
| Enter run agent as service? (Y/N) (press enter for N) | **Y** |
@@ -142,25 +156,24 @@ In this task, you will configure the LOD VM as an Azure DevOps self-hosting agen
142
156
> **Note**: You can run self-hosted agent as either a service or an interactive process. You might want to start with the interactive mode, since this simplifies verifying agent functionality. For production use, you should consider either running the agent as a service or as an interactive process with auto-logon enabled, since both persist their running state and ensure that the agent starts automatically if the operating system is restarted.
143
157
144
158
16. Switch to the browser window displaying the Azure DevOps portal and close the **Get the agent** pane.
145
-
17. Back on the **Agents** tab of the **az400m05l05a-pool** pane, note that the newly configured agent is listed with the **Online** status.
159
+
17. Back on the **Agents** tab of the **az400m03l03a-pool** pane, note that the newly configured agent is listed with the **Online** status.
146
160
18. In the web browser window displaying the Azure DevOps portal, in the upper left corner, click the **Azure DevOps** label.
147
161
19. In the browser window displaying the list of projects, click the tile representing your **Configuring Agent Pools and Understanding Pipeline Styles** project.
148
-
20. On the **Configuring Agent Pools and Understanding Pipeline Styles** pane, in the vertical navigational pane on the left side, in the **Pipelines** section, click **Pipelines**.
149
-
21. On the **Recent** tab of the **Pipelines** pane, select **PartsUnlimited** and, on the **PartsUnlimited** pane, select **Edit**.
150
-
22. On the **PartsUnlimited** edit pane, in the existing YAML-based pipeline, replace line `vmImage: windows-2019` designating the target agent pool the following content, designating the newly created self-hosted agent pool:
162
+
20. On the **EShopOnWeb** pane, in the vertical navigational pane on the left side, in the **Pipelines** section, click **Pipelines**.
163
+
21. On the **Recent** tab of the **Pipelines** pane, select **EShopOnWeb** and, on the **EShopOnWeb** pane, select **Edit**.
164
+
22. On the **EShopOnWeb** edit pane, in the existing YAML-based pipeline, replace line 13 which says `vmImage: ubuntu-latest` designating the target agent pool the following content, designating the newly created self-hosted agent pool:
151
165
152
166
```yaml
153
-
name: az400m05l05a-pool
167
+
name: az400m03l03a-pool
154
168
demands:
155
-
- agent.name -equals az400m05-vm0
169
+
- agent.name -equals az400m03-vm0
156
170
```
157
171
158
172
> **WARNING**: Be careful with copy/paste, make sure you have same indentation shown above.
159
173
160
-
23. For `Task: NugetToolInstaller@0`, click on **Settings (link that is displaying above the task in grey color)**, modify **Version of NuGet.exe to install** > **6.6.1** and click on **Add**.
161
-
24. On the **PartsUnlimited** edit pane, in the upper right corner of the pane, click **Save** and, on the **Save** pane, click **Save** again. This will automatically trigger the build based on this pipeline.
174
+
23. On the **EShopOnWeb** edit pane, in the upper right corner of the pane, click **Save** and, on the **Save** pane, click **Save** again. This will automatically trigger the build based on this pipeline.
162
175
25. In the Azure DevOps portal, in the vertical navigational pane on the left side, in the **Pipelines** section, click **Pipelines**.
163
-
26. On the **Recent** tab of the **Pipelines** pane, click the **PartsUnlimited** entry, on the **Runs** tab of the **PartsUnlimited** pane, select the most recent run, on the **Summary** pane of the run, scroll down to the bottom, in the **Jobs** section, click **Phase 1** and monitor the job until its successful completion.
176
+
26. On the **Recent** tab of the **Pipelines** pane, click the **EShopOnWeb** entry, on the **Runs** tab of the **EShopOnWeb** pane, select the most recent run, on the **Summary** pane of the run, scroll down to the bottom, in the **Jobs** section, click **Phase 1** and monitor the job until its successful completion.
0 commit comments