On Mon, Dec 9, 2024 at 8:25 AM Alex Earl <slide.o....@gmail.com> wrote:

> when it takes more than a few seconds to launch an agent (which is
> expected), I see several agents being created by Jenkins for a single task
>

Offhand it sounds like you are not using
https://javadoc.jenkins.io/hudson/slaves/Cloud.CloudState.html#getAdditionalPlannedCapacity()
correctly, or otherwise misimplementing
https://javadoc.jenkins.io/hudson/slaves/Cloud.html#provision(hudson.slaves.Cloud.CloudState,int)
to provision more nodes than are actually being requested.

I had somebody else asking recently about implementing `Cloud`. It is not
trivial. Would be nice to start with a known-good implementation (say, that
in `kubernetes`) and create a plugin which lets you as the admin define CLI
commands to provision or destroy agent infrastructure, with some
environment variables being used to define the agent name etc. (There is
https://plugins.jenkins.io/scripted-cloud-plugin/ but it is way out of
date.) As an alternative to running processes on the controller account, it
could support launching Docker or Kubernetes containers.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1Dejd_QZ4Fc28HPS5Zhc%2BZXnud1XAqjVoBDtrg%3DN9xww%40mail.gmail.com.

Reply via email to