OS1 Load Balancing with IP Failover

This article will go through preparing a load balanced infrastructure with IP failover within your CloudVPS Compute platform.

This article only applies on our Legacy OpenStack platform

Prepare your infrastructure for Load Balancing

  1. Create a new private network (a /16 subnet is recommended) with DHCP enabled. (see http://www.cloudvps.com/community/knowledge-base/private-networks/ on how to create a network).
  2. Reserve the first floating IP address (see http://www.cloudvps.com/community/knowledge-base/openstack-ip-addressing/ on how to reserve a floating IP address).
  3. Boot two new servers with your desired Operating System
 (see http://www.cloudvps.com/community/knowledge-base/openstack-ip-addressing/ on how to boot new servers) and connect them to the private network created at step 1.
  4. Next, from within the CLI create a network port which will generate a fixed ip address. This fixed ip address will be used as internal VIP for your failover software:
    neutron port-create NETWORK-UUID --tenant-id YOUR_TENANT_ID
  5. Note the previously generated port id and assign the floating IP address to the network port:
    neutron floatingip-associate FLOATING_IP_UUID PORT_UUID
  6. Reserve a second floating IP address.
  7. Assign the second floating IP address to the private IP address of the second server to act as management IP.

You can find the UUID's for the network, floating IP and port with the following commands:

Network UUID:

$ neutron net-list
+------------------+-----------------+------------------------------+
| id               | name            | subnets                      |
+------------------+-----------------+------------------------------+
| 00[...]00        | net-public      | 2c5[...]310213.187.243.0/24  |
| 57[...]8d        | local-example   | aaa[...]6 10.108.222.0/24    |
+------------------+-----------------+------------------------------+

Floating IP UUID:

$ neutron floatingip-list
+--------------+------------------+-----------------------+---------------+
| id           | fixed_ip_address | floating_ip_address   | port_id       |
+--------------+-----------------------+------------------+---------------+
| df[...]44b   | 192.168.20.5     | 213.187.199.299       | 01[...9f      |
| f3[...]00    |                  | 213.199.299.199       |               |
+--------------+------------------+-----------------------+---------------+

Port UUID:

$ neutron port-list
+-----------+--------------------+---------------------+-------------+
| id        | fixed_ip_address   | floating_ip_address | port_id     |
+-----------+--------------------+---------------------+-------------+
| 30[...]79 |                    | 213.187.244.28      |             |
| 46[...]4e | 192.168.20.6       | 213.187.244.25      | 56[...]a67  |
+-----------+--------------------+---------------------+-------------+

Now you are ready to configure the load balancers and use the first floating IP address as the external VIP and the fixed IP address as the internal VIP.

Ubuntu & Centos changes

Configure the following files as described below.

Add the following to the DHCP client configuration (/etc/dhcp/dhclient.conf)

alias {
     interface "eth0";
     fixed-address <fixed ip>;
     option subnet-mask 255.255.255.255;
}

Configure Default Gateway (/etc/sysconfig/network)

NETWORKING=yes
HOSTNAME=<hostname>
GATEWAY=<gateway ip>

Configure DNS Server (/etc/resolv.conf)

nameserver 8.8.8.8      # Or replace with your nameserver ip
nameserver 8.8.4.4      # Or replace with your nameserver ip

Restart the network service

service network restart

Helpcenter

General FAQ

Show all FAQs

OpenStack FAQ

Show all FAQs

Knowledgebase

Show all FAQs