Code Monkey home page Code Monkey logo

soft-spot's Introduction

soft-spot

Build Status PyPI version

Do you have a soft spot for cheap cloud computing (a.k.a. AWS Spot instances)? Me too, no shame on that.

Crappy Logo

However, what is a shame is having to go through that clunky UI and click here and there to get one; soft-spot makes it dead easy to launch an instance:

How?

Just define a file with the specifications of the machine you want to launch:

[INSTANCE]
ami = ami-06d51e91cea0dac8d
type = t2.micro
security_group = SecurityGroupName
key_pair = some-key
spot_price = 0.005
availability_zone = us-west-2c

[VOLUME]
id = vol-00a56acb10f11b0e3
device = /dev/sdf

[ACCOUNT]
user = ubuntu
key_location = ~/.ssh/some-key.pem

[SCRIPT]
commands = ["sudo mkdir /data", "sudo mount /dev/xvdf /data", "sudo chown ubuntu /data"]

Then just execute the sspot request command:

sspot request <<instance_config_file>>

Other commands

cancel

Cancel all active spot requests and terminate the instances associated to them:

sspot cancel

price

Show the prices for the specified spot instance:

sspot price <<instance_config_file>>

Credentials

This script uses boto3 so I strongly recommend heading over to its documentation to learn more.

Alternatively, you could create a tiny configuration file like this:

[DEFAULT]
aws_access_key_id = an_acces_key
aws_secret_access_key = a_secret_key
region_name = us-west-2

And then pass it on to the spot command:

sspot -a ~/aws_credentials.txt request <<instance_config_file>> 

soft-spot's People

Contributors

fferegrino avatar

Watchers

 avatar  avatar  avatar

soft-spot's Issues

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.