Giter VIP home page Giter VIP logo

ec2-spotter's Introduction

AWS Persistant Spot Intance

Forked from https://github.com/atramos/ec2-spotter

EC2 spot instances behave much like regular instances, but are cheaper. Normally, they can only be inited from an AMI image, not EBS volume, resetting any changes made along the way. This script enables you to continue with your Spot instance where you left off.

Refer to this medium post for information on how to set this up: https://medium.com/slavv/learning-machine-learning-on-the-cheap-persistent-aws-spot-instances-668e7294b6d8

Usage

$ ./ec2spotter-launch testing.conf
Launching instance type: m5.large
Spot request id: sir-defghijk

or

$ ./ec2spotter-launch testing.conf p3.2xlarge
Launching instance type: p3.2xlarge
Spot request id: sir-defghijk
# save ip address to xeon
aws ec2 describe-instances --instance-ids $instance_id --filter Name=instance-state-name,Values=running --query "Reservations[*].Instances[*].PublicIpAddress" --output=text | xargs -I{} echo {} | tr -d '\n' | xargs -d' ' -I _ echo '{"value": "_"}' | http PATCH https://xeon.santoshsrinivas.com/api/kvs/PJ4JS2xitWZ9DnsMo

ec2=$(http "https://xeon.santoshsrinivas.com/api/kvs/PJ4JS2xitWZ9DnsMo" | jq '.data.value')
ec2=$(echo $ec2 | tr -d '"')

echo $ec2

# Remember to [How to disable strict host key checking in ssh? - Ask Ubuntu](https://askubuntu.com/questions/87449/how-to-disable-strict-host-key-checking-in-ssh)

ssh -i ~/.ssh/aws-key-fast-ai.pem ubuntu@$ec2

ec2-spotter's People

Contributors

atramos avatar daanzu avatar mypad79 avatar philkuz avatar pndiku avatar refacktor avatar santoshsrinivas79 avatar sidujjain avatar slavivanov avatar zarak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.