2014年1月14日 星期二

Configuring Multiple TFS Build Controller on the Same Machine

因為TFS要整併的關係,
所以必須考量不同的Collection皆須建置的問題。
其實我原本也不知道,一個Controller只能對應一個Collection。
廢話不多說,我只想先記下來。
參考:Configuring Multiple TFS Build Controller on the Same Machine

環境:
Windows Server 2012
Microsoft SQL Server 2012
Microsoft Team Foundation Server 2012
擁有兩個Collection





1.用工作管理員權限開啟cmd,將位置移向TFS tools底下。建置Windows Service並將其與
TFSBuildServiceHost.exe產生關聯。
輸入: sc create [服務名稱] binPath= "[TFSBuildServiceHost.exe位置] /NamedInstance:[服務名稱]" DisplayName= "[服務的顯示名稱]"
例如: sc create Kunde-Service binPath= "C:\Program Files\Microsoft Team Foundation Server 11.0\Tools\TfsBuildServiceHost.exe /NamedInstance:Kunde-Service" DisplayName= "Kunde-DisplayName"





2.為TFS設定環境變數。並利用cmd開啟TFS
輸入:set TFSBUILDSERVICEHOST.2012=[服務名稱]
例如:set TFSBUILDSERVICEHOST.2012=Kunde-Service
接著輸入:TfsMgmt.exe


3.註冊新的建置服務,同時設置Controller and Agent
注意:
Service Listener的Port要從9191改成9195才不會撞到

Working Directory:$(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath)
改成→$(SystemDrive)\Builds\$(BuildAgentId)\Kunde-Service$(BuildDefinitionPath)



完成


沒有留言:

張貼留言