Project

stingray

0.0
No commit activity in last 3 years
No release in over 3 years
Stingray gem for interfacing with the Riverbed Stingray loadbalancers.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8.4
~> 3.12

Runtime

>= 0
>= 0
 Project Readme

stingray¶ ↑

Stingray gem for interfacing with the Riverbed Stingray loadbalancers.

Notes¶ ↑

To use the Stingray Gem¶ ↑

  1. Install the gem

git clone git@github.com: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.