NodeBalancer script

I wrote this script a while back, and just came back around to putting it online so other folks could use it.

My most common task using the node balancers is temporarily enabling/disabling nodes; e.g. pull server 1 completely out of rotation, on all ports, while I'm doing maintenance.

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

loadbalancer 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

loadbalancer server1 accept

Which will bring it back.

The code is at https://github.com/greinacker/linode_loadbalancer - feel free to contribute if you want to add anything!

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct