Balance overhaul

I’m teaching myself puppet and trying to wrap a module around the TCP load balancer called “balance”. I decided to redo the init script I put together a while back and update my github repo for it. Along with the init script is a file that goes in /etc/sysconfig along with a sample config that should go in /etc/balance.d

I am using the rpm version (since puppet really seems to prefer that over source building). Check EPEL for it.

Advertisements

Balance from source

Balance is a very straight forward TCP load balancer.

1. Install (or confirm installed):

gcc

2. Download balance source from http://www.inlab.de/
3. Untar the source tarball
4. Run:

make

5. Create folders

mkdir -p /usr/local/balance/{sbin,conf}

6. Copy the balance binary to /usr/local/balance/sbin
7. Create a balance.cfg file in /usr/local/balance/conf

The syntax for the config is very simple:

-b 127.0.0.1 8080 127.0.0.2 127.0.0.3

Look for an init script here: https://github.com/breauxaj/balance.git