{"id":3055,"date":"2022-04-21T09:41:14","date_gmt":"2022-04-21T09:41:14","guid":{"rendered":"https:\/\/exceedthecloud.com\/?p=3055"},"modified":"2022-04-21T11:27:06","modified_gmt":"2022-04-21T11:27:06","slug":"configuring-agent-pools-and-understanding-pipeline-styles","status":"publish","type":"post","link":"https:\/\/exceedthecloud.com\/?p=3055","title":{"rendered":"Configuring Agent Pools and Understanding Pipeline Styles"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>YAML-based pipelines allow you to fully implement CI\/CD as code, in which pipeline definitions reside in the same repository as the code that is part of your Azure DevOps project. YAML-based pipelines support a wide range of features that are part of the classic pipelines, such as pull requests, code reviews, history, branching, and templates.<\/p>\n\n\n\n<p>Regardless of the choice of the pipeline style, to build your code or deploy your solution by using Azure Pipelines, you need an agent. An agent hosts compute resources that runs one job at a time. Jobs can be run directly on the host machine of the agent or in a container. You have an option to run your jobs using Microsoft-hosted agents, which are managed for you, or implementing a self-hosted agent that you set up and manage on your own.<\/p>\n\n\n\n<p>In this lab, you will step through the process of converting a classic pipeline into a YAML-based one and running it first by using a Microsoft-hosted agent and then performing the equivalent task by using a self-hosted agent.<\/p>\n\n\n\n<p>After you complete this lab, you will be able to:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>implement YAML-based pipelines<\/li><li>implement self-hosted agents<\/li><\/ul>\n\n\n\n<p>Review the installed applications<\/p>\n\n\n\n<p>Find the taskbar on your Windows 10 desktop. The taskbar contains the icons for the applications that you\u2019ll use in this lab:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Microsoft Edge<\/li><li><a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Visual Studio Code<\/a>. This will be installed as part of prerequisites for this lab.<\/li><\/ul>\n\n\n\n<p><strong>Set up an Azure DevOps organization<\/strong><\/p>\n\n\n\n<p>If you don\u2019t already have an Azure DevOps organization that you can use for this lab, create one by following the instructions available at&nbsp;<a href=\"https:\/\/exceedthecloud.com\/?p=2937\" target=\"_blank\" rel=\"noreferrer noopener\">Create an organization or project collection<\/a>.<\/p>\n\n\n\n<p>Lab 0: Configure the lab prerequisites<\/p>\n\n\n\n<p>In this Lab, you will set up the prerequisite for the lab, which consists of the preconfigured Parts Unlimited team project based on an Azure DevOps Demo Generator template.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Task 1: Configure the team project<\/strong><\/p>\n\n\n\n<p>In this task, you will use Azure DevOps Demo Generator to generate a new project based on the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;template.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>On your lab computer, start a web browser and navigate to&nbsp;<a href=\"https:\/\/azuredevopsdemogenerator.azurewebsites.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">Azure DevOps Demo Generator<\/a>. This utility site will automate the process of creating a new Azure DevOps project within your account that is prepopulated with content (work items, repos, etc.) required for the lab.<\/li><\/ul>\n\n\n\n<p><strong>Note<\/strong>: For more information on the site, see https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/demo-gen.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\" start=\"2\"><li>Click&nbsp;<strong>Sign in<\/strong>&nbsp;and sign in using the Microsoft account associated with your Azure DevOps subscription.<\/li><li>If required, on the&nbsp;<strong>Azure DevOps Demo Generator<\/strong>&nbsp;page, click&nbsp;<strong>Accept<\/strong>&nbsp;to accept the permission requests for accessing your Azure DevOps subscription.<\/li><li>On the&nbsp;<strong>Create New Project<\/strong>&nbsp;page, in the&nbsp;<strong>New Project Name<\/strong>&nbsp;textbox, type&nbsp;<strong>Configuring Agent Pools and Understanding Pipeline Styles<\/strong>, in the&nbsp;<strong>Select organization<\/strong>&nbsp;dropdown list, select your Azure DevOps organization, and then click&nbsp;<strong>Choose template<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"287\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture1-4.png\" alt=\"\" class=\"wp-image-3056\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture1-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture1-4-300x138.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>On the&nbsp;<strong>Choose a template<\/strong>&nbsp;page, click the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;template, and then click&nbsp;<strong>Select Template<\/strong>.<\/li><li>Click&nbsp;<strong>Create Project<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"324\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture2-4.png\" alt=\"\" class=\"wp-image-3057\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture2-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture2-4-300x156.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><strong>Note<\/strong>: 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.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>On the&nbsp;<strong>Create New Project<\/strong>&nbsp;page, click&nbsp;<strong>Navigate to project<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"360\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture3-4.png\" alt=\"\" class=\"wp-image-3058\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture3-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture3-4-300x173.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Lab 1: Author YAML-based Azure DevOps pipelines<\/strong><\/p>\n\n\n\n<p>In this Lab, you will convert a classic Azure DevOps pipeline into a YAML-based one.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Task 1: Create an Azure DevOps YAML pipeline<\/strong><\/p>\n\n\n\n<p>In this task, you will create a template-based Azure DevOps YAML pipeline.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>From the web browser displaying the Azure DevOps portal with the&nbsp;<strong>Configuring Agent Pools and Understanding Pipeline Styles<\/strong>&nbsp;project open, in the vertical navigational pane on the left side, click&nbsp;<strong>Pipelines<\/strong>.<\/li><li>On the&nbsp;<strong>Recent<\/strong>&nbsp;tab of the&nbsp;<strong>Pipelines<\/strong>&nbsp;pane, click&nbsp;<strong>New pipeline<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"316\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture4-4.png\" alt=\"\" class=\"wp-image-3059\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture4-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture4-4-300x152.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>On the&nbsp;<strong>Where is your code?<\/strong>&nbsp;pane, click&nbsp;<strong>Azure Repos Git<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"551\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture5-4.png\" alt=\"\" class=\"wp-image-3060\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture5-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture5-4-300x265.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>On the&nbsp;<strong>Select a repository<\/strong>&nbsp;pane, click&nbsp;<strong>PartsUnlimited<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"294\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture6-4.png\" alt=\"\" class=\"wp-image-3061\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture6-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture6-4-300x141.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>On the&nbsp;<strong>Review your pipeline YAML<\/strong>&nbsp;pane, review the sample pipeline, click the down-facing caret symbol next to the&nbsp;<strong>Run<\/strong>&nbsp;button, click&nbsp;<strong>Save<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"511\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture7-4.png\" alt=\"\" class=\"wp-image-3062\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture7-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture7-4-300x246.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Lab 2: Manage Azure DevOps agent pools<\/strong><\/p>\n\n\n\n<p>In this Lab, you will implement self-hosted Azure DevOps agent.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Task 1: Configure an Azure DevOps self-hosting agent<\/strong><\/p>\n\n\n\n<p>In this task, you will configure the LOD VM as an Azure DevOps self-hosting agent and use it to run a build pipeline.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>Within the Lab Virtual machine (Lab VM) or your own computer, start a web browser, navigate to&nbsp;<a href=\"https:\/\/dev.azure.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">the Azure DevOps portal<\/a>&nbsp;and sign in by using the Microsoft account associated with your Azure DevOps organization.<\/li><li>In the Azure DevOps portal, in the upper right corner of the Azure DevOps page, click the&nbsp;<strong>User settings<\/strong>&nbsp;icon, depending on whether or not you have preview features turned on, you should either see a&nbsp;<strong>Security<\/strong>&nbsp;or&nbsp;<strong>Personal access tokens<\/strong>&nbsp;item in the menu, if you see&nbsp;<strong>Security<\/strong>, click on that, then select&nbsp;<strong>Personal access tokens<\/strong>. On the&nbsp;<strong>Personal Access Tokens<\/strong>&nbsp;pane, and click&nbsp;<strong>+ New Token<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"421\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture8-4.png\" alt=\"\" class=\"wp-image-3063\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture8-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture8-4-300x202.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>On the&nbsp;<strong>Create a new personal access token<\/strong>&nbsp;pane, click the&nbsp;<strong>Show all scopes<\/strong>&nbsp;link and, specify the following settings and click&nbsp;<strong>Create<\/strong>&nbsp;(leave all others with their default values):<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Setting<\/td><td>Value<\/td><\/tr><\/thead><tbody><tr><td>Name<\/td><td><strong>Configuring Agent Pools and Understanding Pipeline Styles lab<\/strong><\/td><\/tr><tr><td>Scope (custom defined)<\/td><td><strong>Agent Pools<\/strong>&nbsp;(show more scopes option below if needed)<\/td><\/tr><tr><td>Permissions<\/td><td><strong>Read and manage<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\" start=\"2\"><li>On the&nbsp;<strong>Success<\/strong>&nbsp;pane, copy the value of the personal access token to Clipboard.<\/li><\/ul>\n\n\n\n<p><strong>Note<\/strong>: Make sure you copy the token. You will not be able to retrieve it once you close this pane.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\" start=\"3\"><li>On the&nbsp;<strong>Success<\/strong>&nbsp;pane, click&nbsp;<strong>Close<\/strong>.<\/li><li>On the&nbsp;<strong>Personal Access Token<\/strong>&nbsp;pane of the Azure DevOps portal, click&nbsp;<strong>Azure DevOps<\/strong>&nbsp;symbol in the upper left corner and then click&nbsp;<strong>Organization settings<\/strong>&nbsp;label in the lower left corner.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"434\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture9-4.png\" alt=\"\" class=\"wp-image-3064\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture9-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture9-4-300x209.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>To the left side of the&nbsp;<strong>Overview<\/strong>&nbsp;pane, in the vertical menu, in the&nbsp;<strong>Pipelines<\/strong>&nbsp;section, click&nbsp;<strong>Agent pools<\/strong>.<\/li><li>On the&nbsp;<strong>Agent pools<\/strong>&nbsp;pane, in the upper right corner, click&nbsp;<strong>Add pool<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"402\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture10-4.png\" alt=\"\" class=\"wp-image-3065\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture10-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture10-4-300x193.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>On the&nbsp;<strong>Add agent pool<\/strong>&nbsp;pane, in the&nbsp;<strong>Pool type<\/strong>&nbsp;dropdown list, select&nbsp;<strong>Self-hosted<\/strong>, in the&nbsp;<strong>Name<\/strong>&nbsp;text box, type&nbsp;<strong>Exceedm05l05a-pool <\/strong>and then click&nbsp;<strong>Create<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"834\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture11-4.png\" alt=\"\" class=\"wp-image-3066\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture11-4.png 459w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture11-4-165x300.png 165w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>Back on the&nbsp;<strong>Agent pools<\/strong>&nbsp;pane, click the entry representing the newly created&nbsp;<strong>Exceedm05l05a-pool <\/strong>.<\/li><li>On the&nbsp;<strong>Jobs<\/strong>&nbsp;tab of the&nbsp;<strong>Exceedm05l05a-pool <\/strong>&nbsp;pane, click the&nbsp;<strong>New agent<\/strong>&nbsp;button.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"261\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture12-4.png\" alt=\"\" class=\"wp-image-3067\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture12-4.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture12-4-300x125.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>On the&nbsp;<strong>Get the agent<\/strong>&nbsp;pane, ensure that the&nbsp;<strong>Windows<\/strong>&nbsp;and&nbsp;<strong>x64<\/strong>&nbsp;tabs are selected, and click&nbsp;<strong>Download<\/strong>&nbsp;to download the zip archive containing the agent binaries to download it into the local&nbsp;<strong>Downloads<\/strong>&nbsp;folder within your user profile.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"670\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture13-3.png\" alt=\"\" class=\"wp-image-3068\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture13-3.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture13-3-279x300.png 279w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><strong>Note<\/strong>: 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&nbsp;<strong>Settings<\/strong>&nbsp;menu header, in the dropdown menu, select&nbsp;<strong>Internet Options<\/strong>, in the&nbsp;<strong>Internet Options<\/strong>&nbsp;dialog box, click&nbsp;<strong>Advanced<\/strong>, on the&nbsp;<strong>Advanced<\/strong>&nbsp;tab, click&nbsp;<strong>Reset<\/strong>, in the&nbsp;<strong>Reset Internet Explorer Settings<\/strong>&nbsp;dialog box, click&nbsp;<strong>Reset<\/strong>&nbsp;again, click&nbsp;<strong>Close<\/strong>, and try the download again.<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Start Windows PowerShell as administrator and in the&nbsp;<strong>Administrator: Windows PowerShell<\/strong>&nbsp;console run the following lines to create the&nbsp;<strong>C:\\agent<\/strong>&nbsp;directory and extract the content of the downloaded archive into it.<\/li><\/ol>\n\n\n\n<p>CodeCopy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \\\nmkdir agent ; cd agent\n$TARGET = Get-ChildItem \"$Home\\Downloads\\vsts-agent-win-x64-*.zip\"\nAdd-Type -AssemblyName System.IO.Compression.FileSystem\n&#91;System.IO.Compression.ZipFile]::ExtractToDirectory($TARGET, \"$PWD\")\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"247\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture14-2.png\" alt=\"\" class=\"wp-image-3069\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture14-2.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture14-2-300x119.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>In the same&nbsp;<strong>Administrator: Windows PowerShell<\/strong>&nbsp;console, run the following to configure the agent:<\/li><\/ol>\n\n\n\n<p>CodeCopy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\\config.cmd<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>When prompted, specify the values of the following settings:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Setting<\/td><td>Value<\/td><\/tr><\/thead><tbody><tr><td>Enter server URL<\/td><td>the URL of your Azure DevOps organization, in the format&nbsp;<strong>https:\/\/dev.azure.com\/<\/strong><strong>&lt;organization_name&gt;<\/strong>, where&nbsp;&lt;organization_name&gt;&nbsp;represents the name of your Azure DevOps organization<\/td><\/tr><tr><td>Enter authentication type (press enter for PAT)<\/td><td><strong>Enter<\/strong><\/td><\/tr><tr><td>Enter personal access token<\/td><td>The access token you recorded earlier in this task<\/td><\/tr><tr><td>Enter agent pool (press enter for default)<\/td><td><strong>Exceedm05l05a-pool<\/strong><\/td><\/tr><tr><td>Enter agent name<\/td><td><strong>az400m05-vm0<\/strong><\/td><\/tr><tr><td>Enter work folder (press enter for _work)<\/td><td><strong>Enter<\/strong><\/td><\/tr><tr><td>Enter Perform an unzip for tasks for each step. (press enter for N)<\/td><td><strong>Enter<\/strong><\/td><\/tr><tr><td>Enter run agent as service? (Y\/N) (press enter for N)<\/td><td><strong>Y<\/strong><\/td><\/tr><tr><td>Enter User account to use for the service (press enter for NT AUTHORITY\\NETWORK SERVICE)<\/td><td><strong>Enter<\/strong><\/td><\/tr><tr><td>Enter whether to prevent service starting immediately after configuration is finished? (Y\/N) (press enter for N)<\/td><td><strong>Enter<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"460\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture15-2.png\" alt=\"\" class=\"wp-image-3070\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture15-2.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture15-2-300x221.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li><strong>Note<\/strong>: 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.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\" start=\"2\"><li>Switch to the browser window displaying the Azure DevOps portal and close the&nbsp;<strong>Get the agent<\/strong>&nbsp;pane.<\/li><li>Back on the&nbsp;<strong>Agents<\/strong>&nbsp;tab of the&nbsp;<strong>Exceedm05l05a-pool <\/strong>&nbsp;pane, note that the newly configured agent is listed with the&nbsp;<strong>Online<\/strong>&nbsp;status.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"153\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture16-2.png\" alt=\"\" class=\"wp-image-3071\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture16-2.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture16-2-300x74.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>In the web browser window displaying the Azure DevOps portal, in the upper left corner, click the&nbsp;<strong>Azure DevOps<\/strong>&nbsp;label.<\/li><li>In the browser window displaying the list of projects, click the tile representing your&nbsp;<strong>Configuring Agent Pools and Understanding Pipeline Styles<\/strong>&nbsp;project.<\/li><li>On the&nbsp;<strong>Configuring Agent Pools and Understanding Pipeline Styles<\/strong>&nbsp;pane, in the vertical navigational pane on the left side, in the&nbsp;<strong>Pipelines<\/strong>&nbsp;section, click&nbsp;<strong>Pipelines<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"313\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture17-2.png\" alt=\"\" class=\"wp-image-3072\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture17-2.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture17-2-300x150.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p>On the&nbsp;<strong>Recent<\/strong>&nbsp;tab of the&nbsp;<strong>Pipelines<\/strong>&nbsp;pane, select&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;and, on the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;pane, select&nbsp;<strong>Edit<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"181\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture18-2.png\" alt=\"\" class=\"wp-image-3073\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture18-2.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture18-2-300x87.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>On the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;edit pane, in the existing YAML-based pipeline, replace line&nbsp;vmImage: windows-2019&nbsp;designating the target agent pool the following content, designating the newly created self-hosted agent pool:<\/li><\/ul>\n\n\n\n<p>CodeCopy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>name: Exceedm05l05a-pool \ndemands:\n- agent.name -equals az400m05-vm0\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>For&nbsp;Task: NugetInstaller@0, click on&nbsp;<strong>Settings (link that is displaying above the task in grey colour)<\/strong>, modify&nbsp;<strong>Version of NuGet.exe to install<\/strong>&nbsp;&gt;&nbsp;<strong>4.0.0<\/strong>&nbsp;and click on&nbsp;<strong>Add<\/strong>.<\/li><li>On the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;edit pane, in the upper right corner of the pane, click&nbsp;<strong>Save<\/strong>&nbsp;and, on the&nbsp;<strong>Save<\/strong>&nbsp;pane, click&nbsp;<strong>Save<\/strong>&nbsp;again. This will automatically trigger the build based on this pipeline.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"838\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture19-2.png\" alt=\"\" class=\"wp-image-3074\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture19-2.png 470w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture19-2-168x300.png 168w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\"><li>In the Azure DevOps portal, in the vertical navigational pane on the left side, in the&nbsp;<strong>Pipelines<\/strong>&nbsp;section, click&nbsp;<strong>Pipelines<\/strong>.<\/li><li>On the&nbsp;<strong>Recent<\/strong>&nbsp;tab of the&nbsp;<strong>Pipelines<\/strong>&nbsp;pane, click the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;entry, on the&nbsp;<strong>Runs<\/strong>&nbsp;tab of the&nbsp;<strong>PartsUnlimited<\/strong>&nbsp;pane, select the most recent run, on the&nbsp;<strong>Summary<\/strong>&nbsp;pane of the run, scroll down to the bottom, in the&nbsp;<strong>Jobs<\/strong>&nbsp;section, click&nbsp;<strong>Phase 1<\/strong>&nbsp;and monitor the job until its successful completion.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"374\" src=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture20-2.png\" alt=\"\" class=\"wp-image-3075\" srcset=\"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture20-2.png 624w, https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/Picture20-2-300x180.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Review<\/strong><\/p>\n\n\n\n<p>In this lab, you learned how to convert classic pipelines into YAML-based ones and how to implement and use self-hosted agents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>YAML-based pipelines allow you to fully implement CI\/CD as code, in which pipeline definitions reside in the same repository as the code that is part of your Azure DevOps project. YAML-based pipelines support a wide range of features that are &hellip; <a href=\"https:\/\/exceedthecloud.com\/?p=3055\">Continued<\/a><\/p>\n","protected":false},"author":1,"featured_media":3077,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"kt_blocks_editor_width":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16,4],"tags":[8,105,107,108],"class_list":["post-3055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-practical-labs-series","tag-azure","tag-devops","tag-pipelines","tag-yaml"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/exceedthecloud.com\/wp-content\/uploads\/2022\/04\/istockphoto-589557322-612x612-1.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/posts\/3055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3055"}],"version-history":[{"count":2,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/posts\/3055\/revisions"}],"predecessor-version":[{"id":3078,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/posts\/3055\/revisions\/3078"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=\/wp\/v2\/media\/3077"}],"wp:attachment":[{"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exceedthecloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}