Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

Overview

Octavia provides network load balancing for OpenStack and is the reference implementation LBaaS (Load Balancer as a Service). Since the OpenStack Liberty release, Octavia has fully replaced and has become the reference implementation for Load Balancing as a Service (LBaaS v2).

...

This quick start assumes you have a VM set up with SSH and a webserver that you want to expose. The steps included are applicable to other ports and services too. This example assumes you’ve configured your machine following Running an NGinX webserver inside a Docker container. The steps will be similar for bespoke systems too.

...

Code Block
#HTTP health monitor
health_monitor:
  type: OS::Octavia::HealthMonitor
  properties:
    delay: 3 #three second delay
    type: "HTTP"
    timeout: 3 # seconds
    max_retries: 3
    pool: {get_resource: pool}
    url_path: /healthcheck #this is a URL path that is configured on the servers in the pool that the monitor can reach to check pool health.

pool:
  type: OS::Octavia::Pool
  properties:
    lb_algorithm: "LEAST_CONNECTIONS" #the preferred algorithm
    protocol: "HTTP"
    listener: {get_resource: listener}

member:
  type: OS::Octavia::PoolMember
  properties:
    address: {get_attr: [server, first_address]}
    pool: {get_resource: pool}
    protocol_port: 80
    subnet: {get_param: private_subnet}

listener:
  type: OS::Octavia::Listener
  properties:
    protocol: "HTTP"
    protocol_port: 80 # listen on the HTTP port
    loadbalancer: {get_resource: lb}

lb:
  #define the load balancer and the private subnet to use
  type: OS::Octavia::LoadBalancer
  properties:
    vip_subnet: <private-subnet-id>

# Attach a floating IP to the load balancer
floating_ip_association:
  # Associate a floating IP to the Load Balancer so that it can be accessed
  # using an external IP
  type: OS::Neutron::FloatingIPAssociation
  properties:
    floatingip_id: <floating-ip-id>
    port_id: {get_attr: [lb,vip_port_id]}

References

https://docs.openstack.org/octavia/train/reference/introduction.html

...