OpenStack Load Balancer as a Service (LBaaS) with openSUSE Leap

Preview:

Citation preview

OpenStack Load Balancer as a Service (LBaaS) with openSUSE® Leap an advanced service of Neutron

Saputro Aryulianto saputroyulianto@gmail.com

2

About Me

• Saputro Aryulianto

• 2+ year, System Administrator

• OpenStack Engineer, Btech

• Student, STIKOM Binaniaga Bogor

• Activist, GNU/Linux Bogor (GLiB)

• Member of Indonesia openSUSE Community

• Certified OpenStack Administrator

3

Agenda

• Intro• OpenStack• Neutron• Load Balancing• Load Balancer as a Service (LbaaS)• Installation• Load Testing• Q/A

4

https://www.openstack.org/

5

OpenStack

• OpenStack is a set of software tools for building and managing cloud computing platforms for public and private clouds.

• OpenStack began in 2010 as a joint project of Rackspace Hosting and NASA

• As of 2016, it is managed by the OpenStack Foundation, a non-profit corporate entity established in September 2012

6

Popular Project

7

Neutron

• Neutron one of the core components of OpenStack provides the Networking capability for OpenStack. It helps to ensure that each of the components of an OpenStack deployment can communicate with one another quickly and efficiently.

8

Load Balancing

• Load balancing is a key component of highly-available infrastructures commonly used to improve the performance and reliability of web sites, applications, databases and other services by distributing the workload across multiple servers.

9

Load Balancer as a Service

• Load Balancing as a Service (LBaaS) is an advanced (Neutron) networking service that allows load balancing of multi-node environments.

• It provides the ability to spread requests across multiple servers thereby reducing the load on any single server.

10

Load Balancer as a Service (cont.)

• LBaaS v2 has multiple implementations via different service plug-ins.

• The two most common implementations use either an agent or the Octavia services.

• Both implementations use the LBaaS v2 API.

11

LBaaS v2 Concepts

12

Load balancer

• The load balancer occupies a neutron network port and has an IP address assigned from a subnet.

13

Listener

• Load balancers can listen for requests on multiple ports. Each one of those ports is specified by a listener.

• LBaaS v2 supports multiple listeners. The following protocols are supported:‒ TCP: generic TCP

‒ HTTP: HTTP

‒ HTTPS: HTTPS pass-through

‒ TERMINATED_HTTPS: HTTPS terminate

14

Pool

• A pool holds a list of members that serve content through the load balancer.

15

Member

• Members are servers that serve traffic behind a load balancer.

• Each member is specified by the IP address and port that it uses to serve traffic.

16

Health monitor

• Members may go offline from time to time and health monitors divert traffic away from members that are not responding properly. Health monitors are associated with pools.

Installation

18

Topology

19

Preflight

• openSUSE Leap 42.2 minimal installation• Internet connection• https://github.com/GLiBogor/leap42-newton-aio

20

Configuring LBaaS v2 with an agent

• zypper in openstack-neutron-lbaas openstack-neutron-lbaas-agent python-neutron-lbaas openstack-horizon-plugin-neutron-lbaas-ui python-horizon-plugin-neutron-lbaas-ui

• vim /etc/neutron/neutron.conf

[DEFAULT]

...service_plugins = [existing service plugins],neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2

...

21

Configuring LBaaS v2 with an agent

• vim /etc/neutron/neutron_lbaas.conf

[service_provider]...

service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default...

22

Configuring LBaaS v2 with an agent

• vim /etc/neutron/lbaas_agent.ini

[DEFAULT]interface_driver = INTERFACE_DRIVER

** Replace INTERFACE_DRIVER with the interface driver that the layer-2 agent in your environment uses. For example, openvswitch for Open vSwitch or linuxbridge for Linux bridge

23

Configuring LBaaS v2 with an agent

• neutron-db-manage --subproject neutron-lbaas upgrade head

• neutron-lbaasv2-agent \

--config-file /etc/neutron/neutron.conf \--config-file /etc/neutron/lbaas_agent.ini

24

Configuring LBaaS v2 with an agent

• systemctl enable openstack-neutron-lbaasv2-agent.service

• systemctl start openstack-neutron-lbaasv2-agent.service

• systemctl status openstack-neutron-lbaasv2-agent.service

• systemctl restart openstack-neutron.service • systemctl status openstack-neutron.service

25

Enable LBaaS on Horizon Dashboard

• cat /srv/www/openstack-dashboard/openstack_dashboard/local/local_settings.py |grep enable_lb

• 'enable_lb': True,

• systemctl restart apache2.service• systemctl status apache2.service

26

LBaaS Instance Wiring

Load Testing

28

ab - Apache HTTP server benchmarking

• ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server.

• This especially shows you how many requests per second your Apache installation is capable of serving.

Questions?

Thank You!

31

Refrence

• https://wiki.openstack.org/wiki/Neutron/LBaaS• https://docs.openstack.org/newton/networking-guide

/config-lbaas.html• https://github.com/GLiBogor/leap42-newton-aio• https://github.com/tonyliu0592/opencontrail/wiki/

LBaaS-OpenStack• https://httpd.apache.org/docs/2.4/programs/ab.html

32

Have a Lot of Fun, and Join Us At:www.opensuse.org

Recommended