Skip to main content

LoxiLB provider driver for OpenStack Octavia Load Balancer as a Service

Project description

LoxiLB Octavia Driver

PyPI version Python 3.8+ OpenStack Zed+ License: Apache 2.0

Software Load Balancer (SLB) OpenStack Octavia provider driver for LoxiLB - bringing eBPF/XDP-powered load balancing to your OpenStack cloud through dynamic VM provisioning.

โœจ Features

  • ๐Ÿš€ High Performance: eBPF/XDP-based load balancing with minimal CPU overhead
  • โ˜๏ธ Cloud Native: Seamless integration with OpenStack and Kubernetes environments
  • ๐Ÿ”„ High Availability: Support for ACTIVE_STANDBY and ACTIVE_ACTIVE topologies
  • ๐Ÿ”ง Full Integration: Complete OpenStack Octavia provider driver implementation
  • โœ… Production Ready: 121/121 tests passing with 100% test coverage
  • ๐Ÿ“ฆ Easy Installation: Automated setup with deployment profiles

๐Ÿš€ Quick Start

Choose your deployment scenario:

๐Ÿ“‹ Common Steps (All Deployments)

Step 1: Setup OpenStack Resources

pip install octavia-loxilb-driver
# Run automated setup to create networks, flavors, and security groups
octavia-loxilb-setup

Step 2: Download and Upload LoxiLB VM Image

# Download LoxiLB VM image from releases
wget https://github.com/NLX-SeokHwanKong/octavia-loxilb-driver/releases/download/vm-v1.0.0/loxilb-vm-standard-v1.0.0.qcow2.gz

# Extract and upload to OpenStack with loxilb tag and performance properties
gunzip loxilb-vm-standard-v1.0.0.qcow2.gz
openstack image create --disk-format qcow2 --container-format bare \
    --public --tag loxilb \
    --property hw_vif_multiqueue_enabled=True \
    --property hw_vif_model=virtio \
    --property hw_disk_bus=virtio \
    --property hw_video_model=virtio \
    --property os_distro=ubuntu \
    --property os_type=linux \
    --file loxilb-vm-standard-v1.0.0.qcow2 loxilb-vm-standard

# Note: hw_vif_multiqueue_enabled=True is critical for LoxiLB performance
# It enables multiple queue networking for high-throughput packet processing

๐Ÿ–ฅ๏ธ Traditional OpenStack (systemd services)

Step 3: Install Driver on Controller Node

# Install on the controller node where Octavia services run
pip install octavia-loxilb-driver

Step 4: Configure Octavia

# Edit /etc/octavia/octavia.conf and add the generated configuration
sudo vim /etc/octavia/octavia.conf

Step 5: Restart Services

sudo systemctl restart octavia-api octavia-worker octavia-controller

๐Ÿณ Containerized Deployments

For Kolla-Ansible:

# Step 3: Install in Octavia containers
sudo docker exec octavia_api pip install octavia-loxilb-driver
sudo docker exec octavia_worker pip install octavia-loxilb-driver
sudo docker exec octavia_controller pip install octavia-loxilb-driver

# Step 4: Update kolla configuration
# Add to /etc/kolla/octavia-api/octavia.conf
# Add to /etc/kolla/octavia-worker/octavia.conf  
# Add to /etc/kolla/octavia-controller/octavia.conf

# Step 5: Restart containers
sudo docker restart octavia_api octavia_worker octavia_controller

For OpenStack-Helm (Kubernetes):

# Step 3: Update helm values to include the driver
# Add to values.yaml:
# conf:
#   octavia:
#     api_settings:
#       enabled_provider_drivers: amphora:amphora,loxilb:loxilb

# Step 4: Upgrade helm release
helm upgrade octavia ./octavia --values=values.yaml

For TripleO:

# Step 3: Add to container customization
# Create custom container image with the driver pre-installed
# Or use ExtraConfig to install during deployment

๐Ÿ”ง DevStack Environment

Step 3: Install in DevStack

# Install in devstack environment
source ~/devstack/openrc admin admin
pip install octavia-loxilb-driver

# Configure in local.conf for persistent setup
echo "pip install octavia-loxilb-driver" >> ~/devstack/local.sh

โœ… Verification (All Deployments)

# Verify provider is available
openstack loadbalancer provider list

# Create your first LoxiLB load balancer
openstack loadbalancer create --provider loxilb --subnet-id <SUBNET_ID> my-lb

Note: For containerized deployments, you may need to rebuild container images or use persistent volume mounts to ensure the driver survives container restarts.

๐Ÿ“‹ Prerequisites

  • OpenStack: Zed or later with Octavia service
  • Python: 3.8+ with pip
  • Access: OpenStack admin credentials and sudo access
  • Resources: Available compute and network quotas
  • LoxiLB VM Image: Downloaded from GitHub releases
  • Manual Configuration: Octavia configuration file editing required

๐Ÿ—๏ธ Architecture

The LoxiLB Octavia Driver is a Software Load Balancer (SLB) that dynamically provisions LoxiLB VMs for each load balancer:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Octavia API   โ”‚โ”€โ”€โ”€โ–ถโ”‚  LoxiLB Driver   โ”‚โ”€โ”€โ”€โ–ถโ”‚ Dynamic LoxiLB VMs 
โ”‚ (Per Load Balancer)  โ”‚                  |    |                 |
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
                               โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  OpenStack VMs   โ”‚
                    โ”‚ (LoxiLB Instance)โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Components:

  • Provider Driver: Main integration with Octavia API
  • LoxiLB API Client: High-performance API communication with retry logic
  • Resource Mapping: ID translation between Octavia and LoxiLB
  • Health Monitoring: Coordinated health checking
  • State Reconciliation: Ensures data consistency

โšก Deployment Profiles

Choose the right profile for your environment:

Profile Use Case Resources Command
DevStack Development & Testing 1 vCPU, 4GB RAM octavia-loxilb-setup --deployment-type devstack
Standard Standard Production 2 vCPU, 8GB RAM octavia-loxilb-setup (default)
Production High Performance 4 vCPU, 16GB RAM octavia-loxilb-setup --deployment-type production

๐Ÿ”ง Custom Configuration

For advanced deployments, create a JSON configuration file:

{
  "flavor": {
    "name": "custom-loxilb-flavor",
    "vcpus": 2,
    "ram": 4096,
    "disk": 30
  },
  "network": {
    "name": "custom-mgmt-network",
    "cidr": "172.16.100.0/24"
  }
}

Use with: octavia-loxilb-setup --custom-config config.json

๐Ÿ“Š Performance Benefits

Compared to traditional software load balancers:

  • 10x Lower Latency: eBPF/XDP processing in kernel space
  • 50% Less CPU Usage: Efficient packet processing without userspace overhead
  • Higher Throughput: Multi-million packets per second capability
  • Better Scaling: Linear performance scaling with additional cores

๐ŸŒ Network Architecture

Management Network

  • Purpose: Octavia controller โ†” LoxiLB VM communication
  • Default: octavia-mgmt-net (192.168.1.0/24)
  • Ports: 8091 (API), 9443 (BGP), 11111/22222 (HA)

Data Networks

  • Purpose: User traffic load balancing
  • Integration: Works with existing tenant networks
  • Protocols: TCP, UDP, HTTP, HTTPS with L4/L7 load balancing

๐Ÿ› ๏ธ Deployment-Specific Installation

๐Ÿ–ฅ๏ธ Traditional OpenStack (Bare Metal/VMs)

# On controller node(s)
sudo pip install octavia-loxilb-driver
octavia-loxilb-setup --deployment-type production

# Configure /etc/octavia/octavia.conf
# Restart systemd services
sudo systemctl restart octavia-api octavia-worker octavia-controller

๐Ÿณ Kolla-Ansible Deployment

# Method 1: Install in existing containers (temporary)
for container in octavia_api octavia_worker octavia_controller; do
    sudo docker exec $container pip install octavia-loxilb-driver
done

# Method 2: Persistent installation via kolla customization
# Add to /etc/kolla/kolla-build.conf:
# [octavia-base]
# pip_packages = octavia-loxilb-driver

# Rebuild containers:
# kolla-build octavia

โ˜ธ๏ธ OpenStack-Helm (Kubernetes)

# Add to helm values.yaml
images:
  tags:
    octavia_api: custom-octavia:latest  # with driver pre-installed

conf:
  octavia:
    api_settings:
      enabled_provider_drivers: amphora:amphora,loxilb:loxilb
    loxilb:
      # Generated configuration here

๐ŸŽฏ DevStack Development

# Install directly
pip install octavia-loxilb-driver
octavia-loxilb-setup --deployment-type devstack

# Or add to local.conf for automated setup
echo "pip_install octavia-loxilb-driver" >> local.conf

๐Ÿ”ง Manual/Custom Deployment

# Generate configuration only
pip install octavia-loxilb-driver
octavia-loxilb-setup --output-config /tmp/loxilb-config.conf

# Review and manually integrate configuration
# Restart services based on your deployment method

๐Ÿ” Verification

Check Provider Availability

openstack loadbalancer provider list
# Should show 'loxilb' in the list

Health Check

octavia-loxilb-health-check --detailed

Create Test Load Balancer

openstack loadbalancer create --provider loxilb --subnet-id <SUBNET_ID> test-lb
openstack loadbalancer show test-lb

๐Ÿ“š Documentation

Document Description
Quick Start Guide Get running in 10 minutes
Installation Guide Comprehensive setup instructions
Troubleshooting Guide Common issues and solutions
VM Images Guide LoxiLB VM distribution and setup
Architecture Docs Technical deep-dive documentation

๐Ÿ”ง Configuration Reference

Key configuration sections in /etc/octavia/octavia.conf:

[api_settings]
enabled_provider_drivers = amphora:amphora,loxilb:loxilb

[driver_loxilb]
# LoxiLB VM Configuration
api_timeout = 30
api_retries = 3
debug_api_calls = true

# OpenStack Authentication (REQUIRED for VM provisioning)
auth_url = YOUR_KEYSTONE_AUTH_URL
auth_type = password
username = octavia
password = YOUR_OCTAVIA_PASSWORD
user_domain_name = Default
project_name = service
project_domain_name = Default

# OpenStack resource IDs (populated by setup script)
lb_mgmt_net_id = abc123-def456-ghi789
lb_security_group_id = def456-ghi789-jkl012
lb_flavor_id = ghi789-jkl012-mno345
lb_image_id = jkl012-mno345-pqr678

๐Ÿ”’ Security Features

  • Secure API Communication: HTTPS with authentication
  • Network Isolation: Separate management and data networks
  • Resource Isolation: Dedicated security groups and networks
  • Access Control: SSH key-based access to LoxiLB VMs
  • Audit Trail: Comprehensive logging and monitoring

๐Ÿ› Troubleshooting

Common Issues

Provider not available:

# Check configuration
sudo grep -A 10 "enabled_provider_drivers" /etc/octavia/octavia.conf

# Restart services
sudo systemctl restart octavia-api octavia-worker

LoxiLB VM issues:

# Check LoxiLB VM status
openstack server list --name loxilb-vm

# Check VM console logs
openstack console log show <LOXILB_VM_ID>

# Check security groups
openstack security group show loxilb-mgmt-sec-grp

For detailed troubleshooting, see the Troubleshooting Guide.

๐Ÿค Contributing

We welcome contributions! Please see our contributing guidelines:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Ensure all tests pass: python -m pytest
  5. Submit a pull request

Development Setup

git clone https://github.com/NLX-SeokHwanKong/octavia-loxilb-driver.git
cd octavia-loxilb-driver
pip install -e .
python -m pytest octavia_loxilb_driver/tests/unit/ -v

๐Ÿ†˜ Support

๐Ÿ“ˆ Roadmap

  • v1.0.0: Production-ready driver with automated setup
  • v1.1.0: Enhanced monitoring and metrics
  • v1.2.0: Advanced traffic policies and SSL termination
  • v2.0.0: Multi-cloud integration and service mesh support

๐Ÿข Production Usage

The LoxiLB Octavia Driver is designed for production use with:

  • Enterprise Grade: Comprehensive testing and validation
  • High Availability: Multi-instance deployment support
  • Monitoring Integration: Extensive logging and health checks
  • Performance Optimization: Tuned for high-throughput scenarios
  • Security Hardening: Following OpenStack security best practices

๐ŸŒŸ Why Choose LoxiLB?

  • Modern Architecture: eBPF/XDP for ultimate performance
  • Cloud Native: Built for containerized and virtualized environments
  • OpenStack Integration: Native Octavia provider driver
  • Active Development: Continuous improvements and feature additions
  • Community Support: Growing ecosystem and user community

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • LoxiLB Team: For the amazing eBPF/XDP load balancer
  • OpenStack Octavia Team: For the extensible load balancing framework
  • OpenStack Community: For the robust cloud platform
  • Contributors: Everyone who has contributed to this project

๐Ÿš€ Get Started Today!

# Install the driver
pip install octavia-loxilb-driver

# Setup OpenStack resources
octavia-loxilb-setup

# Download VM image and configure Octavia (see Quick Start above)

Transform your OpenStack load balancing with the power of eBPF/XDP!

Questions? Check out our documentation or open an issue.


Made with โค๏ธ by the LoxiLB and OpenStack communities

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octavia_loxilb_driver-1.0.1.tar.gz (480.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octavia_loxilb_driver-1.0.1-py3-none-any.whl (189.4 kB view details)

Uploaded Python 3

File details

Details for the file octavia_loxilb_driver-1.0.1.tar.gz.

File metadata

  • Download URL: octavia_loxilb_driver-1.0.1.tar.gz
  • Upload date:
  • Size: 480.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for octavia_loxilb_driver-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9bcb9f9008056c72df9fff21f726ebf2352ecd4f522ca7f9dd402de773cd9af3
MD5 59ad9cdc936f3c883f3a5f7a2d446b3e
BLAKE2b-256 65237800b924965d0d4f00ddf0175998768e8495696a234acf1958a7344f68c0

See more details on using hashes here.

File details

Details for the file octavia_loxilb_driver-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for octavia_loxilb_driver-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f2191e236187240a4c6639a1368e05d5c1777c92bd7999f74fbe0872ec462bd
MD5 3e63e54bda315f7d9ed9d5debf55c6c3
BLAKE2b-256 bea51d96b946c56db5ba47a1fc7a805a12007d98a262f2e221cf32c44c5b93c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page