Discovering LBAAS with OpenStack

A killer feature in OpenStack is the LBAAS : Load Balancing As A Service.

The idea behind LBaaS is to automate your deployment even with Load Balancing service.

In the company i'm working for, LB is a way of life, so when we decided to use OpenStack we were looking for full automated LB mecanisms : Quantum LBaaS agent

Installation

The installation with grizzly is pretty simple :

Go to the network node !

root@myhost$ apt-get install quantum-lbaas-agent

When the installation is done edit /etc/quantum/lbaas_agent.ini file to add :

# to use OVS based plugins - in my case OVS :
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver

# otherwise with linux bridging
interface_driver = quantum.agent.linux.interface.BridgeInterfaceDriver

Now go to the controller node - where quantum server is installed :

# Add this in quantum.conf file
service_plugins = quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin

To see LBaaS in your dashboard - horizon - edit /etc/openstack-dashboard/local_settings.py, to change :

OPENSTACK_QUANTUM_NETWORK = {
    'enable_lb': False
    }

to

OPENSTACK_QUANTUM_NETWORK = {
    'enable_lb': True
    }

Save the local_settings.py file and restart apache and quantum services.

Howto use it

First create three instances like this :

root@myhost$ nova boot --image $IMG_UUID --flavor $FLAVOR_ID VM_WEB_1
root@myhost$ nova boot --image $IMG_UUID --flavor $FLAVOR_ID VM_WEB_2
root@myhost$ nova boot --image $IMG_UUID --flavor $FLAVOR_ID VM_CLIENT

Get private subnet UUID :

root@myhost$ quantum subnet-list

Create a pool to load balance :

root@myhost$ quantum lb-pool-create --lb-method ROUND_ROBIN --name $POOL_NAME --protocol HTTP --subnet-id $SUBNET_ID

Create members using VM_WEB_1 and VM_WEB_2 ips :

root@myhost$ quantum lb-member-create --address $VM_WEB_1_IP --protocol-port 80 $POOL_NAME
root@myhost$ quantum lb-member-create --address $VM_WEB_2_IP --protocol-port 80 $POOL_NAME

Add health monitor to the new pool :

root@myhost$ quantum lb-healthmonitor-create --delay 3 --type HTTP --max-retries 3 --timeout 3
root@myhost$ quantum lb-healthmonitor-associate $HEALTHMONITOR_UUID $POOL_NAME

Create a VIP :

root@myhost$ quantum lb-vip-create --name $VIP_NAME --protocol-port 80 --protocol HTTP --subnet-id $SUBNET_ID $POOL_NAME

And that's All !

Luke,now you can use the LBaaS Force !

Screenshots

OpenStack LBaaS global view

lbass_global

OpenStack LBaaS Pool

pools

OpenStack LBaas Members

members

OpenStack LBaaS Monitors

monitor

Comments !