Skip to content

joeyates/rightstuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Another RightScale Ruby interface gem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages