F5Networks / f5-azure-arm-templates-v2

Azure Resource Manager Templates for quickly deploying BIG-IP services in Azure
22 stars 45 forks source link

Selection of availability zones in failover ARM template #21

Closed aitg-ap closed 1 year ago

aitg-ap commented 1 year ago

I have a customer looking to deploy an HA cluster across multiple availability zones such as member 1 in zone 3 and member 2 in zone 2. The current failover arm template only supports a boolean logic value of true/false and if true is selected zone 1 is the only option.

Can this failover arm template be updated to support the deployment of the VMs across zones 1, 2 or 3?

mikeshimkus commented 1 year ago

Hi @aitg-ap, this can be accomplished now by editing the zone passed by the parent template here: https://github.com/F5Networks/f5-azure-arm-templates-v2/blob/9a977c99267a6daf874b4494b430a7c33878d78b/examples/failover/azuredeploy.json#L616

And here: https://github.com/F5Networks/f5-azure-arm-templates-v2/blob/9a977c99267a6daf874b4494b430a7c33878d78b/examples/failover/azuredeploy.json#L730

Since this is a change to the parent template, you wouldn't need to host customized templates anywhere; you can use the UI or Azure CLI (using the --template-file flag instead of --template-uri) when deploying.

aitg-ap commented 1 year ago

Thanks. In this template it seems like there is no definition of what subnet or vnet parameters should be used vs. the azuredeploy-existing-network.json template we currently using. For the failover/azuredeploy.json template we want to use to select availability zones, where do we define these network parameters? If it's auto populating, what values the template generating?

mikeshimkus commented 1 year ago

That's correct, when using the full stack template (azuredeploy.json) the vnet/subnet settings are defined as template variables here: https://github.com/F5Networks/f5-azure-arm-templates-v2/blob/9a977c99267a6daf874b4494b430a7c33878d78b/examples/failover/azuredeploy.json#L215

Which are passed to the network module to create the resources: https://github.com/F5Networks/f5-azure-arm-templates-v2/tree/main/examples/modules/network.

To change the network address of the vNet, you would update the vNetPrefix variable (and the template input params for IP addresses such as bigIpExternalSelfIp01).

shyawnkarim commented 1 year ago

Closing. Please open another issue if more assistance is needed.