2

Background:

This is a little known command available with the Team Foundation Server's command line utility. Essentially it lets you install team build services (along with controllers and agents) on a machine by passing in a configuration file. The syntax is

tfsconfig setup /install /unattendfile:{filepath}

The file looks like

<Configuration>
  <TeamBuild>
    <CollectionUri>
      <Uri>Url of your TFS project collection</Uri>
    </CollectionUri>
    <Credentials>
      <FullName></FullName>
      <Password></Password>
    </Credentials>
    <Controller>
      <ControllerName>Default Controller</ControllerName>
      <CustomAssemblyPath />
      <MaxConcurrentBuilds>0</MaxConcurrentBuilds>
    </Controller>
    <Agent>
      <AgentName>Agent 1 Name</AgentName>
      <ControllerName>Default Controller</ControllerName>
      <BuildDirectory>$(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath)</BuildDirectory>
    </Agent>
      <!--AgentName>Agent 2 Name</AgentName>
      <ControllerName>Controller Name</ControllerName>
      <BuildDirectory>$(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath)</BuildDirectory>
    </Agent>-->
    <Port>9191</Port>
    <UseSSL>False</UseSSL>
  </TeamBuild>
</Configuration>

In its current form it will configure TFS Build services on the machine on port 9191 with two agents.

Problem:

The way the config is setup, it will configure the build services on the machine with the url looking like

http://machinename:9191/v.....

my problem is that for some reason I want to be able to control the "machinename" or essentially the URL of the build service. I have a suspicion that it is possible by specifying another param in the config file but for the life of me I can't figure this out! Some help will be very welcome.

2
  • Can you give an example of what you'd like the URL to look like? Oct 3, 2011 at 16:04
  • 1
    Actually the whole config file is generated run time by a process which then sends it to a WCF service on a build machine which configures an agent at run time. The URL will be http://{nameofmachine}-{ip}:9191/v{randomvalue}
    – Nikhil
    Oct 3, 2011 at 17:50

2 Answers 2

4

Unfortunately, unattended installation with tfsconfig isn't documented because it was not finished in 2010. We have plans to finish in the next release.

7
  • Thanks Buck. I actually work closely with MS PSFD from Reading, UK who had found this utility by approaching the TFS product group for our project needs. You mentioned that this wasn't finished in 2010, does this mean that this approach is in effect "unsupported"?
    – Nikhil
    Oct 11, 2011 at 9:32
  • Thanks. Is there a way to achieve what I was trying to?
    – Nikhil
    Oct 13, 2011 at 8:32
  • Not with tfsconfig in 2010. I am talking to the MS person you are working with to see what we can come up with given your constraints. Oct 13, 2011 at 22:21
  • Thanks Buck. I was hoping to have this whole issue resolved by now but hey that's software for you eh! I have a call with that person today in about 20 minutes. Once I know where we are at, I will mark your reply as the accepted answer.
    – Nikhil
    Oct 17, 2011 at 10:20
  • Buck Hodges I think this has been completed and implemented in TFS 2013 however I can't find any documentation on it. Is that correct?
    – Nikhil
    Nov 15, 2013 at 15:09
2

there are some other (unsupported) methods to install agents per command-line you can find them here: other methods

1
  • The answer there just points back to my own thread here! But I quite liked the C# implementation the other thread points to. Will go through it properly
    – Nikhil
    Jun 18, 2012 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.