Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octopus Worker Scaler #3808

Open
Eldarrin opened this issue Nov 2, 2022 · 13 comments
Open

Octopus Worker Scaler #3808

Eldarrin opened this issue Nov 2, 2022 · 13 comments
Assignees
Labels
scaler stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@Eldarrin
Copy link
Contributor

Eldarrin commented Nov 2, 2022

Proposal

A docker container running an Octopus Tentacle which can be scaled according to queue requirements; focusing on using kubernetes to scale Octopus Workers

Scaler Source

Octopus Task Queue length

Scaling Mechanics

Queue Length > metric initiate a new worker in a pool

Authentication Source

Octopus API Key

Anything else?

Happy to write it if it gets enough appreciation. :)

@tomkerkhove
Copy link
Member

Do you have a URL to that product? Never heard of it, but thanks for the suggestion!

Are you interested in contributing it?

@Eldarrin
Copy link
Contributor Author

Eldarrin commented Nov 2, 2022

Sure: https://octopus.com/

its used a lot in regulated industries as it has very good audit logs for deployments. I've been playing with it at my current contract and they don't really get scaling and I thought it'd be a good fit.

I'm happy to write the initial code and test; as long as someone reviews my dirty hack skills :D

@stale
Copy link

stale bot commented Jan 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jan 1, 2023
@JorTurFer JorTurFer added stale-bot-ignore All issues that should not be automatically closed by our stale bot and removed stale All issues that are marked as stale due to inactivity labels Jan 1, 2023
@tomkerkhove tomkerkhove moved this from Proposed to To Do in Roadmap - KEDA Core Jan 23, 2023
@tomkerkhove
Copy link
Member

@Eldarrin Are you still interested in contributing?

@Eldarrin
Copy link
Contributor Author

Picking this up again :)

@tomkerkhove tomkerkhove moved this from To Do to In Progress in Roadmap - KEDA Core Apr 13, 2023
@Eldarrin
Copy link
Contributor Author

Eldarrin commented May 23, 2023

@JorTurFer @tomkerkhove I have an interesting issue here which I suspect you have hit before.

The worker will come up with the scaler as decided by the queue length, but the worker may or may not be actually executing a task as that may be a different worker. Is there a simple way already in KEDA for detecting the running vs executing state (ready/live probe etc).

Any thoughts? I'm actually thinking about the same for the azure pipeline scalers as they exhibit the same behaviours.

Basically I don't want to SIGTERM an executing process

@JorTurFer
Copy link
Member

JorTurFer commented May 23, 2023

@JorTurFer @tomkerkhove I have an interesting issue here which I suspect you have hit before.

The worker will come up with the scaler as decided by the queue length, but the worker may or may not be actually executing a task as that may be a different worker. Is there a simple way already in KEDA for detecting the running vs executing state (ready/live probe etc).

Any thoughts? I'm actually thinking about the same for the azure pipeline scalers as they exhibit the same behaviours.

Basically I don't want to SIGTERM an executing process

It's an excellent point, but I think that we should follow the same approach here as we follow in Azure Pipelines or GH Actions scalers: The scaler should be used with ScaledJob to ensure that an active worker isn't killed.

KEDA shouldn't know anything from the scaled workload because KEDA doesn't manage them. Apart from that design perspective, KEDA can't decide which instance is removed because KEDA exposes the metric, and it's the k8s control plane who decides the killed instances

@Eldarrin
Copy link
Contributor Author

Ok, linking the octopus issue. OctopusDeploy/OctopusTentacle#458

Not sure what to do till I get that resolved.

@JorTurFer
Copy link
Member

JorTurFer commented May 23, 2023

Maybe using lifecycle you can improve the things https://keda.sh/docs/2.10/concepts/scaling-deployments/#leverage-the-container-lifecycle
I mean, if you add some stop command(to "drain" the tentacle) with a huge timeout, maybe you can solve or mitigate the issue

@Exnadella
Copy link

Hi @tomkerkhove @JorTurFer

I am using the octopus deploy and would like to auto-scale the tentacle based on the KEDA and I am interested in testing this. I am using OCI-OKE cluster and tentacle is deployed, but the workers are inactive and interested to get this up and running and use KEDA to scale the workers inside the workerpool.

@JorTurFer
Copy link
Member

@Eldarrin , are you still interested in contribute with this?
If not, maybe @Exnadella can helps with it

@Eldarrin
Copy link
Contributor Author

@JorTurFer @Exnadella The problem still exists that the scaler can kill itself without warning (possibly mid job). There is a bit of a dirty hack that's possible is you have a kill blocker that detects ps ax | grep calamari but nothing neat. I have raised it with Octopus but haven't seen anything on their roadmap to run tentacles as jobs.

@JorTurFer
Copy link
Member

Thanks for the update ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scaler stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
Status: In Progress
Development

No branches or pull requests

4 participants