为多个平台构建时如何使用 hudson

发布于 2024-08-06 17:30:31 字数 252 浏览 4 评论 0原文

目前我们正在为 Win32 平台构建一些 C++ 应用程序。我们很快就会移植到 Linux,甚至更多(32 位和 64 位)。

标准做法是什么,您是否使用多个 hudson 服务器,每个服务器在自己的平台上进行构建,还是 hudson 服务创建虚拟机并进行构建?

我不清楚执行此操作的最佳实用方法。

理想情况下,我只想要一个带有一堆运行 hudson 的虚拟机的盒子,然后它根据需要开始构建。

有人可以向我指出这方面的资源吗?

Right now we are building a number of C++ apps for Win32 platform. We will be soon porting to Linux and then maybe more (32 and 64 bits for both).

What is the standard practice , do you use multiple hudson servers each on their own platform to do a build, or does the hudson service create VMs and do builds?

It is not clear to me the best practical way to do this.

Ideally I just want one box with a bunch of VMs running hudson, and then it kicks off builds as needed.

Is there a resource someone can point me to for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

还给你自由 2024-08-13 17:30:31

我们使用 Hudson 来管理多个操作系统的 C/C++(GNU C、GNU C++、Watcom C)构建。对于我们来说,软件是针对 Linux、Linux x64、QNX 4 和 QNX6 构建的。我们的设置方式是:

  • 1 个用于 Hudson 服务器的虚拟机,运行 Windows
  • 4 x 虚拟机,每种从属类型各一个,因此我有 4 个 Hudson 从属设备 - 每个 1 个用于 QNX4、QNX6 以及 Linux 32 和 Linux 64。它们都在同一台服务器上运行,就像不同的虚拟机一样,我们没有遇到任何问题。我们构建了大约 100 个项目,几乎均等地分为 4 种系统类型。

您不需要任何额外的硬件。有一个 Hudson 插件可与 VMWare 虚拟机配合使用,可以根据需要启动和关闭它们。

我希望这有帮助。

We use Hudson to manage C/C++ (GNU C, GNU C++, Watcom C) builds for multiple OSs. For us, software is built for Linux, Linux x64, QNX 4, and QNX6. The way we have it set up is:

  • 1 x VM for the Hudson server, running Windows
  • 4 x VMs, one for each slave type, so I have 4 Hudson slaves - 1 each for QNX4, QNX6 and Linux 32 and Linux 64. All of them are running on the same server, just as different VMs, and we have faced no problems. We build about a 100 projects, divided almost equally between the 4 system types.

You should not require any additional hardware. There is a Hudson plugin that works with VMWare VMs, to start them up and shut them down as required.

I hope that helps.

幻梦 2024-08-13 17:30:31

我从未将 hudson 用于 C++,但对于您计划执行的操作,查看 VMWare 插件 并查看它是否能实现您想要的功能。如果可能的话,我建议只使用一个 Hudson master。您最可能想要做的是为每个目标环境设置一个带有 Hudson Slave 进程的 VMWare 机器映像,然后在该 Slave 中生成一个构建。

I've never used hudson for C++ but for what you are planning to do, it might make sense to look at the VMWare plugin and see if it will do what you want. I would recommend having only a single Hudson master if possible. What you most likely want to do is set up a VMWare machine image with a Hudson Slave process for each target environment then spawn a build in that Slave.

烙印 2024-08-13 17:30:31

一年多前,我曾在多平台场景中与 Hudson 一起玩过。我在某台机器上有一台 hudson 服务器(设置起来非常简单),并为每个平台单独构建从属服务器。我记得有一段时间,其中一个构建客户端位于托管 hudson 服务器的计算机上的 VirtualBox 中。 (我想我在虚拟机上也有服务器一段时间了。)我不记得这个设置有任何原则问题。

但是,如果您想在同一台物理机器上构建多个虚拟构建机器,我认为您需要一台非常强大的机器。 C++ 编译需要相当多的资源,IIRC,当 hudson 开始构建时,它会同时在所有平台上启动它。

I have played with hudson in a multiple platform scenario a bit more than a year ago. I had one hudson server (which was ridiculously easy to setup) on some machine and separate build slaves for each of the platforms. I remember that for a while one of the build clients was in a VirtualBox on the machine that hosted the hudson server. (I think I had the server on a VM for a while, too.) I cannot remember there being any principle problem with this setup.

However, if you want to have several virtual build machines building on the same physical machine I think you'd need a very powerful machine for that. C++ compilation takes quite an amount of resources and, IIRC, when hudson starts a build, it starts it on all platforms at the same time.

素食主义者 2024-08-13 17:30:31

请注意,运行 Hudson 的服务器与构建软件应用程序的从属计算机之间不需要有任何关系。由于 Java 的魔力,您可以使用 JNLP 将不同的从机连接到主机。 (一个例子)所以,无论它们是物理机还是虚拟机,你都可以让一个运行 Windows,另一个运行 Linux;一个 32 位,另一个 64 位;等等——无论您的应用程序需要什么。只要它们都安装了 JRE,它们就可以连接到 Hudson master 并报告构建的状态。

Note that there need not be any relation between the server that's running Hudson and the slave machines that are building your software apps. Due to the magic of Java, you can connect the disparate slave machines to the master using JNLP. (one example) So, whether they are physical or virtual machines, you can have one running Windows, another Linux; one 32-bit, another 64-bit; etc -- whatever your apps require. As long as they all have the JRE installed they can connect to the Hudson master and report the status of the builds.

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