Jump to: navigation, search


< Neutron‎ | LBaaS
Revision as of 09:21, 19 February 2013 by Rpodolyaka (talk | contribs) (How to run LBaaS on DevStack)

How to run LBaaS on DevStack

The code is available under https://review.openstack.org/#/c/20985/. The patch introduces driver for HAProxy loadbalancer. To run the code on DevStack one needs:

  1. Check out Quantum code from gerrit topic (i.e. git fetch https://review.openstack.org/openstack/quantum refs/changes/85/20985/5 && git checkout FETCH_HEAD )
  2. Create an image in admin's tenant with preinstalled haproxy service or download the image, make the image public
  3. Create a keypair which will be injected into haproxy VMs. Copy private key to some place on the host.
  4. Update /etc/quantum/quantum.conf with the following parameters:
core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
service_plugins = quantum.plugins.services.loadbalancer.loadbalancer_plugin.LoadBalancerPlugin
  1. Update etc/service_agent.ini with the following parameters:
admin_user = <admin_user>
admin_password = <admin_password>
admin_tenant_name = <admin_tenant_name>
auth_url =

# Drivers for advanced services
service_drivers = quantum.plugins.services.loadbalancer.drivers.haproxy.haproxy_driver.HAProxyDriver

# Flavor name to run a haproxy VM
# it's better to create custom flavor with less amount of disk space (2-4 GB) for faster VM provisioning
haproxy_flavor_name = m1.small

# Glance image id for a haproxy VM
haproxy_image_id = <image_id>

# Keypair name for a haproxy VM
haproxy_keypair = <keypair name>

# Path to the private key for ssh to a haproxy VM
haproxy_key_path = <path to the private key on the host>
  1. Stop devstack Quantum server (in corresponding screen)
  2. Run quantum server by cd /opt/stack/quantum && python bin/quantum-server --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini --debug --verbose
  3. Start Agent by cd /opt/stack/quantum && python bin/quantum-service-agent --config-file /etc/quantum/quantum.conf --config-file=etc/service_agent.ini --debug
  4. Check that the workflow works by creating pool object:
  quantum lb-pool-create --lb-method ROUND_ROBIN --name Uno --protocol TCP --subnet-id <subnet-id> 
The command outputs Pool in PENDING_CREATE state, to verify that it is actually created (state is ACTIVE), run
  quantum lb-pool-show <pool-id> 
Also check that a new haproxy VM was launched from the image in the agent config.
Full list of LBaaS CLI commands is available at Quantum/LBaaS/CLI