You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Due to the current malfunctioning of OpenStack Horizon, it is not possible to create load balancers  through the ADA Cloud Dashboard.

We provide users with an alternative procedure based on the Openstack CLI and OpenStack Octavia plugin. We refer to Octavia documentation:  Basic Load Balancing Cookbook

Environment requirements

You will need the Openstack Client and the Octavia plugin.  

pip install python-octaviaclient

How to deploy a basic HTTP load balancer

In this use case, we will create a ...

Prerequisites 

Before creating a load balancer, ensure the following resources are already created:

  • 1 network.
  • 1 router.
  • Desired security groups for the VMs. 
  • 2 instances
  • At least 3 floating IP: one for the load balancer and the other two associated to the VMs.

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

Procedure

1. Create a Load Balancer:

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

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


2. Create a Listener

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


3. Create Pool

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


4. Add Members


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>



5. Associate an available Floating IP to the load balancer. 

openstack floating ip set --port <port_id> <floating_ip> 

You can identify the port_id if you navigate to the description of your load balancer. 


  • No labels