VMware Integrated OpenStack automatically enables LBaaS v1.

This task includes creating a health monitor and associates it with the LBaaS pool that contains the LBaaS server instances. The health monitor is a Neutron service that checks if the instances are still running on the specified protocol-port.

This task applies only to VMware Integrated OpenStack deployed with NSX.

1

Using SSH, log in to the VMware Integrated OpenStack manager.

2

From the VMware Integrated OpenStack manager, use SSH to log in to the Neutron node.

3

Switch to root user.

sudo su -
4

Create an exclusive router.

neutron router-create --router_type=exclusive <router name>
5

Attach a subnet to the new router.

neutron net-create <network name>
neutron subnet-create <network name> <CIDR value> --name <subnet name>
neutron router-interface-add <router name or id> <subnet name or id>
6

Create an LBaaS pool.

When you create the pool, specify the load balancing method, protocol type, and subnet.

neutron lb-pool-create \
--lb-method <load balancing method> \
--name <pool name> \
--protocol <protocol type> \
--subnet-id <subnet-id>

Parameter

Description

lb-method

Specify a load balancing method:

IP_HASH

Selects a server based on a hash of the source and destination IP address of each packet.

LEAST_CONN

Distributes client requests to multiple servers based on the number of connections already on the server. New connections are sent to the server with the fewest connections.

ROUND_ROBIN

Each server is used in turn according to the weight assigned to it. This process is the smoothest and fairest algorithm when the server's processing time remains equally distributed.

URI

The left part of the URI, before the question mark, is hashed and divided by the total weight of the running servers. The result designates which server receives the request, ensuring that a request is always directed to the same server as long as all servers remain available.

protocol

Specify the protocol for members of the pool to use:

TCP

HTTP

HTTPS

subnet-id

Specify the subnet on which the members of the pool will be located. Only members on this subnet can be added to the pool.

7

Create the instances for the servers and client.

nova boot --image <image-uuid> --flavor <flavor> <server 1 name>
nova boot --image <image-uuid> --flavor <flavor> <server 2 name>
nova boot --image <image-uuid> --flavor 1 <client name>
8

Add the server instances to the LBaaS pool that you created in Step 6.

neutron lb-member-create --address <server 1 IP> --protocol-port 80 <pool name>
neutron lb-member-create --address <server 2 IP> --protocol-port 80 <pool name>
9

Set up the health monitor.

a

Create the health monitor.

neutron lb-healthmonitor-create \
--delay <seconds> \
--type [HTTP | TCP] 
--max-retries <number of retries> 
--timeout <seconds>

Parameter

Description

delay

Time in seconds between sending probes to members.

type

One of the predefined health monitor types. Specify HTTP or TCP.

max-retries

Number of permissible connection failures before changing the member status to INACTIVE.

timeout

Maximum number of seconds for a monitor to wait for a connection to be established before it times out.

Note

The timeout value must be less than the delay value.

This command returns the UUID for the health monitor.

b

Associate the health monitor with the pool, using the health monitor UUID.

neutron lb-healthmonitor-associate <healthmonitor-uuid> <pool name>
10

Create a virtual IP (VIP) address that, when accessed through the load balancer, directs the requests to one of the pool members.

neutron lb-vip-create \
--name <VIP name> \
--protocol-port 80 \
--protocol HTTP \
--subnet-id <subnet-id> <pool name>
11

(Optional) Send test requests to validate your LBaaS configuration.

a

Create a test index.html file.

b

From the same directory, run a simple request.

# sudo python -m SimpleHTTPServer 80
c

Log in to the client instance.

d

Run the wget command to view whether your requests are being correctly load-balanced across the two servers in the pool.

 # wget -O - http://<vip-ip>