Using Cloud Templates to Change BIG-IP Versions - Azure
Introduction
This article will make use of F5 cloud templates on GitHub to modify the BIG-IP versions for your public cloud deployments in Azure. 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 Azure Cloud
This section will show you how to modify the BIG-IP version in Azure deployments. The template deployment service in Azure is called Azure Resource Manager.
There 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 Deploy BIG-IP Versions 12.x
- Use Latest Template to Deploy Custom BYOL Uploaded Image
Note: At the time of this article, the "Latest" template release version for F5 cloud templates in Azure is 9.4.0.0 and found under Tag 9.4.0.0 on GitHub. See Tag 9.4.0.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 Azure ARM Template Matrix), and the template is hard coded with the selection of one default BIG-IP version in Azure F5 cloud templates using variable bigIpVersion. The latest template can deploy BIG-IP versions 15.1 (default), 14.1, and "latest" which is 16.0 at the time of this article. If one of these versions are your version of choice, great! This section is for you. Here is an example to deploy BIG-IP version 14.1.4.2.
Deploy BIG-IP with latest template release:
- Find your favorite BIG-IP template for Azure. I’ll use the BIG-IP, standalone, 3nic, PAYG licensing (Tag 9.4.0.0)
- Review the entire README for installation instructions
- Download template "azuredeploy.json" and parameters "azuredeploy.parameters.json"
- Edit parameters file
- bigIpVersion = 14.1.402000
- Populate all remaining parameters
- Save file and deploy with your favorite method
- Azure will validate the template and launch a BIG-IP running 14.1.4.2
#Example deploying using Azure CLI az group deployment create -n myDeployment -g myRG1 \ --template-file azuredeploy.json \ --parameters @azuredeploy.parameters.json \ --parameters bigIpVersion=14.1.402000
Note: If you need to specify a more exact version or flavor of BIG-IP, try modifying the parameter customImageUrn. You can find available values in the Azure Offer List, so pick one that matches your deployment requirements and licensing model. For example, 1Gb Best PAYG 14.1.4.2 would be f5-networks:f5-big-ip-best:f5-bigip-virtual-edition-1g-best-hourly:14.1.402000.
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 Azure ARM Template Matrix for BIG-IP
- Scroll down the list and you’ll see template release v7.0.0.2
- It allows “latest, 14.1.003000, 13.1.100000”
- Click the link to review v7.0.0.2 template release notes
Deploy BIG-IP with previous template release:
- Find your favorite BIG-IP template for Azure. I’ll use the BIG-IP, standalone, 3nic, PAYG licensing (Tag 7.0.0.2)
- Review the entire README for installation instructions
- Download template "azuredeploy.json" and parameters "azuredeploy.parameters.json"
- Edit parameters file
- bigIpVersion = 13.1.100000
- Populate all remaining parameters
- Save file and deploy with your favorite method
- Azure will validate the template and launch a BIG-IP running 13.1.1.0
#Example deploying using Azure CLI az group deployment create -n myDeployment -g myRG1 \ --template-file azuredeploy.json \ --parameters @azuredeploy.parameters.json \ --parameters bigIpVersion=13.1.100000
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 Deploy BIG-IP Versions 12.x
So far, I have addressed using the different templates to deploy BIG-IP various versions. The same concept can also work to deploy a version 12.x BIG-IP assuming the image is still available in the marketplace. We’ll use the latest template version, make some minor edits to the code, and deploy the BIG-IP. First, we need to make sure the version number is available in marketplace. Here is an example to deploy BIG-IP version 12.1.5.3.
Note: Version 12.x BIG-IP uses an older Azure WAAgent, and requires a specific management route
Note: Review the knowledge article F5 support for GitHub software for any questions pertaining to support of templates and modified templates.
Search for Azure image via Azure CLI:
- Open your favorite terminal
- Enter a search filter. Use “big-ip” as the starting filter value
- command = az vm image list -f big-ip --all
- Scroll through the list and find an available version for your specific BIG-IP flavor
- My desired version example = 12.1.5.3
- My desired “flavor” = Best (all modules), 1Gb throughput, PAYG (hourly)
- Copy the “version” value and save for later (my example 12.1.503000)
#Example search and results az vm image list -f big-ip --all #Output similar to this... …lots of images are listed { "offer": "f5-big-ip-best", "publisher": "f5-networks", "sku": "f5-bigip-virtual-edition-1g-best-hourly", "urn": "f5-networks:f5-big-ip-best:f5-bigip-virtual-edition-1g-best-hourly:12.1.503000", "version": "12.1.503000" },
Deploy BIG-IP with edited latest template release:
- Find your favorite BIG-IP template for Azure. I’ll use the BIG-IP, standalone, 3nic, PAYG licensing (Tag 9.4.0.0)
- Review the entire README for installation instructions
- Download template "azuredeploy.json" and parameters "azuredeploy.parameters.json"
- Edit template file
- **Refer to EXAMPLE EDITS code snippet below
- Replace value of routeCmd with a management route for waagent
- Edit parameters file
- bigIpVersion = 12.1.503000
- Populate all remaining parameters
- Save file and deploy with your favorite method
- Azure will validate the template and launch a BIG-IP running 12.1.5.3
#Example deploying using Azure CLI az group deployment create -n myDeployment -g myRG1 \ --template-file azuredeploy.json \ --parameters @azuredeploy.parameters.json \ --parameters bigIpVersion=12.1.503000
#Example Edits for Option #3: Edit Latest Template to Deploy BIG-IP Versions 12.x ############## ## routeCmd ## ############## #original "routeCmd": "route", #after replacing with mgmt route for WA agent "routeCmd": "[concat('tmsh create sys management-route waagent_route network 168.63.129.16/32 gateway ', variables('mgmtRouteGw'), '; tmsh save sys config')]",
Note: If you need to specify a more exact version or flavor of BIG-IP, try modifying the parameter customImageUrn. You can find available values in the Azure Offer List, so pick one that matches your deployment requirements and licensing model. For example, 1Gb Best PAYG 12.1.5.3 would be f5-networks:f5-big-ip-best:f5-bigip-virtual-edition-1g-best-hourly:12.1.503000.
Option #4: Use Latest Template to Deploy Custom BYOL Uploaded Image
The final Azure 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 F5 CloudDocs explaining how to upload a VHD to your Azure environment. Review first “When You Don’t Have Azure Marketplace Access”. I’ll walk through the high-level steps of the article below. Then we'll review the deploy steps which require another JSON code edit.
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 a VHD image file for the BIG-IP version you desire
- My example = 13.1.3.2
- Download VHD file from https://downloads.f5.com and upload as-is
- Or...you can use F5 Image Generator too to make your own custom image
- Untar the Azure-F5_Networks-xxxxxx.tar.gz file (will result in single VHD file)
- Create Azure Storage account and container
- Recommend creating a folder in your storage container like “f5-images”
- Upload VHD file to Azure Storage
- Click the VHD file to review properties
- Copy the URL and save for later (my example https://<storage-account>.blob.core.windows.net/f5-images/F5_Networks-13.1.3.2-0.0.4-BYOL-_.vhd)
The customImage parameter in the F5 cloud templates can reference the VHD URL value, or the templates can reference an Azure Image resourceID. Read the next “Optional” section to create an Azure Image. Otherwise, skip to “Deploy Custom BIG-IP Image with Latest Template”.
Note: If you don’t create an Azure Image resource prior to deployment, the templates will automatically create an Azure Image (source = VHD file) in the same resource group.
Optional - Create Azure Image from VHD File via Azure CLI:
- Create Azure Image
- command = az image create --name xxxx --resource-group xxxx --os-type Linux --source https://xxxx/file.vhd
- Copy the “id” value and save for later (my example /subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourceGroups/myRG1/providers/Microsoft.Compute/images/F5_Networks-13.1.3.2-0.0.4-BYOL-2slot)
#Example image create and results az image create --name F5_Networks-13.1.3.2-0.0.4-BYOL-2slot \ --resource-group myRG1 \ --os-type Linux \ --source https://mystorage123.blob.core.windows.net/f5-images/F5_Networks-13.1.3.2-0.0.4-BYOL-_.vhd #Output similar to this... { "hyperVgeneration": "V1", "id": "/subscriptions/xxxx/resourceGroups/myRG1/providers/Microsoft.Compute/images/F5_Networks-13.1.3.2-0.0.4-BYOL-2slot",
Deploy custom BIG-IP image with latest template release:
- Find your favorite BIG-IP template for Azure. I’ll use the BIG-IP, standalone, 3nic, BYOL licensing (Tag 9.4.0.0)
- Review the entire README for installation instructions
- Download template "azuredeploy.json" and parameters "azuredeploy.parameters.json"
- Edit parameters file
- bigIpVersion = 13.1.302000
- customImage = /subscriptions/xxxx/resourceGroups/myRG1/providers/Microsoft.Compute/images/F5_Networks-13.1.3.2-0.0.4-BYOL-2slot
- Populate all remaining parameters
- Save file and deploy with your favorite method
- Azure will validate the template and launch a BIG-IP running 13.1.3.2
#Example deploying using Azure CLI az group deployment create -n myDeployment -g myRG1 \ --template-file azuredeploy.json \ --parameters @azuredeploy.parameters.json \ --parameters bigIpVersion=13.1.302000
You can use the customImage method to also deploy a version 12.x that you download from https://downloads.f5.com or create with F5 Image Generator.
Note: If you decide to use a v12.x BIG-IP image, make sure to review the Appendix Option 4a section for an example on how to modify the routes as required by v12.x and the Azure WAAgent in the routeCmd variable.
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 Azure public cloud.
Appendix
Option #4a: Edit Latest Template to Deploy Custom BYOL Uploaded Image 12.x
The same method in Option #4 “Use Latest Template to Deploy Custom Uploaded Image” can also work to deploy a version 12.1.x BIG-IP version that you download from F5 Downloads and upload as BYOL. I’ll summarize the steps here since the full steps are already listed in Option #4.
Note: Custom images only allow BYOL licensing.
Note: Version 12.1.x BIG-IP uses an older Azure WAAgent, and requires a specific management route as illustrated by the routeCmd.
- Download BIG-IP v12.x version from Azure folder on https://downloads.f5.com
- My example LTM/DNS 1 boot slot = Azure-F5_Networks-BIGIP-12.1.5.30.0.5-size_45GB.vhd.tar.gz
- Untar file, upload resulting VHD file to Azure storage
- My example = F5_Networks-BIGIP-12.1.5-30.0.5-size_45GB.vhd
- Select newly uploaded VHD file, review properties, save VHD URL for later
- My example = https://<storage-account>.blob.core.windows.net/f5-images/F5_Networks-BIGIP-12.1.5-30.0.5-size_45GB.vhd
- Optionally...create Azure Image from VHD and save resourceID for later
- My example = /subscriptions/xxxx/resourceGroups/myRG1/providers/Microsoft.Compute/images/F5_Networks-12.1.5-30.0.5-BYOL-2slot
- Find your favorite BIG-IP template for Azure. I’ll use the BIG-IP, standalone, 3nic, BYOL licensing (Tag 9.4.0.0)
- Review the entire README for installation instructions
- Download template "azuredeploy.json" and parameters "azuredeploy.parameters.json"
- Edit template file
- **Refer to EXAMPLE EDITS code snippet below
- Replace value of routeCmd with a management route for waagent
- Edit parameters file
- bigIpVersion = 12.1.503000
- customImage = /subscriptions/xxxx/resourceGroups/myRG1/providers/Microsoft.Compute/images/F5_Networks-12.1.5-30.0.5-BYOL-2slot
- Populate all remaining parameters
- Save file and deploy with your favorite method
- Azure will validate the template and launch a BIG-IP running 12.1.5.3
#Example deploying using Azure CLI az group deployment create -n myDeployment -g myRG1 \ --template-file azuredeploy.json \ --parameters @azuredeploy.parameters.json \ --parameters bigIpVersion=12.1.503000
#Example Edits for Option #4a: Edit Latest Template to Deploy Custom Uploaded Image 12.x ############## ## routeCmd ## ############## #original "routeCmd": "route", #after replacing with mgmt route for WA agent "routeCmd": "[concat('tmsh create sys management-route waagent_route network 168.63.129.16/32 gateway ', variables('mgmtRouteGw'), '; tmsh save sys config')]",
- Former Member
Excellent article! If you find that the json output is too much to search through, you can also export the available instances in a table:
az vm image list --publisher f5-networks --all --output table
again, thanks for the post!
Cheers,
Jon
- Jeff_Giroux_F5Ret. Employee
One cloud article down...two more articles to go. Look for AWS and Google "How To" steps later this week!