Monday, July 7, 2014

Configuring Load Balancers in OpenStack

After you install OpenStack through RDO (which is most widely used) , Load Balancer are not by default enabled. To enable Load balancer in OpenStack Havana or Ice House following steps need to be followed :-
Load balancing can be achieved by HA Proxy which is a fast and reliable solution for High availability and load balancing. Ha Proxy needs to be installed in order to enable Load balancing in OpenStack.
To install Ha Proxy on Centos5/RHEL 5 you need to add Epel packages via
# rpm -Uvh

Next to install HA Proxy -
# yum install haproxy

Following changes are required in OpenStack configuration files :-
1.Edit /etc/neutron/neutron.conf and add the following in the default section:
      service_plugins =

   Also, comment out the line in the service_providers section:

2.Set Ha Proxy drivers  in /usr/share/neutron/neutron-dist.conf: 

service_provider =

3.Edit  /etc/neutron/lbaas_agent.ini file and add HA Proxy device driver

device_driver =

4.The interface_driver will depend on the core L2 plugin being used

For OpenVSwitch:
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver

For linuxbridge:
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver

5. Make changes in /etc/openstack-dashboard/local_settings file so that Load balancer section starts appearing in dashboard 

    'enable_lb': True


6. Restart the services 
sudo service neutron-lbaas-agent start
sudo service neutron-server restart
sudo service httpd restart

7.Login to dashboard to see Load Balancer section

1 comment:

  1. You are shared wonderful information. This information is really helpful for me. I shared this information in Car towing service site.