Created
June 10, 2009 03:11
-
-
Save bguthrie/126990 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Give the stack a name, and describe its members. | |
stack = Awsymandias::EC2::ApplicationStack.new("test") do |s| | |
s.role "db", :instance_type => "m1.large", ... | |
s.role "app", :instance_type => "c1.xlarge", ... | |
end | |
# Check if we're running by pulling stack description from SDB; if not, launch asynchronously. | |
stack.launch unless stack.running? | |
until stack.running? | |
sleep(5) | |
end | |
# Capistrano | |
task :test do | |
set :db, stack.db.public_dns | |
set :app, stack.app.public_dns | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment