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

Please add support for Stopping and Starting a Spot Fleet EC2 instance #362

Open
artoka opened this issue Apr 11, 2023 · 0 comments
Open

Comments

@artoka
Copy link

artoka commented Apr 11, 2023

In 2020, support for Stopping and Starting a Spot Fleet EC2 instance was added:
https://aws.amazon.com/about-aws/whats-new/2020/01/amazon-ec2-spot-instances-stopped-started-similar-to-on-demand-instances/

The ec2-fleet-plugin, however does not support this feature, but instead will Terminate the allocated spot instances once the Jenkins Job has been completed.

The problem is that:

  1. The AMI I need for building the Job is very fat. Both because of Windows, and because we need to load it with a multitude of Tools to build our project. So I am dealing with an Ami with size of 120gb currently. This makes the deployment of an instance from a Spot Fleet slow.
  2. We need to have some persistent data to build the project efficiently. Currently we attach/detach an EC2 Volume with script as needed.

Having the support for Start/Stop the spot instance would greatly simplify both.

  1. The instances would not need to be deployed, instead just started. (Faster start of Job)
  2. The persistent data could just be stored in the Instance disk. (No attach/detach script needed)

The behavior I am looking for is:

  1. If an Ec2 Spot Fleet instance is no longer needed (after the specified timeout), it is not terminated, but is instead Stopped
  2. If an Ec2 Spot Fleet instance is needed by a Jenkins Job, first check if a Stopped instance if available, and restart that.
  3. Fallback to normal Ec2 Spot Fleet provisioning

Would such a feature be possible to add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants