Exercise 1.3 - Adding a load balancing pool

Objective

Demonstrate use of the BIG-IP pool module to configure a load balancing pool in BIG-IP device. A load balancing pool is a logical set of devices, such as web servers, that you group together to receive and process traffic.

Guide

Step 1:

Examine the bigip-pool.yml in the VSCode editor. Expand in the Explorer in VSCode (f5-bd-ansible-labs –> 101-F5-Basics –> 1.3-add-pool):

Examine the Code

  • name: CREATE POOL is a user defined description that will display in the terminal output.

  • The bigip_pool: is the module for adding/modifying/deleting pools on the BIG-IP.

  • The provider: parameter is a group of connection details for the BIG-IP.

    • The server: "{{ ansible_host }}" parameter tells the module to connect to the F5 BIG-IP IP address, which is stored as a variable ansible_host in inventory

    • The user: "{{ ansible_user }}" parameter tells the module the username to login to the F5 BIG-IP device with

    • The password: "{{ ansible_password }}" parameter tells the module the password to login to the F5 BIG-IP device with

    • The server_port: "{{ server_port }} parameter tells the module the port to connect to the F5 BIG-IP device with

    • The validate_certs: false parameter tells the module to not validate SSL certificates. This is just used for demonstration purposes since this is a lab.

  • The name: "http_pool" parameter tells the module to create a pool named http_pool

  • The lb_method: "round-robin" parameter tells the module the load balancing method will be round-robin. A full list of methods can be found on the documentation page for bigip_pool.

  • The monitors: "/Common/http" parameter tells the module the that the http_pool will only look at http traffic.

  • The monitor_type: "and_list" ensures that all monitors are checked.

Step 2:

Change directories to the exercise 1.3 folder to examine and execute the code in the Terminal

cd ~/f5-bd-ansible-labs/101-F5-Basics/1.3-add-pool/

Step 3:

Run the playbook - Go back to the Terminal on VS Code server on the control host and execute the following:

ansible-navigator run bigip-pool.yml --mode stdout

Playbook Output

The output will look as follows.

[rhel-user@ede... 1.3-add-pool]$ ansible-navigator run bigip-pool.yml --mode stdout

PLAY [BIG-IP SETUP] ************************************************************

TASK [CREATE POOL] *************************************************************
changed: [f5]

PLAY RECAP *********************************************************************
f5                         : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Solution

The finished Ansible Playbook is provided here. Click here: bigip-pool.yml.

Verifying the Solution

To see the configured Pool, login to the F5 load balancer with your web browser.

  • BIG-IP - (In UDF Console –> Components –> BIG-IP –> Access –> TMUI) - This will popup a webpage to access the F5 Login Page

    • Login to the BIG-IP instance

      • username: admin

      • password: found in the inventory hosts file

  • The load balancer pool can be found by navigating the menu on the left. Click on Local Traffic-> then click on Pools.

    f5pool

You have finished this exercise.