32
OpenStack Load Balancer as a Service (LBaaS) with openSUSE® Leap an advanced service of Neutron Saputro Aryulianto [email protected]

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

Embed Size (px)

Citation preview

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

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

Saputro Aryulianto [email protected]

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

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

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

3

Agenda

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

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

4

https://www.openstack.org/

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

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

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

6

Popular Project

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

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.

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

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.

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

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.

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

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.

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

11

LBaaS v2 Concepts

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

12

Load balancer

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

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

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

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

14

Pool

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

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

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.

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

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.

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

Installation

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

18

Topology

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

19

Preflight

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

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

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

...

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

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...

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

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

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

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

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

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

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

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

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

26

LBaaS Instance Wiring

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

Load Testing

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

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.

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

Questions?

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

Thank You!

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

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

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

32

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