Coming "from" TFS and using TeamCity in a customer project....
...is there a way to install multiple agent instances on one computer? I could easily do that with TFS.
The reason is that we have build scripts that are linear in execution for some (large) part and take a significant amount of time. Basically with a a modern server (4, 6, 8, 12 cores) there is nothing stopping the server from actually efficiently running multiple builds AT THE SAME TIME - except there seems to be no way to install multiple agent instances on one machine.
Yes it is possible (I also have 2 agents installed on one machine) see TeamCity docs:
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 \launcher\conf\wrapper.conf to change:
- wrapper.console.title,
- wrapper.ntservice.name
- wrapper.ntservice.displayname
- wrapper.ntservice.description
properties to have distinct name within the computer.
More resources: