Difference between revisions of "Neutron/LBaaS/HowToRun"
m (Text replace - "DevStack" to "DevStack") |
Rpodolyaka (talk | contribs) m (→How to run LBaaS on DevStack) |
||
Line 3: | Line 3: | ||
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: | 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. <code><nowiki>git fetch https://review.openstack.org/openstack/quantum refs/changes/85/20985/ | + | # Check out Quantum code from gerrit topic (i.e. <code><nowiki>git fetch https://review.openstack.org/openstack/quantum refs/changes/85/20985/5 && git checkout FETCH_HEAD </nowiki></code>) |
# Create an image in '''admin's tenant''' with preinstalled haproxy service or download the [https://docs.google.com/file/d/0B1mJ0eQoi7tESGJScnVJTk5mVjQ/edit?usp=sharing image], '''make the image public''' | # Create an image in '''admin's tenant''' with preinstalled haproxy service or download the [https://docs.google.com/file/d/0B1mJ0eQoi7tESGJScnVJTk5mVjQ/edit?usp=sharing image], '''make the image public''' | ||
# Create a keypair which will be injected into haproxy VMs. Copy private key to some place on the host. | # Create a keypair which will be injected into haproxy VMs. Copy private key to some place on the host. | ||
Line 19: | Line 19: | ||
admin_password = <admin_password> | admin_password = <admin_password> | ||
admin_tenant_name = <admin_tenant_name> | admin_tenant_name = <admin_tenant_name> | ||
− | + | auth_url = http://127.0.0.1:35357/v2.0 | |
# Drivers for advanced services | # Drivers for advanced services |
Revision as of 09:21, 19 February 2013
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/5 && git checkout FETCH_HEAD
) - Create an image in admin's tenant with preinstalled haproxy service or download the image, make the image public
- Create a keypair which will be injected into haproxy VMs. Copy private key to some place on the host.
- 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
- 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 = 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 # 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>
- Stop devstack Quantum server (in corresponding screen)
- 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
- 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