Scale out and administer your build and deployment system

To build your code or deploy your software you need at least one agent, and as you add more code and people, you'll eventually need more.

Build system architecture

Agents

Deploy Windows agents to build and deploy Windows, Azure, and other Visual Studio solutions. These agents can also build and deploy Java and Android apps.

Deploy Xplat agents to build and deploy Xcode apps. These agents can also build and deploy Java and Android apps.

Agent pools

Use agent pools to organize and define permission boundaries around your agents. Pools are scoped to your your Team Foundation Server application tier or Visual Studio Team Services (Team Services) account. You can share your pool across multiple team project collections.

You create and manage pools from the Agent pools control panel tab

  • Team Services: https://{your_account}.visualstudio.com/_admin/_AgentPool
  • On-premises: http://{your_server}:8080/tfs/_admin/_AgentPool

manage project

New pool

When you create a new pool, in most cases you should leave Auto-Provision Queue in Project Collections selected. This setting ensures all collections have a queue to access the pool. The system creates a queue for existing collections and whenver a collection is created. You can modify this setting later (right-click the pool).

Delegate administration of your agent pools

You can grant people permission to manage agent pools if you are a member of the Team Foundation Administrators group or a member of the Agent Pools Administrators group.

Agent pool administrators

Members of this group can register new agents in the pool and add additional users as administrators or service accounts.

Add people to the account-level Agent Pool Administrators group to grant them permission manage all the agent pools.

Default agent pool administrators

Note: By default in an on-premises server, the only member of the account-level Agent Pool Administrators group is the Team Foundation Administrators group. By default in VSO the only member of this group is the user who created the account. You will need someone in the Team Foundation Administrators group to add users or groups to the account agent pools admin group to get you started.

Add people to the Agent Pool Administrators group of a specific agent pool so they can register new agents in that pool, add users to the Agent Pool Service Accounts and add other administrators to the pool.

Global agent pool administratorsagent pools

Agent pool service accounts

Users in the Agent Pool Service Accounts group have permission to listen to the message queue for the specific pool to receive work. In most cases you should not have to manage members of this group, the agent registration process will take care of it for you. For Team Foundation Server the service account you specify for the agent (commonly Network Service) is automatically added when you register the agent. In Team Services we automatically create an internal service identity called {Pool Name} - Agent Service ({your_account}).

Queues

An agent queue provides access to a pool of agents. When you create a build or release definition, you specify which queue it uses. Queues are scoped to your team project collection, so you can share them across build and release definitions in multiple team projects.

You create and manage your queues from the Agent queues control panel tab

  • Team Services https://{your_account}.visualstudio.com/DefaultCollection/_admin/_AgentQueue
  • On-premises http://{your_server}:8080/tfs/DefaultCollection/_admin/_AgentQueue

manage project

If you see this page, click the link:

control panel top

control panel collection agent queues

Manage your queues (Team Services only)

If your team project is hosted on Team Services, you can control who is allowed to create build or release definitions that use the queue.

You can grant people permission to manage queues if you are a member of the Project Collection Administrators group, the Project Collection Build Administrators group, or the Agent Queue Administrators group.

To grant global permissions, select All Queues, and then to grant permission:

  • To manage all queues, select Agent Queue Administrators.

  • To create queues, select Agent Queue Creators.

  • To enable people to create definitions that use any queue, add them to Agent Queue Users.

To grant narrower permissions, select a queue and add people to either the administrators role or the users role.

Global retention policy settings

If you are using an on-premises Team Foundation Server, you can specify retention policy defaults and maximums for a team project collection. If you are using Visual Studio Online, you can view but not change these settings.

Global retention policy settings are on the Build control panel tab

  • Team Services: https://{your_account}.visualstudio.com/DefaultCollection/_admin/_BuildQueue
  • On-premises: http://{your_server}:8080/tfs/DefaultCollection/_admin/_BuildQueue

manage project

If you see this page, click this link:

control panel top

control panel collection build

Q&A

How does security work for agent pools and queues?

The security model for agent pools and queues provides two groups that operate as roles instead of requiring you to manage specific permissions for different users. These groups are defined for each pool and queue created and are scoped as such. There are also groups defined at the account or server level that are automatically added to the pool level groups.

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

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.

Do I need a build agent?

You need at least one agent run your build.

  • Hosted agent pool might be your easiest option if your code is built on Windows and your code is on Visual Studio Team Services.

  • Deploy Windows agents to build Windows, Azure, and other Visual Studio solutions. Windows agents can also build Java and Android apps.

  • Deploy Xplat agents to build Xcode, Android, Java, or other kinds of apps

I can't select a default agent queue and I can't queue my build. How do I fix this?

See Scale out and administer your build system: Manage your queues

I use Team Foundation Server on-premises and I don't see some of these features. Why not?

Some of these features are available only on Visual Studio Team Services and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.

Where is the Visual Studio 2013 XAML build documentation?

Visual Studio 2013 XAML build documentation