Versions Compared

Key

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

...

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

...

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

  • 1 network and subnet.
  • 1 router.
  • Desired security groups for the VMs.   At the minimun, the Ingress rules for HTTP (port 80) , HTTPS (port 443), and 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 IP of the second VM can be used to login from the first VM if needed for configuration.  Note that an additional floatting-Floating 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 guidesthe ADA Cloud User Guide

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

...

The <subnet_id> can be found through the ADA Cloud Dashboard. On the main menu, select the Network → Netwroks Networks tab. Then, click on your network and select the Subnets tab. Finally, click on the desired subnet. This information can also be gathered using the CLI.

...

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

5. 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>

...