Sha256: 3f671f052882de176018ed9622473e0c4fbd430a8a5ed8298770195777d4fa44

Contents?: true

Size: 1.6 KB

Versions: 1

Compression:

Stored size: 1.6 KB

Contents

= ec2_tools

Ec2Tools is a Ruby library for Amazon EC2

== Getting started
write config file in <tt>config/amazon_ec2.yml</tt> or <tt>.account.yml</tt>

 key: YOUR_ACCESS_KEY_ID
 secret: YOUR_SECRET_ACCESS_KEY
 server: YOUR_EC2_REGION

and create instance 
 Ec2Tools.new

OR specify config file when create instance
 Ec2Tools.new('config.yml')

== Usage
This gem is useful for the case like this

in config/deploy.rb, 

old

  role :db, 'ec2-111-111-111-111.amazonaws.com'
  role :web, 'ec2-111-111-111-111.amazonaws.com', 'ec2-111-111-111-112.amazonaws.com', 'ec2-111-111-111-113.amazonaws.com', 'ec2-111-111-111-114.amazonaws.com',  ....

new

 Ec2Tools.new.servers[:web].map(&:dnsName).each_with_index do |host, idx|
   role :db, host, :primary => true if idx == 0
   role :app, host
   role :web, host
 end

You don't need to do maintenance deploy.rb any longer!



== Contributing to ec2_tools
 
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

Copyright (c) 2011 Yamada Masaki. See LICENSE.txt for
further details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ec2_tools-0.3.3 README.rdoc