[devel at bb.net] Tracking state of multiple latent workers

Povilas Kanapickas povilas at radix.lt
Mon Jun 1 19:27:59 UTC 2020


Hi Andrii,

On 6/1/20 8:56 AM, Andrii Senkovych wrote:
> Hi Buildbot users,
> 
> I'm looking for a way to run multiple latent workers that all depend
> on a single gateway and currently I'm looking for a way to start the
> gateway before any latent worker is provisioned and destroy it after
> all latent workers are stopped.
> 
> So far I have ended up using terraform to start and provision both
> gateway and worker in one run. However in order to use multiple
> workers I need to have some kind of state to know what workers have
> been started already and pass the list of workers to terraform (for
> example as environment variable) so when a list includes new names,
> workers are being created (the opposite is true: if the list misses
> some workers that previously existed, they should be destroyed).

There's a very similar concept already almost implemented called
Machine. A latent worker can have a Machine attached to it and it will
always try to wake the machine when starting up (if it's not already
started) and shutdown it when there are no latent workers that use the
machine.

I think this concept is very similar to your use case.

I have some code already written that suspends and wakes up a local
machine with many workers on demand so that it doesn't burn electricity
needlessly. I need to polish this code and do a pull request.

Regards,
Povilas

> --
> Best regards,
> Andrii Senkovych
> _______________________________________________
> devel mailing list
> devel at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/devel
> 


More information about the devel mailing list