开发者

Running multiple TeamCity Agents on the same computer?

开发者 https://www.devze.com 2022-12-12 14:31 出处:网络
We have several build m开发者_运维知识库achines, each running a single TeamCity build agent. Each machine is very strong, and we\'d like to run several build agents on the same machine.

We have several build m开发者_运维知识库achines, each running a single TeamCity build agent. Each machine is very strong, and we'd like to run several build agents on the same machine.

Is this possible, without using virtualization? Are there quality alternatives to TeamCity that support this?


Yes, it's possible:

Several agents can be installed on a single machine. They function as separate agents and TeamCity works with them as different agents, not utilizing the fact that they share the same machine. After installing one agent you can install additional one, providing the following conditions are met:

  • the agents are installed in the separate directories
  • they have distinctive work and temp directories
  • buildAgent.properties is configured to have different values for name and ownPort properties

Make sure, there are no build configurations that have absolute checkout directory specified (alternatively, make sure such build configurations have "clean checkout" option enabled and they cannot be run in parallel).

Under Windows, to install additional agents as services, modify [agent dir]\launcher\conf\wrapper.conf to change the properties to have distinct name within the computer:

  • wrapper.console.title
  • wrapper.ntservice.name
  • wrapper.ntservice.displayname
  • wrapper.ntservice.description


You could also take a look at this blog post for Step-by-step guide

http://handcraftsman.wordpress.com/2010/07/20/multiple-teamcity-build-agents-on-one-server/


The top answer is the correct method, but if you want to complete this more easily you can use the TeamCityAgent Chocolatey package and supply the agent name, the agent folder and the port as --params and it will handle setting up the config files as well as pulling in the required version of Java via the server-jre package.

The one caveat to this is you need to use --force on any installs after the first agent as Chocolatey doesn't currently understand installing the same application with a different configuration as a "new" installation.

You will also need to use --version 2.0.1-beta-05 since this is still in a testing phase, but should make it out of beta soon.

Full install example for a second agent: choco install teamcityagent --force -y --params 'serverUrl=http://teamcity.local:8111 agentName=AgentUno agentDir=C:\buildAgentUno ownPort=9091' --version 2.0.1-beta-05

0

精彩评论

暂无评论...
验证码 换一张
取 消