jenkins与关键应用程序位于同一虚拟机上,这是否明智? [英] jenkins on the same virtual machine as critical application, is it wise?

查看:135
本文介绍了jenkins与关键应用程序位于同一虚拟机上,这是否明智?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Jenkins来自动化属于在同一服务器上的tomcat上运行的Web应用程序的任务.

I want to use Jenkins to automate tasks belonging to a web application running on tomcat on the same server.

由于应用程序非常重要,因此在同一虚拟机上安装Jenkins是否明智? 同一虚拟机上将有2个JVM运行,这可能在内存,CPU,稳定性等方面存在问题吗?

As the application is quite critical, is it wise to install Jenkins on the same Virtual machine? There will be 2 JVM running on the same Virtual Machine, could be a problem in term of memory,cpu, stability etc?

我应该特别注意一些事情,还是最好在其他虚拟服务器上安装Jenkins?

Should I take care of something in particular or it would be better to install Jenkins on another Virtual Server?

推荐答案

由于应用程序非常重要,因此在同一虚拟机上安装Jenkins是否明智?

As the application is quite critical, is it wise to install Jenkins on the same Virtual machine?

不,这是不明智的.如果您已经在虚拟环境中,请为Jenkins创建一个新的VM(但至少将其分开,例如,在两个不同的Docker容器中运行prod和jenkins).为什么在性能上不明智呢?如果不走运,您的测试甚至可能使VM崩溃.或者他们可以吞噬您的资源(文件锁,网络端口等).如果您未正确设置生产代码(例如,将其部署到产品所在的文件夹中),Jenkins可能会覆盖您的生产代码.

No, it's not wise. If you are already in a virtualized environment, create a new VM for Jenkins (but at least separate it, e.g., run your prod and jenkins in two different docker containers). Why is it not wise apart from performance? Your tests may even crash the VM if you are unlucky. Or they can eat away your resources (file locks, network ports, etc.). Or Jenkins can overwrite your productive code if you did not set it up properly (e.g., deploys into the same folder where your prod is).

同一虚拟机上将运行2个JVM,就内存,CPU,稳定性等而言可能是个问题吗?

There will be 2 JVM running on the same Virtual Machine, could be a problem in term of memory,cpu, stability etc?

当然这将是一个性能问题,但这不是由于2个JVM,而是由于测试本身(如果您有一个包含大量测试的更大项目,则很可能会牺牲性能).

Of course it will be a performance problem, but not because of the 2 JVMs, but because of the tests themselves (if you have a bigger project with a lot of tests, that eats performance away most probably).

我应该特别注意一些事情,还是最好在其他虚拟服务器上安装Jenkins?

Should I take care of something in particular or it would be better to install Jenkins on another Virtual Server?

只需在另一个VM中运行它即可;甚至比另一台物理机器更好(如果您位于托管环境中,例如AWS,则忽略最后一点).

Just run it in another VM; even better another physical machine (if you are in a hosted environment e.g., AWS, then disregard the last point).

添加关键信息它将取代cron"

adding crucial information "it will just replace cron"

是的,在这种情况下应该可以. Jenkins本身并没有使用太多资源(否则,它对于构建服务器/ scheduler 来说将无法很好地使用),并且对于其他JVM的担忧:我已经看到了许多生产环境,有数十个并行运行的JVM.一切都取决于个人情况:这些生产工作在做什么? (繁重的I/O?繁重的网络?只是偶尔听取服务于REST资源?从虚假地收集来自以太的随机性?)再说一遍:您对VM和运行它的硬件有何规格?非常复杂的问题,具体取决于:

Yeah, in this case it should be OK. Jenkins itself does not use too many resources (otherwise it wouldn't be as well usable for a build server/scheduler), and about the worries for the additional JVM: I have seen many production environments where there are dozens of JVMs running in parallel. It all comes down to the individual scenarious: what are these production stuff doing? (Heavy I/O? Heavy networking? Just listening for occasinally serving a REST resource? Idly collecting randomness from the ether?) And again: what are your specs for the VM and the hardware on which it is running... this is a very complex question, which depends on:

  • 软件/服务

  • the software/service

操作系统(是的,这与Ubuntu,RedHat,SUSE等无关紧要)

the OS (yes, it does matter whether it's Ubuntu, RedHat, SUSE, etc.)

VM参数(它有多少个VCPU?多少个VRAM?是基于KVM还是VMWare,还有其他东西?)

the VM parameters (how much VCPUs does it have? How much VRAM? Is it KVM based or VMWare, something else?)

下面的硬件(足够狡猾吗?您的过度/不足配置比率是多少?您的网络会承受负载吗?)

the hardware underneath (is it crafty enough? What are your over/underprovisioning ratios? Does your network bear the load?)

所有部门(Infra,DevOps,SE等)必须一起工作是一个问题.

It's a question where all departments (Infra, DevOps, SE, etc.) has to work together.

这篇关于jenkins与关键应用程序位于同一虚拟机上,这是否明智?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆