Another RightScale Ruby interface gem
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec
.gitignore
COPYING
README.rdoc
Rakefile
rightstuff.gemspec

README.rdoc

rightstuff - Another Ruby Interface for RightScale

Here is a typical example:

require 'rubygems' if RUBY_VERSION < '1.9'
require 'rightstuff'

include Rightstuff::Credentials

rs = Rightstuff::Client.new( rightscale_data[ :main ][ :credentials ] )
servers = rs.servers
servers.each{ |server| puts server.private_ip_address }

server_arrays = rs.server_arrays
servers.each{ |array| puts("Array #{array.nickname} is running #{array.active_instances_count || 0} instances.") }

active_array = server_arrays.detect{|array| array.active_instances_count.to_i > 0}
array_instances = active_array.instances
puts("Array #{active_array.nickname}'s private IP address[es]: #{array_instances.map(&:private_ip_address) * ', '}")

Rightstuff::Credentials assumes you have a YAMl file called ~/.rightstuff It should be of the form:

---
:main:
  :credentials:
    :username: myusername
    :password: mypass
    :account:  1234

Installation

$ sudo gem install rightstuff

Online

Alternatives

Contributors

  • joeyates

  • kwerle

TODO

  • Cache connections