KEMP LBaaS Red Hat OpenStack Driver Installation Guide VERSION: 2.0 UPDATED: AUGUST 2016
Copyright Notices Copyright 2002-2016 KEMP Technologies, Inc.. All rights reserved.. KEMP Technologies and the KEMP Technologies logo are registered trademarks of KEMP Technologies, Inc.. KEMP Technologies, Inc. reserves all ownership rights for the LoadMaster product line including software and documentation. The use of the LoadMaster Exchange appliance is subject to the license agreement. Information in this guide may be modified at any time without prior notice. Microsoft Windows is a registered trademarks of Microsoft Corporation in the United States and other countries. All other trademarks and service marks are the property of their respective owners. Limitations: This document and all of its contents are provided as-is. KEMP Technologies has made efforts to ensure that the information presented herein are correct, but makes no warranty, express or implied, about the accuracy of this information. If any material errors or inaccuracies should occur in this document, KEMP Technologies will, if feasible, furnish appropriate correctional notices which Users will accept as the sole and exclusive remedy at law or in equity. Users of the information in this document acknowledge that KEMP Technologies cannot be held liable for any loss, injury or damage of any kind, present or prospective, including without limitation any direct, special, incidental or consequential damages (including without limitation lost profits and loss of damage to goodwill) whether suffered by recipient or third party or from any action or inaction whether or not negligent, in the compiling or in delivering or communicating or publishing this document. Any Internet Protocol (IP) addresses, phone numbers or other data that may resemble actual contact information used in this document are not intended to be actual addresses, phone numbers or contact information. Any examples, command display output, network topology diagrams, and other figures included in this document are shown for illustrative purposes only. Any use of actual addressing or contact information in illustrative content is unintentional and coincidental. Portions of this software are; copyright (c) 2004-2006 Frank Denis. All rights reserved; copyright (c) 2002 Michael Shalayeff. All rights reserved; copyright (c) 2003 Ryan McBride. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE ABOVE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the above copyright holders.. Portions of the LoadMaster software are copyright (C) 1989, 1991 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA- and KEMP Technologies Inc. is in full compliance Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 2
of the GNU license requirements, Version 2, June 1991. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Portions of this software are Copyright (C) 1988, Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the University of California, Berkeley. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Portions of this software are Copyright (C) 1998, Massachusetts Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Portions of this software are Copyright (C) 1995-2004, Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Portions of this software are Copyright (C) 2003, Internet Systems Consortium Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Used, under license, U.S. Patent Nos. 6,473,802, 6,374,300, 8,392,563, 8,103,770, 7,831,712, 7,606,912, 7,346,695, 7,287,084 and 6,970,933 Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 3
Table of Contents 1 Introduction... 5 1.1 Document Purpose... 5 1.2 Intended Audience... 5 2 KEMP LBaaS Red Hat OpenStack Driver... 6 2.1 Prerequisites... 6 2.2 Install the KEMP LBaaS Red Hat OpenStack Driver Package... 6 2.2.1 Enable LBaaS in Red Hat OpenStack... 6 2.2.2 Automatically Install the Driver Package... 7 2.2.3 Manually Install the Driver Package... 7 2.2.4 Enable LBaaS Neutron with the KEMP LoadMaster Driver... 8 2.3 Topology Setup... 9 2.4 Updating the Driver Package... 9 Document History... 10 Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 4
Introduction 1 Introduction Red Hat OpenStack is a cloud computing software platform. It is primarily deployed as an Infrastructure as a Service (IaaS) solution. The technology consists of a series of interrelated projects that control pools of processing, storage and networking resources throughout a data center. This can be managed through a web-based dashboard, command-line tools or a RESTful API. Red Hat OpenStack lets users deploy Virtual Machines and other instances that handle different tasks for managing a cloud environment on the fly. With Red Hat OpenStack, horizontal scaling is easy more instances can be spun up in order to serve more users, as needed. The KEMP Load Balancer as a Service (LBaaS) OpenStack driver allows the KEMP LoadMaster to be deployed in Red Hat OpenStack. 1.1 Document Purpose This document explains how to install the KEMP LBaaS driver in Red Hat OpenStack and how to deploy a LoadMaster instance in Red Hat OpenStack. 1.2 Intended Audience This document is for anyone who is interested in finding out how to install and use the KEMP LBaaS Red Hat OpenStack driver. Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 5
KEMP LBaaS Red Hat OpenStack Driver 2 KEMP LBaaS Red Hat OpenStack Driver For instructions on how to install and use the KEMP LBaaS OpenStack driver, refer to the sections below. 2.1 Prerequisites The following prerequisites must be in place before following these steps: Red Hat OpenStack 8.0 (Liberty release) must be deployed. A LoadMaster must be deployed within OpenStack. Some of the commands in this document may require sudo or root access. The Application Program Interface (API) must be enabled on the LoadMaster. For instructions on how to do this, refer to the steps below: a) In the LoadMaster Web User Interface (WUI), go to Certificates & Security > Remote Access. Figure 2-1: Enable API Interface b) Select the Enable API Interface check box. 2.2 Install the KEMP LBaaS Red Hat OpenStack Driver Package The package can either be installed automatically (if a network connection is in place) or manually. Refer to the relevant section below for further information. 2.2.1 Enable LBaaS in Red Hat OpenStack To enable LBaaS, open the Red Hat Command Line Interface (CLI) and follow the steps below: 1. Edit the local_settings.py file: vim /etc/openstack-dashboard/local_settings.py 2. Find the following block of code: OPENSTACK_NEUTRON_NETWORK = { 'enable_lb': False } Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 6
KEMP LBaaS Red Hat OpenStack Driver 3. Change False to True: OPENSTACK_NEUTRON_NETWORK = { 'enable_lb': True } True is case sensitive and the case should be exactly as it is in this document. 4. Save the file. 5. Restart the web server: service apache2 restart 2.2.2 Automatically Install the Driver Package To automatically install the driver package, open the Red Hat CLI and enter the following command: pip install <NameOfKEMPOpenStackDriver> For example: pip install kemptech-openstack-lbaas 2.2.3 Manually Install the Driver Package To manually install the driver package, follow the steps below: 1. Go to the following link: https://pypi.python.org/pypi/kemptech-openstack-lbaas/. 2. Download the.tar.gz file provided. 3. Extract the.tar.gz file. 4. In the Red Hat CLI, find the relevant Python path by running the following commands: python import sys sys.path The default path is usually /usr/lib/python2.7/dist-packages. 5. Copy the downloaded kemptech_openstack_lbaas folder into the dist-packages folder. If updating the KEMP driver package, overwrite the existing files. Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 7
KEMP LBaaS Red Hat OpenStack Driver 2.2.4 Enable LBaaS Neutron with the KEMP LoadMaster Driver Configure the neutron.conf and neutron_lbaas.conf files to use the KEMP LBaaS plugin. To do this, follow the steps below: 1. Edit the neutron.conf configuration file: vim /etc/neutron/neutron.conf 2. Find the service_plugins line and add neutron_lbaas.services.loadbalancer.plugin.loadbalancerpluginv2, for example: service_plugins = router,neutron_lbaas.services.loadbalancer.plugin.loadbalancerpluginv2 A comma (,) is used to separate different service plugins. 3. At the bottom of the file, add the following: [kemptechnologies] lm_address = <LoadMasterIPAddress> lm_username = <LoadMasterUsername> lm_password = <LoadMasterPassword> For example: [kemptechnologies] lm_address = 172.16.2.129 lm_username = bal lm_password = test1234 4. Save the changes to the edited file. 5. Edit the neutron_lbaas.conf configuration file: vim /etc/neutron/neutron_lbaas.conf 6. Save the changes to the edited file. 7. Go down to the [service_providers] section and add (or append, as needed) the following line: service_provider = LOADBALANCERV2:kemptechnologies:neutron_lbaas.drivers.kemptechnologies.dr iver_v2.kemploadmasterdriver:default This is case sensitive. If there are other LBaaS entries in the list, ensure the KEMP Technologies one is set as the default. Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 8
KEMP LBaaS Red Hat OpenStack Driver 8. Restart Neutron by running the following command: service neutron-server restart 2.3 Topology Setup Refer to the commands below to find out how to create a load balancer, listener, pool, members and health monitor: Get the Universally Unique Identifier (UUID) of the private subnet: neutron subnet-list Create a load balancer: neutron lbaas-loadbalancer-create --name lb1 private-subnet Create a listener (health check): neutron lbaas-listener-create --loadbalancer lb1 --protocol HTTP --protocol-port 80 --name listener1 Create a pool and associate it with the previously created listener: neutron lbaas-pool-create --lb-algorithm ROUND_ROBIN --listener listener1 -- protocol HTTP --name pool1 Create members (Real Servers): neutron lbaas-member-create --subnet private-subnet --address <ServerIPAddress> --protocol-port 80 pool1 Create a health monitor and associate it with the pool: neutron lbaas-healthmonitor-create --delay 3 --type HTTP --max-retries 3 --timeout 3 --pool pool1 2.4 Updating the Driver Package To update the driver package, refer to the relevant point below: Automatic: Run the following command in the Red Hat CLI: pip install -U <NameOfKEMPOpenStackDriver> For example: pip install --upgrade kemptech-openstack-lbaas Manual: To manually update the driver package, follow the steps in Section 2.2.3 but overwrite the existing files. Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 9
Document History Document History Date Change Reason for Change Version Resp. May 2016 Initial draft First draft of document 1.0 LB Aug 2016 Minor changes Enhancements made 2.0 LB Copyright 2002-2016 KEMP Technologies, Inc. All Rights Reserved. 10