GithubHelp home page GithubHelp logo

stylefoundry / ruby-cloudlb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rackerlabs/ruby-cloudlb

0.0 2.0 0.0 111 KB

A Ruby interface into the Rackspace Cloud Load Balancers product

Home Page: http://www.rackspace.com/cloud/blog/2011/02/24/rackspace-cloud-load-balancers-beta-now-available-for-all-cloud-customers/

License: Other

Ruby 100.00%

ruby-cloudlb's Introduction

Rackspace Cloud Load Balancers

Description

This is a Ruby interface into the Rackspace Cloud Load Balancers 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 and the gem is available on RubyGems. 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 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 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)
=> #<CloudLB::Balancer:0x101d7ebf8 @status="ACTIVE", @port=80, @name="stage-rax-lb", ...>

# 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)
=> #<CloudLB::Node:0x101d48c88 @status="ONLINE", @port=80, ...>

Authors

H. Wade Minter <[email protected]>

License

See COPYING for license information. Copyright © 2011, Rackspace US, Inc.

ruby-cloudlb's People

Contributors

minter avatar oggy avatar joshado avatar enigma314 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.