An open API service indexing awesome lists of open source software.

https://github.com/rubyonworld/ruby-cloudlb

This project is deprecated. New projects should use fog instead.
https://github.com/rubyonworld/ruby-cloudlb

instead project

Last synced: 3 months ago
JSON representation

This project is deprecated. New projects should use fog instead.

Awesome Lists containing this project

README

          

= Rackspace Cloud Load Balancers

== Deprecation Notice

This project is deprecated. New projects should use fog[https://github.com/fog/fog] instead.

== Description

This is a Ruby interface into the Rackspace[http://rackspace.com/] {Cloud Load Balancers}[http://www.rackspace.com/cloud/blog/2011/02/24/rackspace-cloud-load-balancers-beta-now-available-for-all-cloud-customers/] service. Mission-critical web-based applications and workloads require high availability. Load balancing
distributes workloads across two or more servers, network links, and other resources to maximize
throughput, minimize response time and avoid overload. Rackspace Cloud Load Balancers allow you
to quickly load balance multiple Cloud Servers for optimal resource utilization.

== Installation

This source is available on Github[http://github.com/rackspace/ruby-cloudlb/] and the gem is available on RubyGems[http://rubygems.org/]. To install it, do

sudo gem install cloudlb

To use it in Bundler, add the following statement to your Gemfile

gem "cloudlb"

== RDOC Documentation

Find the latest RDoc documentation for this library at http://rdoc.info/github/rackspace/ruby-cloudlb/master/frames

== API Documentation

This binding attempts to conform to the latest API specifications. For current API documentation, visit http://docs.rackspacecloud.com/api/

== Examples

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

require 'rubygems'
require 'cloudlb'

# Authenticate to the Rackspace Cloud, and choose to manage load balancers in the Dallas/Ft. Worth datacenter
lb = CloudLB::Connection.new(:username => "MY_USERNAME", :api_key => "MY_API_KEY", :region => :dfw)

# Show active load balancers
lb.list_load_balancers
=> [
{:status=>"ACTIVE", :port=>80, :updated=>{:time=>"2011-02-25T03:14:49+0000"}, :created=>{:time=>"2010-12-02T20:30:49+0000"}, :protocol=>"HTTP", :algorithm=>"RANDOM", :virtualIps=>[{:type=>"PUBLIC", :id=>21, :ipVersion=>"IPV4", :address=>"174.143.139.1"}], :name=>"stage-rax-lb", :id=>1},
{:status=>"ACTIVE", :port=>80, :updated=>{:time=>"2011-02-25T15:31:16+0000"}, :created=>{:time=>"2011-02-25T01:11:31+0000"}, :protocol=>"HTTP", :algorithm=>"ROUND_ROBIN", :virtualIps=>[{:type=>"PUBLIC", :id=>38, :ipVersion=>"IPV4", :address=>"174.143.139.2"}], :name=>"Renamed LB", :id=>73}
]

# Select a load balancer
balancer = lb.get_load_balancer(1)
=> #

# Change the algorithm to round-robin
balancer.algorithm="ROUND_ROBIN"
=> "ROUND_ROBIN"

# Add a new node to the load balancer
node = balancer.create_node(:address => '192.168.0.1', :port => 80)
=> #

== Authors

{H. Wade Minter}[https://github.com/minter/]

== License

See COPYING for license information.
Copyright (c) 2011, Rackspace US, Inc.