CloudLoadbalancingHowto

Differences between revisions 1 and 2
Revision 1 as of 2010-08-27 15:15:31
Size: 1601
Editor: 76-216-240-245
Comment:
Revision 2 as of 2010-09-22 23:46:19
Size: 1940
Editor: 64
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
You will want to feed a cloud-config block *and* the register/unregister scripts. === Create a cloud-config file that you can feed in via user-data ===

{{{
apt_sources:
 - source: "ppa:clint-fewbar/clb"

packages:
 - clb

}}}

This should produce a working backend server that can have its haproxy.cfg updated on port 8090

== cloud-init for member servers ==

You'll need to feed in an upstart job that registers/unregisters this node.
<i>WIP - see clb_register and clb_unregister</i>

Introduction

This page is not finished yet-clint

Caveats

  • clb is a proof of concept as of the time of this writing, and so, may have bugs that will eat your data, redirect your traffic to hamsterdance.com, or any number of other terrible things.
  • There is no real security built into clb yet. HTTPS would be the simplest way, but even then, without a CA signed cert, its not that useful. You can build a VPN tunnel if you decide the danger is too high.
  • The auth method that clb uses is VERY prone to compromise, being a shared password that is difficult to change.

Install clb

  • # download from http://launchpad.net/clb (as of this writing, the latest version if 0.3) # extract, and install using './setup.py install'

Run clb

clbd is just a wrapper script for twistd. It will, by default, log and store its pid file in the current directory. Starting it up has it listening on port 8090 for registrations and unregistrations.

Configure haproxy template

By default, the templates dir is '$PWD/templates'. Inside, it will look for haproxy.tmpl.

The default haproxy.tmpl file in the 'templates' directory is fairly rudimentary and probably won't work in most instances. It uses the Cheetah templating system, so you can look at http://www.cheetahtemplate.org for documentation on the syntax.

The default output file is ./haproxy.cfg, you can change this by passing -o path/to/your/desired/file to clbd.

cloud-init for backend servers

Create a cloud-config file that you can feed in via user-data

apt_sources:
 - source: "ppa:clint-fewbar/clb"

packages:
 - clb

This should produce a working backend server that can have its haproxy.cfg updated on port 8090

cloud-init for member servers

You'll need to feed in an upstart job that registers/unregisters this node. <i>WIP - see clb_register and clb_unregister</i>

CloudLoadbalancingHowto (last edited 2010-10-05 06:50:47 by 76-216-240-245)