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

Support stop GCE instance instead of Termination #35

Open
rachely3n opened this issue Mar 1, 2019 · 8 comments
Open

Support stop GCE instance instead of Termination #35

rachely3n opened this issue Mar 1, 2019 · 8 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@rachely3n
Copy link
Contributor

As requested here

"Currently the google-compute-engine-plugin creates jenkins node and terminates them if idle. Instead of terminate, it's better to support stop the instance when idle."

@rachely3n rachely3n self-assigned this Mar 1, 2019
@craigdbarber craigdbarber added the duplicate This issue or pull request already exists label Apr 16, 2019
@craigdbarber
Copy link
Contributor

This issue will be resolved once we migrate to using managed instance groups: #78

@rachely3n
Copy link
Contributor Author

Not sure this will be solved by instance groups. Feature requested is something EC2 has here: https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/EC2RetentionStrategy.java

@craigdbarber
Copy link
Contributor

Moving to InstanceGroups would allow us to remove the manual management of nodes and delegate that to the IGs. Happy to discuss further offline if you'd like.

@AndreasKarg
Copy link

Since #78 has been closed as "won't fix", is there any chance that support for GCE stop instead of termination might get picked up again? It would be super useful for my team & myself.

@stevefortier
Copy link

+1 for this to be reconsidered. It would avoid lots of lengthy rebuilds from scratch.

@donmccasland donmccasland reopened this Nov 30, 2020
@donmccasland
Copy link
Collaborator

This is worth looking into. I've read through the instance groups discussion and agree that doing that work would require a tremendous amount of rewriting, but just stopping the instance and keeping it available for starting up again would be very nice.

@akbertram
Copy link

Plus one for this. We recently migrated away from this plugin to using a mess of shell scripts to achieve this behavior. The improvements in build time are significant.

Here is the solution I came up with:
https://gist.github.com/akbertram/a1cf68983cf1f88d25c9e685f639761b

@craigdbarber I'd be happy to try to add this logic to the plugin if someone can point me in the right direction.

@pezhovski
Copy link

I agree, it would be a great feature to have. We are using builders to make builds on Unreal Engine, and it is tricky to configure all caches to persist after termination. But we also would like to have the ability to stop the instance when we are not using it (nighttime, weekends).

@akbertram Thank you for sharing your config to work around this limitation.
If I were to start working on this task, I assume I would begin from here or here to handle instance termination/stop

And I think this class is responsible for provisioning, so I would start looking into this one if I wanted to start existing instances instead of launching new.

I also would think of one extra option: what part of instances I want to remain persistent.
For example, I had high demand that happens once in a month and plugin provisioned 8 instances, but usually I need only 3, and now I don't have any builds queued should plugin stop all instances or just certain percent? I believe this should be configurable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

7 participants