在同一台计算机上运行多个 TeamCity Agent?

发布于 2024-08-12 09:47:20 字数 134 浏览 3 评论 0原文

我们有几台构建机器,每台都运行一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦忆晨望 2024-08-19 09:47:20

是的,这是可能的

一台机器上可以安装多个代理。它们作为单独的代理运行,而 TeamCity 作为不同的代理与它们一起工作,而不是利用它们共享同一台计算机的事实。
安装一个代理后,您可以安装另外一个代理,前提是满足以下条件:

  • 代理安装在单独的目录中
  • 它们具有独特的工作目录和临时目录
  • buildAgent.properties 配置为具有不同的 name 和 ownPort 属性值

确保有没有指定绝对签出目录的构建配置(或者,确保此类构建配置启用了“干净签出”选项,并且它们不能并行运行)。

在 Windows 下,要将其他代理安装为服务,请修改 [agent dir]\launcher\conf\wrapper.conf
在计算机内具有不同的

  • wrapper.console.titlewrapper.ntservice.namewrapper.ntservice.displaynamewrapper.ntservice.description
  • 将属性更改为
  • 名称

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
从﹋此江山别 2024-08-19 09:47:20

最佳答案是正确的方法,但如果您想更轻松地完成此操作,您可以使用 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 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文