Dynamic deployment of Jenkins subordinates on Google compute engine for github commits

This is an integration issue:

I would like to run Jenkins in the Google Compute Engine. I can do this, but I’ll quickly cut my budget if I have an 8-core virtual machine running anytime. As a solution, I think that I can leave a micro-instance with a low amount of memory and work as a jenkins wizard that works anytime. It seems that I should be able to configure github to start the jenkins slave (with 8 cores) whenever the click is executed. How to connect github post-commit hooks to Google Compute Engine for this? The full answer is likely to require too much, but even pointing to the appropriate documentation will be helpful.

Alternatively, how would you solve my problem?

+7
github jenkins google-compute-engine
source share
2 answers

In the end, I used a use-case instance that automatically restarts every few minutes. I had to configure the instance manager to perform this restart, and I had to use the API, as this is a slightly advanced and peculiar use of functions.

0
source share

You can run an instance of AppEngine and use the URL that it provides as the target of your GitHub on-commit web hook. Thus, you will not be written off unless the instance is started, which may even be cheaper than running a 24x7 micro-instance on a computing engine.

Then you can start / stop instances on the Compute Engine or run actions on them from your code running in App Engine.

Here's a question related to one that answers the question of how to authenticate the Compute Engine from code running in AppEngine.

+2
source share

All Articles