diff --git a/.gitignore b/.gitignore index 7f63c8ec458ffb6120eecf2e2ee9b8fa376ec785..b79ff611b84588005702bdbbc451e274ac464fdf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *.swp *.swo *~ +build +venv diff --git a/web/support/kb/openstack/lb0.png b/web/support/kb/openstack/lb0.png new file mode 100644 index 0000000000000000000000000000000000000000..a9b106b424e183792daff81c9469a4d816baf63f Binary files /dev/null and b/web/support/kb/openstack/lb0.png differ diff --git a/web/support/kb/openstack/lb1.png b/web/support/kb/openstack/lb1.png new file mode 100644 index 0000000000000000000000000000000000000000..30f8a41fbde0bd2e7c71433680c3b0835c9fbcb8 Binary files /dev/null and b/web/support/kb/openstack/lb1.png differ diff --git a/web/support/kb/openstack/lb2.png b/web/support/kb/openstack/lb2.png new file mode 100644 index 0000000000000000000000000000000000000000..d9908a765b5d180ed54687871ecb57fb978e3dcd Binary files /dev/null and b/web/support/kb/openstack/lb2.png differ diff --git a/web/support/kb/openstack/lb3.png b/web/support/kb/openstack/lb3.png new file mode 100644 index 0000000000000000000000000000000000000000..7cde9ec203aaca70ccbbed49e7215e92eaa25378 Binary files /dev/null and b/web/support/kb/openstack/lb3.png differ diff --git a/web/support/kb/openstack/lb4.png b/web/support/kb/openstack/lb4.png new file mode 100644 index 0000000000000000000000000000000000000000..e0d78f119d270ff80eefe6df1c32611f0578103a Binary files /dev/null and b/web/support/kb/openstack/lb4.png differ diff --git a/web/support/kb/openstack/lb5.png b/web/support/kb/openstack/lb5.png new file mode 100644 index 0000000000000000000000000000000000000000..226433f8630ba75d593728806d5e2c832dfa5f83 Binary files /dev/null and b/web/support/kb/openstack/lb5.png differ diff --git a/web/support/kb/openstack/lb6.png b/web/support/kb/openstack/lb6.png new file mode 100644 index 0000000000000000000000000000000000000000..b91481981eda9e75b764f3b8f836c7f4fd15c75e Binary files /dev/null and b/web/support/kb/openstack/lb6.png differ diff --git a/web/support/kb/openstack/lb7.png b/web/support/kb/openstack/lb7.png new file mode 100644 index 0000000000000000000000000000000000000000..7130e66102ef9ca603f444ee77a0983e56a93460 Binary files /dev/null and b/web/support/kb/openstack/lb7.png differ diff --git a/web/support/kb/openstack/lb8.png b/web/support/kb/openstack/lb8.png new file mode 100644 index 0000000000000000000000000000000000000000..0be3ffbaa973770d61a0d78970f0833015c3af2c Binary files /dev/null and b/web/support/kb/openstack/lb8.png differ diff --git a/web/support/kb/openstack/lbaas_services_tutorial.rst b/web/support/kb/openstack/lbaas_services_tutorial.rst index 7440dcb4aa567a2fb31f71fdc6eba8516ddfbf21..551ac5e3cbe48469dda6925bc189b96753c399ed 100644 --- a/web/support/kb/openstack/lbaas_services_tutorial.rst +++ b/web/support/kb/openstack/lbaas_services_tutorial.rst @@ -1,7 +1,7 @@ -Create an Openstack LB +Create an Openstack Load Balancer ====================== -This guide shows how to create and use an Openstack LB. We will create two VMs, a LB that will balance the load between these two VMs, and will test the LB with curl. +This guide shows how to create and use an Openstack Load Balancer. We will create two VMs, a Load Balancer that will balance the load between these two VMs, and will test the Load Balancer with curl. Create the VMs -------------- @@ -12,6 +12,13 @@ Create a new security group that enables network traffic on port 80 and associat Create and associate a floating IP to each VM. +**Note**: If the service is not visible from the Internet (0.0.0.0/0) create a security group that enables ingress traffic from the private +network of the VM's otherwise the Load Balancer will not be able to forward the requests to the worker VMs. In this case the CIDR of the security group rule +is the network IP. + +.. image:: lb0.png + :width: 600 + Run a simple web server ----------------------- @@ -28,7 +35,7 @@ On test-vm-2: 2. ``vim index.html`` -> <html>This is SERVER 2</html> 3. ``sudo python3 -m http.server 80 &> /dev/null &`` -Create a new LB +Create a new Load Balancer (Openstack CLI) --------------- 1. ``openstack loadbalancer create --name test-lb --vip-subnet-id <subnet-id>`` @@ -38,12 +45,58 @@ Create a new LB 5. ``openstack loadbalancer member create --subnet-id <subnet-id> --address <test-vm-2-private-ip> --protocol-port 80 test-pool`` 6. Get the loadbalancer vip port (vip_port_id) -> ``openstack loadbalancer show test-lb`` 7. Create a new floating ip through the Openstack Dashboard or CLI -8. Associate the previous floating ip to the LB vip port-> ``openstack floating ip set --port <vip-port-id> <floating-ip>`` +8. Associate the previous floating ip to the Load Balancer vip port-> ``openstack floating ip set --port <vip-port-id> <floating-ip>`` + + +Create a new Load Balancer (Openstack Dashboard) +--------------- + +1. Select **Load Balancers** from the menu and select **+ Create Load Balancer**. + + .. image:: lb1.png + :width: 600 + +2. Name the new load balancer and select the subnet (must be the same subnet of the VM's). + + .. image:: lb2.png + :width: 600 + +3. Create a listener and select the protocol/port the load balancer listens to. + + .. image:: lb3.png + :width: 600 + +4. Create a worker pool and select a load balancer algorithm. The choosen algorithm determines how the workload is distributed among members when new requests arrive. + + .. image:: lb4.png + :width: 600 + +5. Add members to the new pool, and for each member select the interface and the port of the service running on that host. + + .. image:: lb5.png + :width: 600 + +6. Create a monitor and select the type of service to monitor. Click on **Create Load Balancer** to finish. + + .. image:: lb6.png + :width: 600 + +7. Wait until load balancer *Operating Status* becomes Online. If a member is unreachable to the load balancer *Operating Status* turns to *Degraded*, in that case the requests are routed to the remaining members. + + .. image:: lb7.png + :width: 600 + +8. Assign a *Floating IP* to the new load balancer. + + .. image:: lb8.png + :width: 600 + **Note**: now it is possibile to remove the floating ips from the two VMs. -Test the LB + +Test the Load Balancer ----------- -``curl <LB-floating-ip>`` +``curl <Load-Balancer-floating-ip>``