Book Image

LEARNING OPENSTACK NETWORKING (NEUTRON)

By : James Denton
Book Image

LEARNING OPENSTACK NETWORKING (NEUTRON)

By: James Denton

Overview of this book

Table of Contents (17 chapters)
Learning OpenStack Networking (Neutron)
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building a load balancer


To demonstrate the creation and use of load balancers in Neutron, this next section is dedicated to building a functional load balancer based on certain requirements.

A tenant has a simple Neutron network set up with a router attached to both an external provider network and an internal tenant network. The tenant would like to load balance HTTP traffic between two instances running a web server. Each instance has been configured with an index.html page containing a unique server identifier.

To eliminate the installation and configuration of a web server for this example, you can mimic the behavior of one by using the SimpleHTTPServer Python module on the instances as follows:

ubuntu@web1:~$ echo "This is Web1" > ~/index.html
ubuntu@web1:~$ sudo python -m SimpleHTTPServer 80
Serving HTTP on 0.0.0.0 port 80 ...

Repeat the aforementioned commands for the second instance, substituting Web2 for Web1 in the index.html file.

Creating a pool

The first step to building a functional...