loft-sh / devpod-provider-aws

DevPod on AWS
Mozilla Public License 2.0
13 stars 8 forks source link

Feature: Run DevPod on Spot Instances #12

Closed theurichde closed 3 months ago

theurichde commented 1 year ago

Hi folks! First, thank you for this nice provider 🚀

I was wondering why one should not run a devpod machine on an AWS spot instance. This would save some extra money 😅

I already started working on that, the spot instance is already created and working. Proper stopping and spot request handling needs to be implemented.

I am creating this issue to gather overall feedback on that idea. Is that something that you would like to see in the provider? If so, I would provide the necessary implementation.

Cheers!

FabianKramm commented 1 year ago

Hey @theurichde, thanks for creating this issue! Yeah thats a cool idea, we would be happy to review a PR for that!

alexandradragodan commented 1 year ago

Hey, Tim! Thanks for the suggestion.

Are you still working on this issue(or planning to)? Please let us know if there's anything we can support you with!

Thanks.

theurichde commented 1 year ago

Hey there 👋🏻

Yeah, I worked on that topic already, and I will continue when my time allows it 😅

I did some quite opinionated changes which we can discuss

You can compare the changes here if you like

seanpoulter commented 7 months ago

I'm interested too. How can I help?

pan93412 commented 4 months ago

Hello! I have implemented the Spot instance support. It works well in my short-term test. However, as I'm unsure if AWS exhibits any different behaviors for Spot instances, I hope someone can help me test if it is functioning correctly.

To use this, you can configure a custom provider with the URL: https://github.com/pan93412/devpod-provider-aws/releases/download/0.3.0/provider.yaml

CleanShot 2024-06-07 at 14 43 17@2x

Remember to enable the "Aws Use Spot Instance" option to ensure you are starting a Spot instance (it is not enabled by default):

CleanShot 2024-06-07 at 14 44 02@2x

algoORgoal commented 3 months ago

@pan93412 Thanks for the feature :)) I'd like to use your custom provider for now, since official devpod doesn't offer spot VM option yet. Are you using that one in your daily dev environment? Is it working okay?

pan93412 commented 3 months ago

@pan93412

Thanks for the feature :))

I'd like to use your custom provider for now, since official devpod doesn't offer spot VM option yet. Are you using that one in your daily dev environment? Is it working okay?

Hello 👋

I was used it for my daily development environment. It was great with only a few bugs. However, I bought my new development device later, so I do not use DevPod anymore 🥺

algoORgoal commented 3 months ago

@pan93412 Thanks for your response! I attempted to run aws with your setup. However, it seems like 2 instances are created when I chose m7g.xlarge as instance type. Did you go through the same thing? If so, can I just terminate the other instance(c5.xlarge)? image

pan93412 commented 3 months ago

@pan93412 Thanks for your response! I attempted to run aws with your setup. However, it seems like 2 instances are created when I chose m7g.xlarge as instance type. Did you go through the same thing? If so, can I just terminate the other instance(c5.xlarge)? image

Not sure why c5.xlarge starts as no code declared it.