Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 81 lines (61 sloc) 3.505 kb

Awsymandias

Description

Awsymandias is a library that helps you set up and tear down complicated AWS environments. In addition to offering a clean, fluent domain model for working with instances and groups of instances it allows you to persist role-to-instance-id mappings to SimpleDB, allowing you to manage your stack from multiple different machines. Eventually it will allow you to add arbitrary instance metadata and help you track instance running costs over time.

Example

# Give the stack a name, and describe its members.
stack = Awsymandias::EC2::ApplicationStack.define("test") do |s|
  s.instance :db,  :instance_type => "m1.large", ... 
  s.instance :app, :instance_type => "c1.xlarge", ... 
  s.volume :data, :volume_id => "vol-12345", :instance => :db, :unix_device => "/dev/sdj"
end

# Check if we're running by pulling stack description from SDB; if not, launch asynchronously.
stack.launch unless stack.launched? || stack.running? 
until stack.reload.running?
  sleep(5)
end

# Capistrano
task :test do
  set :db, stack.db.public_dns
  set :app, stack.app.public_dns
end

This should allow you to re-launch and deploy that AWS stack from any one of several different workstations.

Contributors

Brief Expository Sonnet

I met a hacker from an antique land
Who said: Two tall and heavy mounts of steel
Lie in a basement. Near them on a stand,
Recessed, a dark CRT lies, whose peel’d
Cracked shell of dullest beige, and blinkenlights,
Tell that its fact’ry well those old specs read
Which yet survive, inked on the lifeless thing,
The die that stamp’d them and the power that fed.
And on the burned-in screen these words appear:
“My name is Awsymandias, king of kings:
Look on my racks, ye Mighty, and despair!”
No bits at all remain. Not far away
A data center waits, its humming air
Host to a boundless cloud by th’hour to pay.

(Apologies to Shelley’s original. Diehards will please note that it scans and attempts to follow the original meter and rhyme scheme wherever possible.)

License

(The MIT License)

Copyright © 2009 Brian Guthrie (btguthrie@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.