1
votes

We have two TFS build servers (build controllers) available for our application. Builds are triggered as configured in the build definition. Every build is configured via "Build Defaults" page to specific build controller.

Let's say we have a gated check-in build. Build time is 30 minutes, 3 check-ins are made per hour. Normally these 3 gated check-in builds are triggered on the build controller 1, other build controller2 is idle.

How to trigger gated check-in build on the build controller2 if build controller1 is in use?

Is it possible to queue build on the build server with shortest build queue? How to configure load balancing on build controllers?

EDIT: I found possible solution for TFS2008 here. I'm looking for solution working for TFS2010

1

1 Answers

6
votes

I don't think this is possible. A controller can balance a build out onto which ever agents are available and that match the agent pattern of the the build (as defined in the build definition). Unless you have a serious load of build's, I would stick with a single controller per collection and more agents. The controller does very little work compared to and agent (which does the compilation, testing and deployment).

TFS Topology

For your cases I would try something like:

Controller

  • Gated Agent 1 (on \\sv-BuildAgent1)
  • Gated Agent 2 (on \\sv-BuildAgent2)
  • QA Agent... (on \\sv-BuildAgent3)
  • Other agents... (on \\wherever)
  • ...etc...

Now each of the Gated Build's Definition you would set the Build Agent to "Gated Agent *" (It's under the Process tab in 3. Advanced -> Agent Settings -> Name Filter.). This will now pick any agent that starts with "Gated Agent". You can easily scale this to as many agents on as many boxes as you need.

EDIT:

You can also put Tags on Build Agent to a achieve a similar result. This may be easier to configure. You Define the Tags in the Build Agent's properties and Configure Definitions to use them in the same section as the Name Filter (above).