To save money, I would like a large number of agent machines to be stopped and started up only when needed. Better yet, a single VM should be copied and launched on demand.
I am using Google Cloud Platform.
I see the Kubernetes plugin, used in Jenkins X, as well as the VirtualBox Plugin, but I get the sense that Jenkins might not be designed for this.
What is the standard way, if any, to do this?
but I get the sense that Jenkins might not be designed for this
. Please explain why.
Because I find very little info on the Web about how to do it. If autostart were a standard approach, the documents about setting up the agent would include it as a basic case.
https://stackoverflow.com/questions/40050127/is-possible-for-jenkins-to-auto-start-and-stop-slave-nodes
Thank you. From the discussions online, it seems that the most usual way to use Jenkins is to keep a constant number of slave VMs running.
Perhaps Jenkins x provides a solution, but I have not tried. I hope that start with that the upcoming days. Did you already deploy Jenkins x?
I have not tried Jenkins X.
Also, this describes how to create ephemeral; agents in GCE https://cloud.google.com/solutions/using-jenkins-for-distributed-builds-on-compute-engine