Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Aug 22, 2013 6:00 pm 
Offline
Junior Member

Joined: Mon Apr 18, 2011 1:54 pm
Posts: 45
Website: http://www.rassoc.com/gregr/weblog
I've updated my linode_loadbalancer project, to support the management of multiple load balancers. You can download it (or contribue!) at https://github.com/greinacker/linode_loadbalancer

From the readme:

This is a command line tool to cover a common use case. Specifically, suppose you have 2 servers (called server1 and server2 in the Linode Manager) as members of a NodeBalancer, and each of them is listening on ports 80 and 443. When you want to do maintenance on server1, it's quite a lot of clicks in the Linode Manager to accomplish this.

So using this tool, you can do

Code:
loadbalancer balancer1 server1 reject


This will take server1 completely out of rotation in the NodeBalancer, on all ports it is listening on. To bring it back online, use

Code:
loadbalancer balancer1 server1 accept


Which will bring it back.

In both cases, it will loop waiting for the change to actually propogate; when it has completed, and your changes have taken effect, the tool exits.

You can also use this with multiple load balancers at the same time; for example, if you have a server called server1, which is a member node in all of your NodeBalancers, you could use something like

Code:
loadbalancer ALL server1 reject


which will take server1 offline on all NodeBalancers configured on your account.

Uses the most excellent Linode gem; you'll need to install that gem first using

Code:
gem install linode


Then add your Linode API key to the file, make it executable in your file system, remove the .rb extension if you want, and you're good to go.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: sleddog and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group