/f5-warm-pool-demo

A basic demonstration of using warm pool and lifecycle events to speed up and streamline the scaling of BIG-IP instances in AWS.

Primary LanguageHCL

F5 Warm Pool Demo

A basic demonstration of using warm pool and lifecycle events to speed up and streamline the scaling of BIG-IP instances in AWS. The accompanying DevCentral article for this repository can be found here Architecture diagram

Getting Started

To provision the demo infrastructure defined in this repository, you will need a current version of HashiCorp Terraform and working AWS Access Key and Access Secret

Once installed, clone down this repository and provision the infrastructure using Terraform by running the following command in the repository's root directory:

$ terraform apply

The template will use PAYG or AWS pay-as-you-go licensing by default. To use BYOL licensing with BIG-IQ, create a Terraform variables file in the repoitory's root directory called terraform.tfvars and populate the file with the following variables:

license_type                   = "BYOL"
bigiq_server                   = "(Your BIG-IQ Instance's hostname or IP)"
bigiq_license_pool_name        = "(Name of BIG-IQ license pool being used to license BIG-IP)"
bigiq_username_secret_location = "(Username to authenticate into BIG-IQ and get license)"
bigiq_password_secret_location = "(Password to authenticate into BIG-IQ and get license)"

What gets built?

As part of the Terraform template, here is a high level overview of what is provisioned:

  • VPC with a private and public subnet.
  • AWS Managed NAT Gateway
  • EC2 Auto Scaling Group containing 3x F5 BIG-IP VEs. 1 of 3 BIG-IPs is part of the warm pool and stopped by default.
  • NLB to load balance across Auto Scaling Group instances.
  • SNS topic to handle Auto Scaling Group lifecycle hooks.
  • Lambda function to handle and process lifecycle events sent by SNS.
  • S3 bucket to store F5 AS3 configurations.
  • A bunch of IAM policies and roles to provide permissions across the various AWS services utilized.
  • A couple security group to enable network communicate of AWS services and F5 BIG-IP.

Requirements

Name Version
terraform >= 0.15.1
aws >= 3.27.0
random >= 3.1.0
template >= 2.2.0

Providers

Name Version
aws 3.42.0

Modules

Name Source Version
vpc terraform-aws-modules/vpc/aws 3.0.0
bigip_1arm_autoscale ./modules/bigip-1arm-autoscale n/a
nginx ./modules/nginx n/a

Resources

Name Type
aws_availability_zones.available data source

Inputs

Name Description Type Default
name_prefix n/a string "default"
owner The name of the owner that will be tagged to the provisioned resources. string null
key_pair Name of AWS key pair to be used to access EC2 instances. string null
license_type Type of license used to license BIG-IP instances. BYOL or PAYG string "PAYG"
bigiq_server Hostname or IP address of BIG-IQ server used to license BYOL BIG-IP instances. string ""
bigiq_license_pool_name Name of BIG-IQ license pool used to license BYOL instances. string "default_pool"
bigiq_username_secret_location Name of AWS Secrets Manager secret that contains the username used to license BYOL instances. string "bigiq_username"
bigiq_password_secret_location Name of AWS Secrets Manager secret that contains the password used to license BYOL instances. string "bigiq_password"
desired_capacity Desired number of BIG-IPs in autoscale group number 2
max_size Maximum number of BIG-IPs in autoscale group number 5
min_size Minimum number of BIG-IPs in autoscale group number 1

Outputs

Name Description
bigip_admin_username n/a
bigip_admin_password n/a