0
votes

We have quite a few agent pools in our Azure DevOps organization, to the point that it has gotten unwieldy, so we're looking for best practices for managing agent pools. The specific question that we have at the moment is:

Should agents for multiple different operating systems be in the same agent pool, or should they be partitioned into OS-specific pools?

Microsoft partitions their hosted pools by operating system, so it would seem that going that route could be a good idea, but it would be helpful to have understanding of why before making such a decision.

One other thing to add: We have a few hundred pipelines. Recent additions of Windows agents to Linux-only pools caused a lot of random pipeline failures when the pipeline happened to run on the wrong OS. My understanding is that we could add demands to the pipelines to avoid the issue, but it would incur a significant manhour cost to update so many pipelines. If it turns out that that truly is the way to go, then we would work towards it over the long haul.

1

1 Answers

1
votes

According to the document about creating 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.
  • You're a member of the infrastructure team and would like to set up a pool of agents for use in all projects.
  • You want to share a set of agent machines with multiple projects, but not all of them.

Should agents for multiple different operating systems be in the same agent pool, or should they be partitioned into OS-specific pools?

Of course you can partition the agents into OS-specific pools so that you can choose the right OS when you run pipelines. But if you want to create new agent pools and update the pools for all pipelines, it will also take a lot of time. In addition, if one of your pipelines needs to run on different OS at the same time, you may need to specify multiple pools.

In the official document, if we have multiple agents with different operating systems in the same pool, we can use demands like:enter image description here

You can also try to use Rest API to add demands in your definitions which could be faster.