在 EC2 上运行 Hudson
我计划使用 Ubuntu 映像在 Amazon EC2 上安装 Hudson。我要测试的代码没有很大的内存开销 - 我将主要执行 python 单元测试。
我应该使用哪个 EC2 实例?微型实例是否足够(有足够的内存)还是应该使用更大的实例?
I am planning to install Hudson on Amazon EC2 using Ubuntu image. The code I am going to test does not have a big memory overhead - I will be executing mainly python unit tests.
Which EC2 instance should I use? Would micro instance be sufficient (have enough memory) or should I use a bigger instance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Jenkins 本身很乐意在微型计算机上运行,但是有两个问题:1)您将没有太多内存用于构建和测试,大约 150MB,但更大的问题是 2)如果您的 CPU使用高峰持续超过几秒钟,亚马逊将通过限制 97% 或更多的可用 CPU 来简单地压垮您的实例。 http://gregsramblings.com/2011/02/07/amazon-ec2-micro-instance-cpu-steal/
节流对我们来说是完全不可能的,在 EC2 上进行测试构建需要 12 分钟,而在四核 i7 笔记本电脑上需要 25 秒。
但!有一个针对节俭的解决方案:
在微型计算机上运行 Jenkins master,但在需要运行实际测试时启动一个小型实例。这为我们提供了充足的内存和不错的 CPU,但它仍然非常便宜(每次推送 [或提交] 10 美分)。然而,它大大增加了构建时间,因为它必须启动实例等等。
设置相当复杂,需要解决 ec2 插件的一些限制(总体而言,该插件运行得非常好),因此如果您想这样做,我们写了一篇博客文章:http://wkmacura.tumblr.com/post/5416465911/jenkins-ec2
Jenkins itself will happily run on a micro, but there are two problems: 1) you won't have much memory left for building and testing, around 150MB, but the bigger problem is 2) if your CPU usage spikes for more than a few seconds Amazon will simply crush your instance with throttling cutting off 97% or more of available CPU. http://gregsramblings.com/2011/02/07/amazon-ec2-micro-instance-cpu-steal/
The throttling was completely impossible for us, making a build with testing take 12 minutes on EC2 instead of 25 seconds on a quad i7 laptop.
But! There's a fix for the frugal:
Run a Jenkins master on a micro, but start up a small instance when needed to run the actual tests. That gives us plenty of memory and decent CPU, yet it's still incredibly cheap (ten cents per push [or commit]). However, it substantially increases build time because it has to boot the instance and all that.
The setup is rather involved, and requires working around some limitations of the ec2 plugin (which, overall, works extremely well), so we wrote up a blog post if you want to do this: http://wkmacura.tumblr.com/post/5416465911/jenkins-ec2
我们在 EC2 上运行 hudson 并集成测试 Ruby/Rails。我们在微观实例上做得很好,我想你也会这么做。
We're running hudson on EC2 and integration testing Ruby/Rails. We're doing just fine on a micro instance as I think you will to.