LBaaS - OpenStack

Turn up the Heat with LBaaS v2
Neela Shah, Senior Software Engineer, @neela_shah
Mark Vanderwiel, Senior Software Engineer, @MarkRVanderwiel
Agenda
• Load Balancing as a Service V2
• Heat Resources
• Horizon Dashboard
• DevStack How-To
• Heat Templates
• Considerations
• Questions
• Refs
2
Load Balancing!
3
Load Balancing as a Service (LBaaS)
• Version 1
• Part of neutron base project
• Limited fixed design
• Deprecated in Liberty
• Version 2
•
•
•
•
•
Experimental in Kilo
Stable in Liberty
Heat Support added in Mitaka
Separate neutron-lbaas project
Pluggable driver design
4
LBaaS V2 Heat Resources
LoadBalancer
Listener
Pool Member
Pool
Health Monitor
Pool
Listener
5
LBaaS V2 Heat Resources
• New resource namespace for V2
OS::Neutron::LBaaS::
• No overlap, reuse or interact with V1 resources
• Template version 2016-04-08
• New template constraints
6
LBaaS V2 Heat Resources
• OS::Neutron::LBaaS::LoadBalancer
• Directs traffic between pools of servers
• Has a Virtual IP address (VIP)
• Template constraint: neutron.lbaas.loadbalancer
• OS::Neutron::LBaaS::Listener
•
•
•
•
Represents a listening endpoint for the VIP
Has a protocol (TCP, HTTP, HTTPS, Terminated HTTP)
Has a port
Template constraint: neutron.lbaas.listener
7
LBaaS V2 Heat Resources
• OS::Neutron::LBaaS::Pool
• Represent a group of servers
• Defines a subnet on which servers reside
• Defines a load balancing algorithm
1. ROUND_ROBIN
2. LEAST_CONNECTIONS
3. SOURCE_IP
• Template constraint: neutron.lbaas.pool
• OS::Neutron::LBaaS::PoolMember
• Represents a server as an IP address and port
• Not necessarily an OS::Nova::Server
8
LBaaS V2 Heat Resources
• OS::Neutron::LBaaS::HealthMonitor
•
•
•
•
Monitors health of servers in a pool
Has a type (Ping, TCP, HTTP, HTTPS)
Has configurable HTTP(s) request methods
Has configurable delay, timeout and retries
9
DevStack How-To for LBaaS V2
• Use neutron-lbaas project devstack plugin
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
ENABLED_SERVICES+=q-lbaasv2
• Use Namespace service provider instead of Octavia
NEUTRON_LBAAS_SERVICE_PROVIDERV2=LOADBALANCERV2:Haproxy:neutron_lbaas.driv
ers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
• [Optional] Use Barbican for HTTPS certificate support
enable_plugin barbican https://git.openstack.org/openstack/barbican
• [Optional] Use neutron-lbaas-dashboard devstack plugin
enable_plugin neutron-lbaas-dashboard https://git.openstack.org/openstack/neutronlbaas-dashboard
10
Heat Template for LBaaS V2
• Heat scenario example
•
•
•
•
heat_integrationtests/scenario/test_autoscaling_lbv2.py
Uses Heat::AutoScalingGroup
Creates simple web servers
Shows scale up/down for load balancer server pool
• heat-templates project example
• hot/lbaasv2/lb_group.yaml
• Use single template to help explain resource relationships
• Show all load balancer resources
11
Considerations
• LBaaS V2
• Pluggable drivers
• Octavia, VMware, Brocade, Radware, A10 Networks, Kemp Technologies, NetScaler
• Octavia
•
•
•
•
•
•
L7 – Context based routing
Pool Sharing
Active/Stand-By, Anti-Affinity
Certificate Rotation
APIs Cascade Delete, Get-Me-A-LB
Future
• Active/Active
• Amphora Container support
• OpenStack CLI
• Started in Mitaka
12
Considerations
• Heat resource hierarchy
• ANY time ANY resource under a LoadBalancer is added, updated, or
deleted, the LoadBalancer goes into a PENDING_UPDATE state
• No further actions can occur while LoadBalancer is PENDING_UPDATE
• Heat wants to try to do things in parallel
• Only one action can happen at a time
• Solution
• Try, fail, wait
• Rinse, repeat
• “Better to ask forgiveness than permission”
13
Considerations
• Migration from V1
• Manual for Neutron objects
• Manual for Heat resources and templates
• Coexistance with V1
• Nothing tested
• No recommendations at this time
14
Summary
• LBaaS V1
• Going, going, gone!
• Nothing new happening here
• LBaaS V2
•
•
•
•
•
Ready to go
Integrations with Heat and Horizon
Multiple drivers
New features coming, like L7
Plan ahead and well for transition
15
16
References
• Heat Resources
• http://docs.openstack.org/developer/heat/template_guide/openstack.html#ope
nstack-resource-types
• LBaaS Related OpenStack projects
• neutron-lbaas, octavia, neutron-lbaas-dashboard
• Presentations
• http://www.slideshare.net/mestery/openstack-neutron-tutorial
• Starting on slide 56
• https://www.openstack.org/summit/tokyo-2015/videos/presentation/loadbalancing-as-a-service-liberty-and-beyond
• API Doc
• http://developer.openstack.org/api-ref-networking-v2-ext.html
17
Thank You
18