Create and manage agent pools - Azure Pipelines (2024)

  • Article

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

An agent pool is a collection of agents. Instead of managing each agent individually, you organize agents into agent pools. When you configure an agent, it is registered with a single pool, and when you create a pipeline, you specify the pool in which the pipeline runs. When you run the pipeline, it runs on an agent from that pool that meets the demands of the pipeline.

Note

Managed DevOps Pools agent pools are managed in the Azure Portal. If you're using Managed DevOps Pools, see Create your first Managed DevOps Pool.

In Azure Pipelines, pools are scoped to the entire organization; so you can share the agent machines across projects.

In Azure DevOps Server, agent pools are scoped to the entire server; so you can share the agent machines across projects and collections.

Note

Agent pool jobs run a job on a single agent. If you need to run a job on all agents, such as a deployment group for classic release pipelines, see Provision deployment groups.

If you are an organization administrator, you create and manage agent pools from the agent pools tab in admin settings.

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Choose Azure DevOps, Organization settings.

    Create and manage agent pools - Azure Pipelines (1)

  3. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (2)

  1. Sign in to your project collection (http://your-server/DefaultCollection).

  2. Choose Azure DevOps, Collection settings.

    Create and manage agent pools - Azure Pipelines (3)

  3. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (4)

  1. Choose Azure DevOps, Collection settings.

    Create and manage agent pools - Azure Pipelines (5)

  2. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (6)

If you are a project team member, you create and manage agent pools from the agent pools tab in project settings.

Navigate to your project and choose Project settings, Agent pools.

Create and manage agent pools - Azure Pipelines (7)

Navigate to your project and choose Project settings, Agent pools.

Create and manage agent pools - Azure Pipelines (9)

Default agent pools

The following agent pools are provided by default:

  • Default pool: Use it to register self-hosted agents that you've set up.
  • Azure Pipelines hosted pool with various Windows, Linux, and macOS images. For a complete list of the available images and their installed software, see Microsoft-hosted agents.

    Note

    The Azure Pipelines hosted pool replaces the previous hosted pools that had names that mapped to the corresponding images. Any jobs you had in the previous hosted pools are automatically redirected to the correct image in the new Azure Pipelines hosted pool. In some circ*mstances, you may still see the old pool names, but behind the scenes the hosted jobs are run using the Azure Pipelines pool. For more information, see the Single hosted pool release notes from the July 1 2019 - Sprint 154 release notes.

By default, all contributors in a project are members of the User role on hosted pools. This allows every contributor in a project to author and run pipelines using Microsoft-hosted agents.

Designate a pool in your pipeline

  • YAML
  • Classic

To choose a Microsoft-hosted agent from the Azure Pipelines pool in your Azure DevOps Services YAML pipeline, specify the name of the image, using the YAML VM Image Label from this table.

pool: vmImage: ubuntu-latest # This is the default if you don't specify a pool or vmImage.

To use a private pool with no demands:

pool: MyPool

For more information, see the YAML schema for pools.

Manage pools and queues

  • Azure Pipelines UI
  • Azure DevOps CLI

If you are an organization administrator, you create and manage agent pools from the agent pools tab in admin settings.

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Choose Azure DevOps, Organization settings.

    Create and manage agent pools - Azure Pipelines (10)

  3. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (11)

  1. Sign in to your project collection (http://your-server/DefaultCollection).

  2. Choose Azure DevOps, Collection settings.

    Create and manage agent pools - Azure Pipelines (12)

  3. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (13)

  1. Choose Azure DevOps, Collection settings.

    Create and manage agent pools - Azure Pipelines (14)

  2. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (15)

If you are a project team member, you create and manage agent pools from the agent pools tab in project settings.

Navigate to your project and choose Project settings, Agent pools.

Create and manage agent pools - Azure Pipelines (16)

Navigate to your project and choose Project settings, Agent pools.

Create and manage agent pools - Azure Pipelines (17)

Navigate to your project and choose Project settings, Agent pools.

Create and manage agent pools - Azure Pipelines (18)

To delete a pool, go to the Agent pools list, choose More options, Delete.

Create and manage agent pools - Azure Pipelines (19)

Pools are used to run jobs. Learn about specifying pools for jobs.

If you've got a lot of self-hosted agents intended for different teams or purposes, you might want to create additional pools as explained below.

Create agent pools

Here are some typical situations when you might want to create self-hosted agent pools:

  • You're a member of a project and you want to use a set of machines owned by your team for running build and deployment jobs. First, make sure you've got the permissions to create pools in your project by selecting Security on the agent pools page in your Project settings. You must have Administrator role to be able to create new pools. Next, select Add pool and select the option to create a new pool. Finally install and configure agents to be part of that agent pool.

  • You're a member of the infrastructure team and would like to set up a pool of agents for use in all projects. First, make sure you've got the permissions to create pools in your project by selecting Security on the agent pools page in your Organization settings. Next create a New agent pool and select the option to Auto-provision this agent pool in all projects while creating the pool. This setting ensures all projects have access to this agent pool. Finally install and configure agents to be part of that agent pool.

  • You want to share a set of agent machines with multiple projects, but not all of them. First, navigate to the settings for one of the projects, add an agent pool, and select the option to create a new pool at the organization level. Next, go to each of the other projects, and create a pool in each of them while selecting the option to Use an existing agent pool from the organization. Finally, install and configure agents to be part of the shared agent pool.

  • You're a member of a project and you want to use a set of machines owned by your team for running build and deployment jobs. First, make sure you've got the permissions to create pools in your project by selecting Security on the agent pools page in your Project settings. You must have Administrator role to be able to create new pools. Next, select Add pool and select the option to create a new pool. Finally install and configure agents to be part of that agent pool.

  • You're a member of the infrastructure team and would like to set up a pool of agents for use in all projects. First, make sure you've got the permissions to create pools in your project by selecting Security on the agent pools page in your Project collection settings. Next create a New agent pool and select the option to Auto-provision this agent pool in all projects while creating the pool. This setting ensures all projects have access to this agent pool. Finally install and configure agents to be part of that agent pool.

  • You want to share a set of agent machines with multiple projects, but not all of them. First, navigate to the settings for one of the projects, add an agent pool, and select the option to create a new pool at the organization level. Next, go to each of the other projects, and create a pool in each of them while selecting the option to Use an existing agent pool from the organization. Finally, install and configure agents to be part of the shared agent pool.

  • You're a member of a project and you want to use a set of machines owned by your team for running build and deployment jobs. First, make sure you're a member of a group in All Pools with the Administrator role. Next create a New project agent pool in your project settings and select the option to Create a new organization agent pool. As a result, both an organization and project-level agent pool will be created. Finally install and configure agents to be part of that agent pool.

  • You're a member of the infrastructure team and would like to set up a pool of agents for use in all projects. First make sure you're a member of a group in All Pools with the Administrator role. Next create a New organization agent pool in your admin settings and select the option to Auto-provision corresponding project agent pools in all projects while creating the pool. This setting ensures all projects have a pool pointing to the organization agent pool. The system creates a pool for existing projects, and in the future it will do so whenever a new project is created. Finally install and configure agents to be part of that agent pool.

  • You want to share a set of agent machines with multiple projects, but not all of them. First create a project agent pool in one of the projects and select the option to Create a new organization agent pool while creating that pool. Next, go to each of the other projects, and create a pool in each of them while selecting the option to Use an existing organization agent pool. Finally, install and configure agents to be part of the shared agent pool.

Security of agent pools

Understanding how security works for agent pools helps you control sharing and use of agents.

Roles are defined on each agent pool, and membership in these roles governs what operations you can perform on an agent pool.

Organization-level security settings

Role on an agent pool in organization settingsPurpose
ReaderMembers of this role can view the agent pool as well as agents. You typically use this to add operators that are responsible for monitoring the agents and their health.
Service AccountMembers of this role can use the organization agent pool to create a project agent pool in a project. If you follow the guidelines above for creating new project agent pools, you typically do not have to add any members here.
AdministratorIn addition to all the above permissions, members of this role can register or unregister agents from the organization agent pool. They can also refer to the organization agent pool when creating a project agent pool in a project. Finally, they can also manage membership for all roles of the organization agent pool. The user that created the organization agent pool is automatically added to the Administrator role for that pool.

The All agent pools node in the Agent Pools tab is used to control the security of all organization agent pools. Role memberships for individual organization agent pools are automatically inherited from those of the 'All agent pools' node. By default, TFS and Azure DevOps Server administrators are also administrators of the 'All agent pools' node when using TFS or Azure DevOps Server.

Project-level security settings

Roles are also defined on each project agent pool, and memberships in these roles govern what operations you can perform on an agent pool at the project level.

Role on an agent pool in project settingsPurpose
ReaderMembers of this role can view the project agent pool. You typically use this to add operators that are responsible for monitoring the build and deployment jobs in that project agent pool.
UserMembers of this role can use the project agent pool when authoring pipelines.
AdministratorIn addition to all the above operations, members of this role can manage membership for all roles of the project agent pool. The user that created the pool is automatically added to the Administrator role for that pool.

Pipeline permissions

Pipeline permissions control which YAML pipelines are authorized to use an agent pool. Pipeline permissions do not restrict access from Classic pipelines.

You can choose from the following options:

  • Open access for all pipelines to use the agent pool from the more options at top-right corner of the Pipeline permissions section in security tab of an agent pool.

  • Lock down the agent pool and only allow selected YAML pipelines to use it. If any other YAML pipeline refers to the agent pool, an authorization request gets raised, which must be approved by an agent pool Administrator. This does not limit access from Classic pipelines.

Create and manage agent pools - Azure Pipelines (20)

Pipeline permissions for the Azure Pipelines agent pool cannot be configured, as the pool is accessible, by default, to all pipelines.

The All agent pools node in the Agent pools tab is used to control the security of all project agent pools in a project. Role memberships for individual project agent pools are automatically inherited from those of the 'All agent pools' node. By default, the following groups are added to the Administrator role of 'All agent pools': Build Administrators, Release Administrators, Project Administrators.

The Security action in the Agent pools tab is used to control the security of all project agent pools in a project. Role memberships for individual project agent pools are automatically inherited from what you define here. By default, the following groups are added to the Administrator role of 'All agent pools': Build Administrators, Release Administrators, Project Administrators.

FAQ

If I don't schedule a maintenance window, when will the agents run maintenance?

If no window is scheduled, then the agents in that pool will not run the maintenance job.

What is a maintenance job?

You can configure agent pools to periodically clean stale working directories and repositories. This should reduce the potential for the agents to run out of disk space. Maintenance jobs are configured at the organization level in agent pool settings.

To configure maintenance job settings:

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Choose Azure DevOps, Organization settings.

    Create and manage agent pools - Azure Pipelines (21)

  3. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (22)

  1. Sign in to your project collection (http://your-server/DefaultCollection).

  2. Choose Azure DevOps, Collection settings.

    Create and manage agent pools - Azure Pipelines (23)

  3. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (24)

  1. Choose Azure DevOps, Collection settings.

    Create and manage agent pools - Azure Pipelines (25)

  2. Choose Agent pools.

    Create and manage agent pools - Azure Pipelines (26)

Choose the desired pool and choose Settings to configure maintenance job settings for that agent pool.

Important

You must have the Manage build queues permission to configure maintenance job settings. If you don't see the Settings tab or the Maintenance History tab, you don't have that permission, which is granted by default to the Administrator role. For more information, see Security of agent pools.

Create and manage agent pools - Azure Pipelines (27)

Configure your desired settings and choose Save.

Select Maintenance History to see the maintenance job history for the current agent pool. You can download and review logs to see the cleaning steps and actions taken.

Create and manage agent pools - Azure Pipelines (28)

The maintenance is done per agent pool, not per machine; so if you have multiple agent pools on a single machine, you may still run into disk space issues.

The maintenance job of my self-hosted agent pool looks stuck. Why?

Typically, a maintenance job gets "stuck" when it's waiting to run on an agent that is no longer in the agent pool. This happens when, for example, the agent has been purposefully taken offline or when there are issues communicating with it.

Maintenance jobs that have been queued to run will wait seven days to run. Afterward, they'll be automatically set to failed state if not run. This time limit cannot be changed.

The seven-day limit is different from the maintenance job timeout setting. The latter controls the maximum number of minutes an agent can spend doing maintenance. The timer starts when the job starts, not when the job is queued on an agent.

I'm trying to create a project agent pool that uses an existing organization agent pool, but the controls are grayed out. Why?

On the 'Create a project agent pool' dialog box, you can't use an existing organization agent pool if it is already referenced by another project agent pool. Each organization agent pool can be referenced by only one project agent pool within a given project collection.

I can't select a Microsoft-hosted pool and I can't queue my build. How do I fix this?

Ask the owner of your Azure DevOps organization to grant you permission to use the pool. See Security of agent pools.

I need more hosted build resources. What can I do?

A: The Azure Pipelines pool provides all Azure DevOps organizations with cloud-hosted build agents and free build minutes each month. If you need more Microsoft-hosted build resources, or need to run more jobs in parallel, then you can either:

  • Host your own agents on infrastructure that you manage
  • Buy additional parallel jobs
Create and manage agent pools - Azure Pipelines (2024)
Top Articles
All investment decisions were made after appropriate due diligence, says Santosh Kamath of Franklin Templeton
5 Non-Basic Investment Tips For Singaporeans Who Say They Have No Time Or Money
Encore Atlanta Cheer Competition
Bj 사슴이 분수
Spn 1816 Fmi 9
Was ist ein Crawler? | Finde es jetzt raus! | OMT-Lexikon
Ymca Sammamish Class Schedule
Computer Repair Tryon North Carolina
What's Wrong with the Chevrolet Tahoe?
Tlc Africa Deaths 2021
The Weather Channel Facebook
What Is A Good Estimate For 380 Of 60
Luna Lola: The Moon Wolf book by Park Kara
Craigslist Malone New York
5 high school volleyball stars of the week: Sept. 17 edition
Louisiana Sportsman Classifieds Guns
Chastity Brainwash
24 Hour Drive Thru Car Wash Near Me
Tinker Repo
Craigslist St. Cloud Minnesota
Boston Dynamics’ new humanoid moves like no robot you’ve ever seen
Renfield Showtimes Near Paragon Theaters - Coral Square
Craigslist Dubuque Iowa Pets
Soul Eater Resonance Wavelength Tier List
Saxies Lake Worth
Grave Digger Wynncraft
Lesson 1.1 Practice B Geometry Answers
Till The End Of The Moon Ep 13 Eng Sub
How Do Netspend Cards Work?
Ilabs Ucsf
Bursar.okstate.edu
Siskiyou Co Craigslist
Kltv Com Big Red Box
Luciipurrrr_
Jr Miss Naturist Pageant
67-72 Chevy Truck Parts Craigslist
Prima Healthcare Columbiana Ohio
Police Academy Butler Tech
Samsung 9C8
Sinai Sdn 2023
Dynavax Technologies Corp (DVAX)
Skill Boss Guru
ENDOCRINOLOGY-PSR in Lewes, DE for Beebe Healthcare
The Closest Walmart From My Location
O'reilly's El Dorado Kansas
Directions To The Closest Auto Parts Store
2024-09-13 | Iveda Solutions, Inc. Announces Reverse Stock Split to be Effective September 17, 2024; Publicly Traded Warrant Adjustment | NDAQ:IVDA | Press Release
Jammiah Broomfield Ig
Myapps Tesla Ultipro Sign In
Deshuesadero El Pulpo
Uno Grade Scale
Affidea ExpressCare - Affidea Ireland
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5923

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.