投票:在虚拟机中构建服务器?

发布于 2024-07-13 05:38:33 字数 48 浏览 6 评论 0原文

在虚拟机中拥有构建服务器是否更好? 在虚拟机中拥有构建服务器的好处是否超过成本?

Is it better to have a Build Server in a virtual machine? Do the benefits of having a build server in a VM outweigh the costs?

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

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

发布评论

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

评论(5

§对你不离不弃 2024-07-20 05:38:33

以下是在虚拟环境中运行构建服务器的一些优点:

在多个构建服务器之间共享一个快速运行的盒子 - 假设您有六台构建服务器。 组装一台速度非常快(4 个 CPU、64-128GB 内存、速度非常快的硬盘等)的机器并在其上运行虚拟机管理程序。 现在,如果所有构建服务器正在进行构建而其他构建服务器不进行构建,则它们都可以访问这个更快的硬件。 制定构建计划,您应该能够更快地构建。 如果您必须使用物理设备,您可能无法在每个单独的构建服务器上负担得起这种质量水平的硬件 - 但在共享时更容易证明其合理性。

当机器出现故障时不会停机 - 只要出现硬件问题,您的生产构建就不会崩溃,您只需在另一台虚拟化主机上启动构建服务器即可。 (这仅在您使用共享存储时才有效。)

轻松硬件升级 - 当需要构建新服务器时,您无需重新安装任何烦人的操作系统。 只需将客户操作系统移至新的物理主机,您就可以开始比赛了。

Here's some of the advantages of running your build server in a virtual environment:

Share one screaming fast box across several build servers - say you've got half a dozen build servers. Put together one very fast (4-cpu, 64-128gb ram, very fast hard drives, etc) machine and run a hypervisor on it. Now, all of the build servers can access this faster hardware if they're doing builds when other build servers aren't. Establish a build schedule, and you should be able to do faster builds. If you have to use physical boxes, you probably won't be able to afford that quality level of hardware on each individual build server - but that's easier to justify when it's shared.

No downtime when the box fails - instead of your production builds coming to a crashing halt whenever there's a hardware problem, you can simply boot up the build server on another virtualization host. (This only works well if you're using shared storage.)

Easy hardware upgrades - when it's time for a new build server, you don't have to do any pesky OS reinstalls. Just move the guest OS over to the new physical host, and you're off to the races.

心如荒岛 2024-07-20 05:38:33

与往常一样,这取决于...

假设您有其他虚拟机在同一台服务器上运行,并且这些其他虚拟机可以处理由正在运行的构建引起的偶尔的速度下降,那么我会说是的。 但是,如果您要在单个主机上托管单个构建服务器虚拟机,或者如果其他虚拟机将受到偶尔构建运行的负面影响,那么就不行。

我可以告诉你,在我工作的地方,我们已经转而在 VMWare 上托管大部分构建服务器。 由于我们每周运行 5 个以上产品线的多次构建,因此将它们全部托管在一台快速机器上是有意义的。 我们还将大部分测试机器托管在同一台服务器上,这使我们能够充分利用机器,并且由于机器上没有运行生产服务器,因此构建期间发生的速度下降不是问题。

As always, it depends...

Assuming that you have other VM's running on the same server, and those other VM's can handle the occasional slowdowns caused by a running build, then I would say yes. But if you are going to host a single build server VM on a single host, or if the other VM's will be negatively impacted by the occasional build running, then no.

I can tell you that where I work, we have switched to hosting most of our build servers on VMWare. Since we run several builds a week of 5+ product lines it makes sense for us to host them all on one fast machine. We also host a large portion of our testing machines on the same server, which allows us to put the machine to good use, and since there are no production servers running on it, the slowdowns that occur during builds is not an issue.

梦回梦里 2024-07-20 05:38:33

构建服务器需要以非常一致的方式构建。 您需要有一个有据可查且完全可重复的配方来制作构建服务器。

然而,构建服务器并不是对性能至关重要……或者至少,它们对生产系统的性能并不重要,因此您可以在虚拟机中拥有一个。

如果您需要独立于硬件和软件兼容性,那么使用虚拟机实际上是一个好主意。 您的首选硬件供应商可能会停止在其新计算机中支持您的构建服务器所需的操作系统版本,那么您的旧构建服务器的保修可能会过期。 这使您可能无法在该操作系统中进行构建。

然后,您将面临要么在 eBay 上寻找二手替换品,要么购买供应商的过时套件库存,要么进行一些不可靠的不受支持的软件黑客攻击。 (注意:这几乎发生在我们身上,我们做了一些这样的事情)

A build server is something which needs to be built in a very consistent way. You need to have a well documented and thoroughly reproducible recipe for making your build server.

However, build-servers aren't massively performance-critical ... or at least, they're not critical to the performance of your production system, so you could have one in a VM.

Using VMs is actually quite a good idea if you need to be independent of hardware and software compatibility. Your preferred hardware vendor may stop supporting your required OS version for your build server in their new machines, then your warranty may expire on your old build server. This leaves you potentially unable to do builds in that OS.

You'd then be faced with either trawling ebay for a 2nd hand replacement, buying up your vendor's stock of obsolete kit, or doing some dodgy unsupported software hack. (NB: this almost happened to us, and we did a bit of some of these)

予囚 2024-07-20 05:38:33

我没有看到任何好处,除非你的虚拟机位于某个虚拟服务器上。

I don't see any benefit, unless your VM is on some box which is a virtual server.

☆獨立☆ 2024-07-20 05:38:33

将 VM 用于构建服务器的优点和缺点与将 VM 用于任何其他服务的优点和缺点相同。

这个问题同样适用于使用虚拟机作为邮件服务器/维基服务器等。

(我刚刚将其作为评论发布,但还没有代表)

The pros and cons of using a VM for your build server are the same as using a VM for any other service.

This question is just as applicable to using a VM for a mail server / wiki server etc.

(I would have just posted this as a comment but don't have the rep yet)

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