Here you will learn how to configure an F5 BIG-IP Local Traffic Manager (LTM) as a load balancer for VMware Tanzu Application Service for VMs (TAS for VMs).
These instructions assume you are familiar with the following concepts:
tmsh
)For guidance about the previous topics, see AskF5.
You must configure your F5 load balancer before installing TAS for VMs.
To use your F5 deployment as a load balancer, you must configure it to forward unencrypted HTTP following these steps. This procedure assumes that you are running F5 v12.1.2 or v13.0.0.
This TAS for VMs configuration option forwards unencrypted traffic to the Gorouter. It assumes an external load balancer is configured to forward unencrypted traffic.
This configuration stops client SSL at the F5 and forward standard HTTP traffic to the backend Gorouters from the LTM. All TCP back ends accept forwarded traffic from the LTM.
In the F5 UI, go to Local Traffic.
Go to iRules and click iRule List.
Create the following rules:
cf-xforward-for
Definition: when HTTP_REQUEST { HTTP::header insert X-Forwarded-For [IP::remote_addr] }
cf-xforward-proto-https
Definition: when HTTP_REQUEST { HTTP::header insert X-Forwarded-Proto "https" }
cf-xforward-proto-http
Definition: when HTTP_REQUEST { HTTP::header insert X-Forwarded-Proto "http" }
Go to System, then File Management, and click SSL Certificate List.
pcf-pas-cert
.pcf-pas-key
.Go to Local Traffic and click Monitors.
gorouter
health monitor and give it the following parameters:
gorouter_mon
HTTP
GET /health HTTP/1.0\r\n
8080
ok
sshproxy
health monitor and give it the following parameters:
diegobrain_mon
TCP
2222
tcprouter
health monitor and give it the following parameters:
tcprouter_mon
HTTP
GET /health
80
Create all required nodes:
gorouter
nodes, one for each Gorouter in your TAS for VMs deployment, and give it the following parameters:
gorouter-#
[IP-ADDRESS-OF-GOROUTER]
enabled
Node Default
diegobrain
nodes, one for each Diego Brain in your TAS for VMs deployment, and give it the following parameters:
diegobrain-#
[IP-ADDRESS-OF-DIEGOBRAIN]
enabled
Node Default
tcprouter
nodes, one for each TCP Router in your TAS for VMs deployment, and give it the following parameters:
tcprouter-#
[IP-ADDRESS-OF-TCPROUTER]
enabled
Node Default
Create three member pools:
gorouter
pool and give it the following parameters:
gorouter_pool
gorouter_mon
Least Connections
gorouter-#
nodes.
80
diegobrain
pool and give it the following parameters:
diegobrain_pool
diegobrain_mon
Least Connections
diegobrain-#
nodes.
2222
tcprouter
pool and give it the following parameters:
tcprouter_pool
tcprouter_mon
Least Connections
tcprouter-#
nodes.
*/0
Create an SSL client profile.
pcf-ssl-client-certs-profile
clientssl
[TRUE]
pcf-pas-cert
pcf-pas-key
Your deployment might require additional root or intermediate certificates. You can select them here. Additionally, you can also enter passphrases for certificates.
Create four LTM virtual servers. One is required, while three are optional.
pcf-https
Standard
0.0.0.0/0
YOUR-PCF-VIP
This VIP must be DNS-resolvable to your system domain and default apps domains.
443
Enabled
TCP
tcp_lan_optimized
*Protocol Profile (Server): (Use Client Profile)http
pcf-ssl-client-certs-profile
Enabled on YOUR-CONFIGURED-F5-VPN
Auto Map
This must be set in one-arm configurations.
gorouter_pool
cf-xforward-for
and cf-xforward-proto-https
pcf-http
Standard
0.0.0.0/0
YOUR-PCF-VIP
This VIP must be DNS-resolvable to your system domain and default apps domains.
80
Enabled
TCP
tcp_lan_optimized
http
[NONE]
Enabled on YOUR-CONFIGURED-F5-VPN
Auto Map
This must be set in one-arm configurations.
gorouter_pool
cf-xforward-for
and cf-xforward-proto-http
(Optional) Create a virtual server for sshproxy
. This virtual server allows developers to SSH into Diego containers.Give it the following parameters:
pcf-sshproxy
Standard
0.0.0.0/0
YOUR-SSH-PROXY-VIP
This VIP must be DNS-resolvable to ssh.[YOUR-PCF-PAS-SYSTEM-DOMAIN].
2222
Enabled
TCP
tcp_lan_optimized
[NONE]
[NONE]
Enabled on YOUR-CONFIGURED-F5-VPN
Auto Map
This must be set in one-arm configurations.
diegobrain_pool
(Optional) Create a virtual server for tcprouter
. This virtual server allows access to the TCP app. Give it the following parameters:
pcf-tcprouter
Standard
0.0.0.0/0
[YOUR-TCP-ROUTER-VIP]
This VIP must be DNS-resolvable to tcp.[YOUR-CONFIGURED-TCP-DOMAIN].
*/0
Enabled
TCP
tcp_lan_optimized
[NONE]
[NONE]
Enabled on YOUR-CONFIGURED-F5-VPN
Auto Map
This must be set in one-arm configurations.
tcprouter_pool
Once you complete the configuration, verify that everything in Network Map located in Local Traffic Menu is green.
Single configuration files (SCFs) are single files containing a complete F5 configuration for F5 v11.x and v12.x. This section contains sample SCF files for functional reference configurations. Often, presenting a reference SCF “template” to an F5 admin can provide all necessary configuration information for configuring an F5 load balancer for TAS for VMs.
You can create SCFs by using tmsh
Run:
save /sys config file SCF-FILENAME no-passphrase
Where SCF-FILENAME
is the name of the SCF you want to create.
You can also edit SCFs and use them as a template to replicate configurations across multiple F5s by using tmsh
. Run:
load /sys config file SCF-FILENAME
Where SCF-FILENAME
is the name of the SCF you want to edit.
For more information, see Overview of Single Configuration Files (11.x - 13.x).
For a sample SCF, see Cookbook in the PCF F5 Cookbook repository on GitHub.
For information about F5 iRules that might be useful when configuring an F5 load balancer for TAS for VMs, see the VMware Tanzu CF iRules For F5 repository on GitHub.