on 27-Apr-2020 11:51
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.
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.
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.
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:
#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.
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:
Deploy BIG-IP with previous template release:
#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!
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:
#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:
#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.
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:
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:
#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:
#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.
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.
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.
#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')]",
One cloud article down...two more articles to go. Look for AWS and Google "How To" steps later this week!
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