Runbooks for Octopus workers?

Hi,

we need to run a recurring maintenance task on our Octopus workers. To me this sounds like a good fit for Runbooks, but looks like it isn’t supported? What I need is to “run this task on every worker in pool XYZ”. Am I missing something or is it really not possible?

Btw. I saw a team implementing this task within a custom health check script (which runs regularly on each worker), but I don’t like this approach and was hoping to find a cleaner solution.

Thanks for any suggestions,
Jakub

Hey Jakub,

What are you suggesting makes a lot of sense.

It’s not currently possible to model this as “run on all workers in a pool”. This was an option that didn’t make sense for deployments, but for meta-runbooks like you’re describing, it sure would be useful.

The best alternative I can think of is to add your workers also as deployment targets, and assign them a role (e.g. acme-worker). Then in your runbook you can set the step to run on all targets with role.

Thank you for the question. I think there’s a good chance in the future we will support this for workers.

P.S. The Octopus script console does support running on all workers in a pool, but you can’t schedule this.

Thank you for confirming Michael. The idea with adding workers also as deployment targets makes sense, unfortunately it would require bigger changes in our environment as the workers are somewhat dynamic ec2 instances that automatically connect to the right pool when they start up.

Can you actually add a single listening tentacle as both a worker and a deployment target at the same time? Or would we need to run two tentacle instances on those machines?

The same tentacle can be added as both a worker and a deployment target.

workers are somewhat dynamic ec2 instances that automatically connect to the right pool when they start up

Aah, I see. This would mean an extra complication to your dynamic registration/deregistration.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.