Coder Social home page Coder Social logo

stingray's Introduction

stingray

Stingray gem for interfacing with the Riverbed Stingray loadbalancers.

Notes

To use the Stingray Gem

  1. Install the gem

git clone [email protected]:sammarx/stingray.git cd stingray rake build gem install pkg/stingray-0.0.1.gem

  1. Add the following line to your Gemfile:

    gem 'stingray'
    
  2. Create a config/stingray.yml as follows

    url: <base url of stingray API>
    user: <username for authentication>
    password: <password for authentication>

The URL must be the full path to the Stingray REST endpoint - eg.

https://<stingray hostname>:<REST port>/api/tm/1.0/config/active/

PUT and DELETE operations will only work over HTTPS.

Examples

Set up a connection to the Stingray Load Balancer

Stingray.config(YAML.load(File.read('config/stingray.yml'))

Initialize a new pool

p=Stingray::Pool.new

Create a pool

p.create('test-pool')

Add a node (server) to the pool. Takes an array of hosts. The hosts must be reachable from the Load Balancer.

p.add_nodes_to_pool('[test1.example.com, test2.example.com]')

Save the pool. This sends a PUT request to the REST API. No changes to the pool will be commited until the pool is saved.

p.save

List all existing pools

p.pools => ["test-pool"]

Get a pool

p.pool('test-pool')

Delete a node (server) from the pool. Takes an array of hosts.

p.delete_nodes_from_pool('[test2.example.com]')

Delete a pool. This is an immediate action.

p.delete

License

Under the MIT License.

stingray's People

Contributors

spilliton avatar sammarx avatar

Stargazers

David Collom avatar Aaron Wallis avatar

Watchers

Gregory Patmore avatar

Forkers

moxiespaces

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.