zoukankan      html  css  js  c++  java
  • TFS 2008 Running two Build Agents on the Same Machine

    There have been at least a couple of forum posts from users that would like to run more than one build agent on the same physical machine. The normal reason is that they have more than one TFS server and want to use the machine as a build agent for both.

    In this post I will describe how to add another build agent to a machine that already has one installed. The steps are very manual but should be simple enough.

    1. First you need to copy the actual binary for the service and it's config file. The config file is keyed off the name of the binary, and we have to have a separate config file for each.
      • cd "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies"
      • copy TfsBuildService.exe TfsBuildService-2.exe
      • copy TfsBuildService.exe.config TFSBuildService-2.exe.config
    2. Next you need to edit the new config file to point to the other server and use a different port number.
      • notepad TFSBuildService-2.exe.config
      • Search for port and change the port number from 9191 to something new like 8181
      • There's also another port number for interactive running that defaults to 9192, you should change that one as well. Let's say to 8182.
      • Now, search for AllowedTeamServer and set the value to the full URL of the new server.
      • Save your changes.
    3. Now, you can install the new service using sc.exe and get it started.Take note of the spaces after the equals signs in the sc command line.
      • sc \\jpricket-test create "MyVSTFBuild" binPath= "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\TfsBuildService-2.exe" DisplayName= "My Team Build Service"
      • Now, open up Control Panel\Administrative Tools\Services.
      • Find "My Team Build Service". Right click on it and open Properties.
      • On the Log On tab, set it to the service account and password that you want to use.
      • Hit OK to save your changes and then start the service. 
    4. Finally, you have to create a build agent on the other server that points to this new machine and port.
      • Open Visual Studio
      • Connect the other TFS server and the correct Team Project
      • Right click on the Builds node in team explorer and select Manage Build Agents.
      • Make sure to create one with the correct port number and machine name.
      • You will also want to change the "Working Directory" to something different that the other instance of the build service uses. I used "$(Temp)\my\$(BuildDefinitionPath)"
    5.  Now, you're ready to build on both agents using the same machine.

    UPDATE: I neglected to mention that you should reserve the new port number that you decide to use in step 2. You can read up on how to do this with the wcfHttpConfig tool here. Basically you just need to run a command prompt, change to the privateassemblies area of the Visual Studio program directory (usually C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies) and type the following at the command line:  wcfhttpconfig.exe reserve DOMAIN\TeamBuildAccount 8181
    reference :http://blogs.msdn.com/jpricket/archive/2007/08/03/tfs-2008-running-two-build-agents-on-the-same-machine.aspx

  • 相关阅读:
    .NET Core技术研究-HttpContext访问的正确姿势
    .NET 5 Preview 1的深度解读和跟进
    玩转VSCode-完整构建VSCode开发调试环境
    China .NET Conf 2019-.NET技术架构下的混沌工程实践
    如何做好开发自测
    .NetCore技术研究-.NET Core迁移前的准备工作
    .NetCore技术研究-一套代码同时支持.NET Framework和.NET Core
    .NetCore技术研究-ConfigurationManager在单元测试下的坑
    统一流控服务开源:基于.Net Core的流控服务
    计组:计算机为什么有反码补码?不列公式!
  • 原文地址:https://www.cnblogs.com/snowball/p/945818.html
Copyright © 2011-2022 走看看