Versions Compared

Key

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

...

In this section, we will walk you through the steps to create a setup where two instances running nginx servers are connected to an HTTP load balancer. The load balancer will use the round-robin algorithm to evenly distribute incoming HTTP traffic across the two servers. 

Environment requirements

1. You will need the OpenStack Client and the Octavia plugin.  

Code Block
pip install python-octaviaclient

2. Follow the instructions provided in the AdaCloud User Guide on how to setup your cloud environment and  the OpenStack CLI.

Prerequisites 

1. Before creating a load balancer, ensure that the following resources are available in your tenant:

  • 1 network.
  • 1 router.
  • Desired security groups for the VMs.  Ingress rules for HTTP (port 80), HTTPS (port 443), SSH (port 22), and ICMP will be needed
  • 2 instances. In our example, these VMs host  an nginx web server each.
  • At least 2 floating-IP: one associated to one of the VMs  and an additional one available 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. 
  • A Key-pair. An SSH public key is needed to access the instances for their configuration.

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

2. You can set setup a very simple nginx web server in each VM loging logging into each of them and running the following commands on the shell:

...