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:
- 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 )
- Create an image with preinstalled haproxy service.
- Create a keypair which will be injected into haproxy VMs. Copy private key to some place on the host.
/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
etc/service_agent.ini with the following parameters:
admin_user = <admin_user>
admin_password = <admin_password>
admin_tenant_name = <admin_tenant_name>
keystone_endpoint = http://127.0.0.1:35357/v2.0
# 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>
- Restart Quantum server (in corresponding screen)
- 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
- 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