Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Ruby interface to the Rackspace Cloud Servers API

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 COPYING
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 TODO
Octocat-spinner-32 VERSION
Octocat-spinner-32 cloudservers.gemspec

Rackspace Cloud Servers


This is a Ruby interface into the Rackspace Cloud Servers service. Cloud Servers from The Rackspace Cloud put you in complete control of your hosting infrastructure. Each Cloud Server is a fully-customizable, pay by the hour, virtualized Windows or Linux server instance that you launch, maintain, and control with full root access.

*Note that in version 0.2.0 the connection style changed, from positional arguments to a hash of options*


This source is available on Github and the gem is available on Gemcutter. To install it, do

gem sources -a (Newer Ruby Gems have this already)

sudo gem install cloudservers

To use it in a Rails application, add the following information to your config/environment.rb

config.gem "cloudservers"


See the class definitions for documentation on specific methods and operations.

require 'rubygems'
require 'cloudservers'

# Log into the Cloud Servers system
cs = => USERNAME, :api_key => API_KEY)	

# or if you want to Log into the UK CloudServers
# cs = => USERNAME, :api_key => API_KEY,
#                   :authurl => "")	

# Get a listing of all current servers
>> cs.servers
=> [{:name=>"RenamedRubyTest", :id=>110917}]

# Access a specific server
>> server = cs.server(110917)
=> "RenamedRubyTest"

# or...

# See what type of server this is
=> "256 server"
=> "Ubuntu 8.04.2 LTS (hardy)"

# Soft-reboot the server
>> server.reboot
=> true

# Create a new 512MB CentOS 5.2 server.  The root password is returned in the adminPass method.
>> image = cs.get_image(8)
=> #<CloudServers::Image:0x1014a8060 ...>, status"ACTIVE"
=> "CentOS 5.2"
>> flavor = cs.get_flavor(2)
=> #<CloudServers::Flavor:0x101469130 @disk=20, @name="512 server", @id=2, @ram=512>
=> "512 server"
>> newserver = cs.create_server(:name => "New Server", :imageId =>, :flavorId =>
=> #<CloudServers::Server:0x101433f08 ....
>> newserver.status
=> "BUILD"
>> newserver.progress
=> 0
>> newserver.adminPass
=> "NewServerMbhzUnO"
>> newserver.refresh
=> true
>> newserver.progress
=> 12

# Delete the new server
>> newserver.delete!
=> true


By H. Wade Minter <> and Mike Mayo <>


See COPYING for license information.

Something went wrong with that request. Please try again.