Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction 

Octavia service enables the deployment of load balancing solutions in OpenStack projects.  We refer to Octavia's official documentation for a full description of Octavia features. Octavia service is not available by default in ADA Cloud tenants, but it is enabled on individual projects upon request. 

Due to a current malfunctioning of OpenStack Horizon, it is not possible to create load balancers through the ADA Cloud Dashboard. The users can still deploy load balancing solutions using alternative procedures based on the OpenStack Command Line Interface (CLI) or infrastructure as code tools, such as Ansible,  Terraform, or OpenTofu.   

...

  • 1 network.
  • 1 router.
  • Desired security groups for the VMs. 
  • 2 instances (nginx servers). In our example, these VMs host  an nginx web server each.
  • At least 3 2 floating-IP: two one associated to one of the VMs VMs  and an additional one available for to be associated to the load balancer. The internal Ip of the second VM can be used to login from the first VM if needed for configuration.  Note that an additional floatting-IP could be directly associated to the second VM. However, this would entail using an additional (and not strictly necessary) resource, which we try to avoid. 

If you need to create these resources, you can follow our user guides

Procedure

1Request to be enabled to the service

The user willing to make use of the Octavia service needs to send an email to superc@cineca.it asking for the tenant to be enabled to the service. Once the tenant is enabled to the service by the User Support Team, all users of the tenant will be able to use the service. 

2. Create a Load Balancer

Code Block
openstack loadbalancer create --name <loadbalancer_name> --vip-subnet-id <subnet_id>

...

Note: Wait until the creation is completed. It will take a while and the next steps will return an error if the load balancer is not available. 

23. Create a Listener

Code Block
openstack loadbalancer listener create --name <listener_name> --protocol HTTP --protocol-port 80 <loadbalancer_name>

34. Create a Pool

Code Block
openstack loadbalancer pool create --name <pool_name> --lb-algorithm <algorithm_e.g.ROUND_ROBIN> --listener <listener_name> --protocol HTTP

45. Add Members to the pools

Code Block
openstack loadbalancer member create --subnet-id  <subnet_id> --address <ip_vm_1> --protocol-port 80 <pool_name>

openstack loadbalancer member create --subnet-id <subnet_id> --address <ip_vm_2> --protocol-port 80 <pool_name>

You can find the IPs  of the VMs in the Compute → Instances section of the lateral menu of ADA Cloud Dashboard. The IPs can also be gathered using the CLI.

56. Associate an available Floating IP to the load balancer

...

Finally, use this floating-IP to reach the nginx servers (see figure bellow). The traffic will be managed by the load balancer following the algorithm <algorithm_e.g.ROUND_ROBIN> (see Step 3). 

Servers reached using the load balancer floatting-IPImage RemovedServers reached using the load balancer floatting-IPImage Added