Using Cloud Templates to Change BIG-IP Versions - Google GCP
Introduction
This article will make use of F5 cloud templates on GitHub to modify the BIG-IP versions for your public cloud deployments in Google. This is part of an article series, so please review the “Concepts” as well as other articles within the series.
Modifying BIG-IP Templates for Google Cloud
This section will show you how to modify the BIG-IP version in Google deployments. The template deployment service in Google is called Google Deployment Manager.
There are a few methods I tested, and I’ll do a “How To” for each. Check the Appendix for additional examples.
- Use Latest Template Release (no edits required)
- Use Previous Template Release (no edits required)
- Edit Latest Template to Change BIG-IP Versions
- Edit Latest Template to Use Custom Uploaded Image
Note: At the time of this article, the "Latest" template release version for F5 cloud templates in Google is 3.5.0 and found under Tag 3.5.0 on GitHub. See Tag 3.5.0 Release Notes.
Option #1: Use Latest Template Release (no edits required)
This option lets you use templates without modification of code. Each release corresponds to a certain BIG-IP version (see Google GDM Template Matrix), and the template is hard coded with the selection of one BIG-IP version in Google F5 cloud templates. The latest template will deploy BIG-IP version 15.0.1.0 by default. You can change the BIG-IP version by supplying a different Google image in the imageName parameter. Here is an example to deploy BIG-IP version 14.1.2.3.
Search for Google images via gcloud CLI:
- Open your favorite terminal
- Enter a search filter. This filter will query the f5 vendor project.
- command = gcloud compute images list --project=f5-7626-networks-public | grep f5
- Find your desired image
- My example = BIG-IP 14.1.2.3 PAYG BEST
- You can filter further with basic CLI by adding “grep 14-1-2-3"
- If you want BYOL, then “grep” for “byol”
- Copy the image ID and save for later (my example f5-bigip-14-1-2-3-0-0-5-payg-best-1gbps-191218142340)
#Example image search and results gcloud compute images list --project=f5-7626-networks-public | grep f5 #Output similar to this... --snippet-- f5-bigip-13-1-3-2-0-0-4-payg-best-1gbps-20191105210022 f5-bigip-13-1-3-2-0-0-4-payg-best-200mbps-20191105210022 f5-bigip-13-1-3-2-0-0-4-byol-all-modules-2slot-20191105200157 ...and some more f5-bigip-14-1-2-3-0-0-5-byol-ltm-1boot-loc-191218142225 f5-bigip-14-1-2-3-0-0-5-payg-best-1gbps-191218142340 ...and more...
Deploy BIG-IP with custom image ID:
- Find your favorite BIG-IP template for Google. I’ll use the BIG-IP, standalone, 3nic, PAYG licensing (Tag 3.5.0)
- Review the entire README for installation instructions
- Download template files: py, schema, yaml
- Edit yaml file
- imageName = f5-bigip-14-1-2-3-0-0-5-payg-best-1gbps-191218142340
- Populate all remaining parameters
- Make sure all values in yaml are populated or commented (#)
- If values are commented, make sure schema contains defaults
- More details in my other article, Service Discovery in Google Gloud with BIG-IP
- Save file and deploy with your favorite method
- Google will validate the template and launch a BIG-IP running 14.1.2.3
#Example deploy using Google gcloud
gcloud deployment-manager deployments create my-f5-14-1-2 --config f5-existing-stack-payg-3nic-bigip.yaml
Easy right? Try another AMI ID search and launch the template again to get a v13.x, v14.x, or v15.x BIG-IP.
Option #2: Use Previous Template Release (no edits required)
If you don’t mind a previous template release (less fixes/features), AND you still don’t want to tweak template code, AND you still need a different BIG-IP version, AND the BIG-IP version is listed in the matrix then keep reading! Here is an example to deploy BIG-IP version 13.1.1.0.
Find a previous template release to deploy BIG-IP version you desire:
- Decide what BIG-IP version you need (my example 13.1.1.0)
- Check the Google GDM Template Matrix for BIG-IP
- Scroll down the list and you’ll see template release v2.2.0
- It allows “13.1.1”
- Click the link to review v2.2.0 template release notes
Deploy BIG-IP with previous template release:
- Find your favorite BIG-IP template for Google. I’ll use the BIG-IP, standalone, 3nic, PAYG licensing (Tag 2.2.0)
- Review the entire README for installation instructions
- Download template files: py, schema, yaml
- Edit yaml file
- imageName = f5-hourly-bigip-13-1-1-0-0-4-best-1gbps (see yaml file for available images)
- Populate all remaining parameters
- Make sure all values in yaml are populated or commented (#)
- If values are commented, make sure schema contains defaults
- More details in my other article, Service Discovery in Google Gloud with BIG-IP
- Save file and deploy with your favorite method
- Google will validate the template and launch a BIG-IP running 13.1.1.0
#Example deploy using Google gcloud gcloud deployment-manager deployments create my-f5-13-1-1 --config f5-existing-stack-payg-3nic-bigip.yaml
OK...we made it this far, but you still don’t see the BIG-IP version you need. Keep reading! In the next section, we’ll tweak some templates!
Option #3: Edit Latest Template to Change BIG-IP Versions (TBD)
This section is reserved for future use in situations where templates need to be modified in order to select a preferred BIG-IP version from public marketplace. In my testing, I have not yet found a scenario where a template edit is required. Therefore, this section is a place holder for potential future template hacks!
Note: Review the knowledge article F5 support for GitHub software for any questions pertaining to support of templates and modified templates.
Option #4: Edit Latest Template to Use Custom Uploaded Image
The final Google option allows you to upload or create your own BIG-IP images and reference those images in F5 cloud template deployments. There is an existing how-to doc on the F5 Image Generator GitHub for GCE repository explaining how to create a BIG-IP image for your Google environment. I’ll walk through the high-level steps of the article below. Then we'll review the deploy steps.
Note: Custom images only allow BYOL licensing.
Note: Review the knowledge article F5 support for GitHub software for any questions pertaining to support of templates and modified templates
Upload/Create Custom Image:
- Obtain an image file for the BIG-IP version you desire
- My example = 13.1.3.3
- Download image file from https://downloads.f5.com
- Use F5 Image Generator to make your own custom image
- Review entire "Prerequisites" section
- Create a virtual disk image locally
- Upload the virtual disk image to a GCE bucket
- Create the virtual machine image
- Save image name for later (my example f5-bigip-13-1-3-3-0-0-6-byol-ltm-1slot-a83bji8j2)
#Example image creation ./build-image -i BIGIP-13.1.3.3-0.0.6.iso -c config.yml -p gce -m ltm -b 1 #Output similar to this... ... qemu-system installing RTM Image -- start time: 01:58:44 qemu-system installing RTM Image -- elapsed time: 0:08:51 qemu-system performing selinux relabeling -- start time: 02:07:35 qemu-system performing selinux relabeling -- elapsed time: 0:02:10 ... ------======[ Finished disk generation for 'gce' 'ltm' '1' boot-locations. ]======------ Starting prepare cloud image 'f5-bigip-13-1-3-3-0-0-6-byol-ltm-1slot-a83bji8j2'. ... Finished prepare cloud image 'f5-bigip-13-1-3-3-0-0-6-byol-ltm-1slot-a83bji8j2'
Deploy custom BIG-IP image with latest template release:
- Find your favorite BIG-IP template for Google. I’ll use the BIG-IP, standalone, 3nic, BYOL licensing (Tag 3.5.0)
- Review the entire README for installation instructions
- Download template files: py, schema, yaml
- Edit python file
- **Refer to EXAMPLE EDITS code snippet below
- Replace project ID in sourceImage with your project ID
- Edit yaml file
- imageName = f5-bigip-13-1-3-3-0-0-6-byol-ltm-1slot-a83bji8j2
- Populate all remaining parameters
- Make sure all values in yaml are populated or commented (#)
- If values are commented, make sure schema contains defaults
- More details in my other article, Service Discovery in Google Gloud with BIG-IP
- Save file and deploy with your favorite method
- Google will validate the template and launch a BIG-IP running 13.1.3.3
#Example Edits for Option #4: Edit Latest Template to Use Custom Uploaded Image #original 'sourceImage': ''.join([COMPUTE_URL_BASE, 'projects/f5-7626-networks-public', '/global/images/', context.properties['imageName'], ]) #after edits 'sourceImage': ''.join([COMPUTE_URL_BASE, 'projects/myproject123', '/global/images/', context.properties['imageName'], ])
#Example deploy using Google gcloud gcloud deployment-manager deployments create my-f5-13-1-3 --config f5-existing-stack-byol-3nic-bigip.yaml
Summary
That is a wrap! There’s lots of info in this post, and I hope it makes your job easier in deciding what template to choose when deploying various versions of BIG-IP devices in the Google public cloud.
- Jeff_Giroux_F5Ret. Employee
Reach out with any questions. Have fun testing different versions!!