Jump to: navigation, search


< Neutron‎ | LBaaS
Revision as of 15:34, 13 February 2013 by Oleg (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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/2 && git checkout FETCH_HEAD )
  2. Create an image with preinstalled haproxy service.
  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>
keystone_endpoint =

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

# Flavor name to run a haproxy VM
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. Restart Quantum server (in corresponding screen)
  2. 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
  3. 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