Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

autognosis

Description

autognosis is a tool which processes when EC2 Spot Instance is terminated compulsorily.

Server Installation

shell> sudo rpm -ihv cronexec.rpm describe-spot-price-history.rpm
shell> sudo yum install memcached libmemcached
shell> sudo rpm -ihv autognosis-server-X.X.X-X.rpm

shell> sudo vi /etc/sysconfig/autognosis-server
# (define environments...)
#AWS_ACCESS_KEY_ID=...
#AWS_SECRET_ACCESS_KEY=...

shell> sudo initctl start autognosis-server
shell> memdump -s 127.0.0.1 # check of starting of a server

Client Installation

local> # launch a spot instance with user-data
local> ec2-request-spot-instances -d '{"maxPrice":0.3}' -p 0.3 -t c1.xlarge ami-4e6cd34f -k ...
...
shell> sudo rpm -ihv cronexec.rpm jq.rpm
shell> sudo yum install curl libmemcached
shell> sudo rpm -ihv autognosis-X.X.X-X.rpm

shell> sudo vi /etc/sysconfig/autognosis
# (define environments...)
#MAX_PRICE=...
#ON_TERMINATE=...
#PRODUCT_DESCRIPTION=...
#MEMCACHED_SERVERS=<autognosis server host>

shell> sudo initctl start autognosis
...
# If the current price exceeds the max price...
# shell> sudo tail /var/log/messages
# Jan 26 14:55:15 ip-10-148-74-46 autognosis: processing when terminating

It seems that there is a margin for about 1 minute after a price goes up before terminating...probably...

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.