在谷歌计算引擎上动态部署Jenkins奴隶以进行github提交 [英] Dynamically deploying Jenkins slaves on google compute engine for github commits

查看:134
本文介绍了在谷歌计算引擎上动态部署Jenkins奴隶以进行github提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个整合的问题:



我想在Google Compute Engine上运行Jenkins。我可以做到这一点,但如果我随时离开一台8核虚拟机,我会很快打破我的预算。作为一种解决方案,我认为我可以在开启内存少量的情况下留下一个微型实例,并作为jenkins大师随时运行。看起来我应该可以配置github来启动一个jenkins slave(8核),只要执行一次推送。如何将github提交后挂钩连接到Google Compute Engine以实现此目的?一个完整的答案可能要求太多,但即使只是指向相关文档也是有帮助的。

或者,您将如何解决我的问题?

解决方案

我最终使用了一个每隔几分钟自动重新启动的可抢占实例。我必须设置实例管理器才能执行此重新启动,而且我必须使用该API,因为这是对这些功能的一种高级和特殊用法。


This is a question of integration:

I would like to run Jenkins on Google Compute Engine. I can do this, but I will quickly break my budget if I leave an 8-core virtual machine running at all times. As a solution, I think I can leave a micro instance with a low amount of memory powered on and acting as the jenkins master running at all times. It seems that I should be able to configure github to startup a jenkins slave (with 8 cores) whenever a push is performed. How do I connect github post-commit hooks to Google Compute Engine to achieve this? A complete answer is probably asking too much, but even just pointers to the relevant documentation would be helpful.

Alternatively, how would you solve my problem?

解决方案

I ended up using a preemptible instance that automatically gets restarted every few minutes. I had to setup the instance manager to perform this restart, and I had to use the API, since this is a bit of an advanced and peculiar use of the features.

这篇关于在谷歌计算引擎上动态部署Jenkins奴隶以进行github提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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