Wednesday, February 28, 2024

Agent Pools and Its type

In this blog of DynamicsCommunity101 we will learn Azure DevOps Agent Pools and Their type

Agent pool in azure devops

In Azure DevOps, an agent pool is a collection of agents used to run your build and deployment jobs. An agent is a computing infrastructure with installed agent software that runs one job at a time.

Agent Pools:

Agent pools allow you to segregate the workloads among different sets of agents based on demands, workloads, or requirements. They provide a level of abstraction between the pipeline definitions and the agents.

Agent pool in Azure devops

Types of Agent Pools:

1. Default Pool: Automatically created in your Azure DevOps environment, which can be used to host self-hosted agents.

2. Hosted Pools: Provided by Azure DevOps, where Microsoft manages the infrastructure. These pools provide different kinds of environments to run your jobs.

Agent Types:

1. Microsoft-hosted agents: These are provided and managed by Microsoft. You don't need to set up anything; just use them in your pipelines. They are automatically updated and patched by Microsoft, offering a range of OS options for your jobs.

2. Self-hosted agents: These are the agents that you set up and manage on your own infrastructure. They can be physical, virtual, in a container, on-premises, or in the cloud. Using self-hosted agents allows you to install custom software needed for your builds and deployments, and they can also have access to your internal network resources.

Why Choose One Over the Other?

- Microsoft-hosted agents are great for starting quickly without the need to manage infrastructure. They provide clean environments for each run, which is excellent for consistency and isolation but might be slower due to the setup and teardown time for each job.

- Self-hosted agents are beneficial when you need more control over the environment, require specific software that's not available in the hosted agents or want to use your own machines to save costs or use specific hardware.

Also Self-hosted agent is very good for security: we are able to disable MFA for 1 specific IP address to push package from DevOps to LCS, rather than Microsoft hosted agent with multiple IP. Credits : Simon

How to deploy Azure pipeline agent on Windows - Self-hosted Windows agents :

Microsoft reference:

Deploy an Azure Pipelines agent on Windows - Azure Pipelines | Microsoft Learn