Table of contents
TOC
Collapse the table of content
Expand the table of content

Scale out and administer your build and deployment system

Last Updated: 7/7/2016

Team Services | TFS 2015 | Previous versions (XAML builds)

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 whenever 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. This enables people to create new pools and modify all existing 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 takes 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/{your-project}/_admin/_AgentQueue
  • On-premises http://{your-server}:8080/tfs/{your-project}/_admin/_AgentQueue

manage project

If you see the following view, click your team project.

control panel top to team project

control panel collection agent queues

If you have sufficient permissions, you can control who can access and manage your queues.

To grant global permissions, select All Queues and then:

  • Add a user or a group and grant:

    • Administrator to administer, manage, use, and view queues.

    • Creator to create and view queues.

    • User to view and use the queue when they define or queue a build.

    • Reader to view the queue.

  • To delete a group or user, hover over it and click the Remove user icon.

To grant narrower permissions, select a specific queue (for example Default (Default) or Hosted (Hosted) and then:

  • Add a user or a group and grant User or Administrator.

  • To delete a group or user, hover over it and click the Remove user icon.

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. You can also specify when builds are permanently destroyed (removed from the Deleted tab in the build explorer).

If you are using Team Services, 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

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 within a given team project collection.

Do I need a build agent?

You need at least one agent to 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

© 2016 Microsoft