在同一台计算机上运行多个 TeamCity Agent?
我们有几台构建机器,每台都运行一个 TeamCity 构建代理。每台机器都非常强大,我们希望在同一台机器上运行多个构建代理。
不使用虚拟化这可能吗?是否有 TeamCity 的优质替代品可以支持这一点?
We have several build machines, 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,这是可能的:
一台机器上可以安装多个代理。它们作为单独的代理运行,而 TeamCity 作为不同的代理与它们一起工作,而不是利用它们共享同一台计算机的事实。
安装一个代理后,您可以安装另外一个代理,前提是满足以下条件:
确保有没有指定绝对签出目录的构建配置(或者,确保此类构建配置启用了“干净签出”选项,并且它们不能并行运行)。
在 Windows 下,要将其他代理安装为服务,请修改 [agent dir]\launcher\conf\wrapper.conf
在计算机内具有不同的
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:
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:
您还可以查看此博客文章的分步指南
http://handcraftsman.wordpress.com/2010/07/20/multiple-teamcity-build-agents-on-one-server/
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/
最佳答案是正确的方法,但如果您想更轻松地完成此操作,您可以使用 TeamCityAgent Chocolatey 包 并提供代理名称、代理文件夹和端口作为
--params
,它将处理设置配置文件以及通过服务器拉入所需的 Java 版本-jre
包。需要注意的是,您需要在第一个代理之后的任何安装中使用
--force
,因为 Chocolatey 目前无法将使用不同配置安装相同的应用程序理解为“新”安装。您还需要使用
--version 2.0.1-beta-05
因为这仍处于测试阶段,但应该很快就会脱离测试阶段。第二个代理的完整安装示例:
choco install teamcityagent --force -y --params 'serverUrl=http://teamcity.local:8111 agentName=AgentUno agentDir=C:\buildAgentUno ownPort=9091' --version 2.0.1-beta-05< /代码>
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 theserver-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