4
votes

Trying to set up build server after upgrading to TFS 2015.

The way I envision is: Single Agent Pool, that will have 3 queues: 1. Nightly builds 2. CI builds 3. Gated/validation builds.

Each of them will have some agents, the goal is to have some control, to make sure nightly builds wouldn't consume all agent, so gated queue will always have some available agent.

The problem I have now is when I try to add new queue, the option "Use existing pool" is disabled, I can only add queue with creating new agent pool.

1

1 Answers

6
votes

It doesn't work the way you want it to work.

One agent can be a member of one and exactly one agent pool. The agent pool exists at the server level, not the Team Project Collection level.

One agent queue is tied to one and exactly one agent pool. However, agent pools can be referenced by different agent queues across Team Project Collection boundaries.

So, the upshot of this is that you can share your agent pools across multiple team project collections.

In VSTS, the distinction exists but is less relevant -- you can't have multiple Team Project Collections, so an agent pool and an agent queue are more or less equivalent, you just have to manage both of them.

You can use custom Capabilities (on your agents) and Demands (on your build definitions) to ensure that particular agents are always reserved for particular build scenarios.

Of course, task-based builds don't support gated checkin for TFVC yet, so your concern about gated agents always being available is moot, at least for now.

Now that all of that is out of the way, the answer to your question is simple:

Q: I'm trying to create a queue that uses an existing pool, but the controls are grayed out. Why?

A: On the Create Queue dialog box, you can't use an existing pool if it is already referenced by another queue. Each pool can be referenced by only one queue. If you delete the existing queue, you can then use the pool.

Ref: https://msdn.microsoft.com/en-us/Library/vs/alm/Build/agents/admin