TFS 2010 command line - TFSConfig setup /install
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 controller开发者_如何转开发s 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.
Unfortunately, unattended installation with tfsconfig isn't documented because it was not finished in 2010. We have plans to finish in the next release.
there are some other (unsupported) methods to install agents per command-line you can find them here: other methods
精彩评论