Skip to content

Commit eae9d49

Browse files
authored
Refine migration script documentation for clarity
Updated formatting and clarified parameters for the migration script in the documentation. Signed-off-by: MJyot <[email protected]>
1 parent 6f1d867 commit eae9d49

1 file changed

Lines changed: 54 additions & 51 deletions

File tree

articles/application-gateway/migrate-v1-v2.md

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This is the new experience that offers an improved migration experience by:
5656

5757
You can **download** the Enhanced cloning script from the [PowerShell Gallery](https://www.powershellgallery.com/packages/AzureAppGWClone).
5858

59-
**Parameters for the script:**
59+
**Parameters for the script:**
6060
This script takes below parameters:
6161
- **AppGw V1 ResourceId -Required**: This parameter is the Azure Resource ID for your existing Standard V1 or WAF V1 gateway. To find this string value, navigate to the Azure portal, select your application gateway or WAF resource, and click the **Properties** link for the gateway. The Resource ID is located on that page.
6262
You can also run the following Azure PowerShell commands to get the Resource ID:
@@ -105,12 +105,12 @@ To run the script:
105105
-publicIpResourceId "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MyPublicIP" `
106106
-enableAutoScale
107107
```
108-
### Recommendations
108+
### Recommendations
109109
* After script completion, review the V2 gateway configuration in the Azure portal and test connectivity by sending traffic directly to the V2 gateway’s IP.
110-
* The script relaxes backend TLS validation by default (no cert chain, expiry, or SNI validation) during cloning.If stricter TLS validation or authentication certificates are required customer can update their Application Gateway V2 post creation to add trusted root certificates and enable this feature as per their requirement.
110+
* The script relaxes backend TLS validation by default (no cert chain, expiry, or SNI validation) during cloning. If stricter TLS validation or authentication certificates are required customer can update their Application Gateway V2 post creation to add trusted root certificates and enable this feature as per their requirement.
111111
* For NTLM/Kerberos passthrough, set the dedicated backend connection to "true" in HTTP settings after cloning.
112112

113-
### Caveats
113+
### Caveats
114114
* You must provide an IP address space for another subnet within your virtual network where your V1 gateway is located. The script can't create the V2 gateway in a subnet that already has a V1 gateway. If the subnet already has a V2 gateway the script might still work, provided enough IP address space is available.
115115
* If you have a network security group or user defined routes associated to the V2 gateway subnet, make sure they adhere to the [NSG requirements](../application-gateway/configuration-infrastructure.md#network-security-groups) and [UDR requirements](../application-gateway/configuration-infrastructure.md#supported-user-defined-routes) for a successful migration
116116
* If you have FIPS mode enabled for your V1 gateway, it isn't migrated to your new V2 gateway.
@@ -138,48 +138,38 @@ To run the script:
138138
```
139139
4. Install the script by following the steps-[Install Script](../application-gateway/migrate-v1-v2.md#installing-the-script)
140140
5. Run `Get-Help AzureAppGWMigration.ps1` to examine the required parameters:
141-
```
142-
AzureAppGWMigration.ps1
143-
-resourceId <V1 application gateway Resource ID>
144-
-subnetAddressRange <subnet space you want to use>
145-
-appgwName <string to use to append>
146-
-AppGWResourceGroupName <resource group name you want to use>
147-
-sslCertificates <comma-separated SSLCert objects as above>
148-
-trustedRootCertificates <comma-separated Trusted Root Cert objects as above>
149-
-privateIpAddress <private IP string>
150-
-publicIpResourceId <public IP name string>
151-
-validateMigration -enableAutoScale
152-
```
153-
**Parameters for the script:**
154141

155-
* **resourceId: [String]: Required**: This parameter is the Azure Resource ID for your existing Standard V1 or WAF V1 gateway. To find this string value, navigate to the Azure portal, select your application gateway or WAF resource, and click the **Properties** link for the gateway. The Resource ID is located on that page.
142+
**Parameters for the script:**
143+
144+
The legacy script takes below parameters:
145+
146+
* **resourceId: [String]: Required**: This parameter is the Azure Resource ID for your existing Standard V1 or WAF V1 gateway. To find this string value, navigate to the Azure portal, select your application gateway or WAF resource, and click the **Properties** link for the gateway. The Resource ID is located on that page.
156147
You can also run the following Azure PowerShell commands to get the Resource ID:
157148
```azurepowershell
158149
$appgw = Get-AzApplicationGateway -Name <V1 gateway name> -ResourceGroupName <resource group Name>
159150
$appgw.Id
160151
```
161-
* **subnetAddressRange: [String]: Required**: This parameter is the IP address space that you've allocated (or want to allocate) for a new subnet that contains your new V2 gateway. The address space must be specified in the CIDR notation. For example: 10.0.0.0/24. You don't need to create this subnet in advance but the CIDR needs to be part of the VNET address space. The script creates it for you if it doesn't exist and if it exists, it uses the existing one (make sure the subnet is either empty, contains only V2 Gateway if any, and has enough available IPs).
162-
* **appgwName: [String]: Optional**. This is a string you specify to use as the name for the new Standard_V2 or WAF_V2 gateway. If this parameter isn't supplied, the name of your existing V1 gateway is used with the suffix *_V2* appended.
163-
* **AppGWResourceGroupName: [String]: Optional**. Name of resource group where you want V2 Application Gateway resources to be created (default value is `<V1-app-gw-rgname>`)
152+
* **subnetAddressRange: [String]: Required**: This parameter is the IP address space that you've allocated (or want to allocate) for a new subnet that contains your new V2 gateway. The address space must be specified in the CIDR notation. For example: 10.0.0.0/24. You don't need to create this subnet in advance but the CIDR needs to be part of the VNET address space. The script creates it for you if it doesn't exist and if it exists, it uses the existing one (make sure the subnet is either empty, contains only V2 Gateway if any, and has enough available IPs).
153+
* **appgwName: [String]: Optional**. This is a string you specify to use as the name for the new Standard_V2 or WAF_V2 gateway. If this parameter isn't supplied, the name of your existing V1 gateway is used with the suffix *_V2* appended.
154+
* * **AppGWResourceGroupName: [String]: Optional**. Name of resource group where you want V2 Application Gateway resources to be created (default value is `<V1-app-gw-rgname>`)
164155
165156
> [!NOTE]
166157
> Ensure that there's no existing Application gateway with the provided AppGW V2 Name and Resource group name in V1 subscription. This rewrites the existing resources.
167158
168-
* **sslCertificates: [PSApplicationGatewaySslCertificate]: Optional**. A comma-separated list of PSApplicationGatewaySslCertificate objects that you create to represent the TLS/SSL certs from your V1 gateway must be uploaded to the new V2 gateway. For each of your TLS/SSL certs configured for your Standard V1 or WAF V1 gateway, you can create a new PSApplicationGatewaySslCertificate object via the `New-AzApplicationGatewaySslCertificate` command shown here. You need the path to your TLS/SSL Cert file and the password.
169-
This parameter is only optional if you don't have HTTPS listeners configured for your V1 gateway or WAF. If you have at least one HTTPS listener setup, you must specify this parameter.
170-
```azurepowershell
171-
$password = ConvertTo-SecureString <cert-password> -AsPlainText -Force
172-
$mySslCert1 = New-AzApplicationGatewaySslCertificate -Name "Cert01" `
173-
-CertificateFile <Cert-File-Path-1> `
174-
-Password $password
175-
$mySslCert2 = New-AzApplicationGatewaySslCertificate -Name "Cert02" `
176-
-CertificateFile <Cert-File-Path-2> `
177-
-Password $password
178-
```
179-
You can pass in `$mySslCert1, $mySslCert2` (comma-separated) in the previous example as values for this parameter in the script.
180-
181-
* **sslCertificates from Keyvault: Optional**. You can download the certificates stored in Azure Key Vault and pass it to migration script. To download the certificate as a PFX file, run following command. These commands access SecretId, and then save the content as a PFX file.
182-
```azurepowershell
159+
* **sslCertificates: [PSApplicationGatewaySslCertificate]: Optional**. A comma-separated list of PSApplicationGatewaySslCertificate objects that you create to represent the TLS/SSL certs from your V1 gateway must be uploaded to the new V2 gateway. For each of your TLS/SSL certs configured for your Standard V1 or WAF V1 gateway, you can create a new PSApplicationGatewaySslCertificate object via the `New-AzApplicationGatewaySslCertificate` command shown here. You need the path to your TLS/SSL Cert file and the password.
160+
This parameter is only optional if you don't have HTTPS listeners configured for your V1 gateway or WAF. If you have at least one HTTPS listener setup, you must specify this parameter.
161+
```azurepowershell
162+
$password = ConvertTo-SecureString <cert-password> -AsPlainText -Force
163+
$mySslCert1 = New-AzApplicationGatewaySslCertificate -Name "Cert01" `
164+
-CertificateFile <Cert-File-Path-1> `
165+
Password $password
166+
$mySslCert2 = New-AzApplicationGatewaySslCertificate -Name "Cert02" `
167+
-CertificateFile <Cert-File-Path-2> `
168+
-Password $password
169+
```
170+
You can pass in `$mySslCert1, $mySslCert2` (comma-separated) in the previous example as values for this parameter in the script.
171+
* **sslCertificates from Keyvault: Optional**. You can download the certificates stored in Azure Key Vault and pass it to migration script. To download the certificate as a PFX file, run following command. These commands access SecretId, and then save the content as a PFX file.
172+
```azurepowershell
183173
$vaultName = ConvertTo-SecureString <kv-name> -AsPlainText -Force
184174
$certificateName = ConvertTo-SecureString <cert-name> -AsPlainText -Force
185175
$password = ConvertTo-SecureString <password> -AsPlainText -Force
@@ -190,29 +180,42 @@ To run the script:
190180
$pfxFileByte = $x509Cert.Export([Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $password)
191181
# Write to a file
192182
[IO.File]::WriteAllBytes("KeyVaultcertificate.pfx", $pfxFileByte)
193-
```
194-
For each of the cert downloaded from the Keyvault, you can create a new PSApplicationGatewaySslCertificate object via the New-AzApplicationGatewaySslCertificate command shown here. You need the path to your TLS/SSL Cert file and the password.
183+
```
184+
185+
For each of the cert downloaded from the Keyvault, you can create a new PSApplicationGatewaySslCertificate object via the New-AzApplicationGatewaySslCertificate command shown here. You need the path to your TLS/SSL Cert file and the password.
195186
```azurepowershell
196187
//Convert the downloaded certificate to SSL object
197188
$password = ConvertTo-SecureString <password> -AsPlainText -Force
198189
$cert = New-AzApplicationGatewaySSLCertificate -Name <certname> -CertificateFile <Cert-File-Path-1> -Password $password
199190
```
200-
* **trustedRootCertificates: [PSApplicationGatewayTrustedRootCertificate]: Optional**. A comma-separated list of PSApplicationGatewayTrustedRootCertificate objects that you create to represent the [Trusted Root certificates](ssl-overview.md) for authentication of your backend instances from your v2 gateway.
191+
* **trustedRootCertificates: [PSApplicationGatewayTrustedRootCertificate]: Optional**. A comma-separated list of PSApplicationGatewayTrustedRootCertificate objects that you create to represent the [Trusted Root certificates](ssl-overview.md) for authentication of your backend instances from your v2 gateway.
201192
```azurepowershell
202193
$certFilePath = ".\rootCA.cer"
203194
$trustedCert = New-AzApplicationGatewayTrustedRootCertificate -Name "trustedCert1" -CertificateFile $certFilePath
204195
```
205196
To create a list of PSApplicationGatewayTrustedRootCertificate objects, see [New-AzApplicationGatewayTrustedRootCertificate](/powershell/module/Az.Network/New-AzApplicationGatewayTrustedRootCertificate).
206-
* **privateIpAddress: [String]: Optional**. A specific private IP address that you want to associate to your new V2 gateway. This must be from the same VNet that you allocate for your new V2 gateway. If this isn't specified, the script allocates a private IP address for your V2 gateway.
207-
* **publicIpResourceId: [String]: Optional**. The resourceId of existing public IP address (standard SKU) resource in your subscription that you want to allocate to the new V2 gateway. If public Ip resource name is provided, ensure that it exists in succeeded state.
197+
* **privateIpAddress: [String]: Optional**. A specific private IP address that you want to associate to your new V2 gateway. This must be from the same VNet that you allocate for your new V2 gateway. If this isn't specified, the script allocates a private IP address for your V2 gateway.
198+
* **publicIpResourceId: [String]: Optional**. The resourceId of existing public IP address (standard SKU) resource in your subscription that you want to allocate to the new V2 gateway. If public Ip resource name is provided, ensure that it exists in succeeded state.
208199
If this isn't specified, the script allocates a new public IP address in the same resource group. The name is the V2 gateway's name with *-IP* appended. If AppGWResourceGroupName is provided and a public IP address isn't provided, ensure that public IP resource with name AppGWV2Name-IP doesn’t exist in a resource group with the name AppGWResourceGroupName in the V1 subscription.
209-
* **validateMigration: [switch]: Optional**. Use this parameter to enable the script to do some basic configuration comparison validations after the V2 gateway creation and the configuration copy. By default, no validation is done.
210-
* **enableAutoScale: [switch]: Optional**. Use this parameter to enable the script to enable autoscaling on the new V2 gateway after it's created. By default, autoscaling is disabled. You can always manually enable it later on the newly created V2 gateway.
211-
5. Run the script using the appropriate parameters. It may take five to seven minutes to finish.
200+
* **validateMigration: [switch]: Optional**. Use this parameter to enable the script to do some basic configuration comparison validations after the V2 gateway creation and the configuration copy. By default, no validation is done.
201+
* **enableAutoScale: [switch]: Optional**. Use this parameter to enable the script to enable autoscaling on the new V2 gateway after it's created. By default, autoscaling is disabled. You can always manually enable it later on the newly created V2 gateway.
202+
6. Run the script using the appropriate parameters. It may take five to seven minutes to finish.
203+
```
204+
AzureAppGWMigration.ps1
205+
-resourceId <V1 application gateway Resource ID>
206+
-subnetAddressRange <subnet space you want to use>
207+
-appgwName <string to use to append>
208+
-AppGWResourceGroupName <resource group name you want to use>
209+
-sslCertificates <comma-separated SSLCert objects as above>
210+
-trustedRootCertificates <comma-separated Trusted Root Cert objects as above>
211+
-privateIpAddress <private IP string>
212+
-publicIpResourceId <public IP name string>
213+
-validateMigration -enableAutoScale
214+
```
212215
213216
**Example**
214217
```azurepowershell
215-
AzureAppGWMigration.ps1 `
218+
AzureAppGWMigration.ps1 `
216219
-resourceId /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/MyResourceGroup/providers/Microsoft.Network/applicationGateways/myv1appgateway `
217220
-subnetAddressRange 10.0.0.0/24 `
218221
-appgwname "MynewV2gw" `
@@ -227,7 +230,7 @@ To run the script:
227230

228231
* The new V2 gateway has new public and private IP addresses. It isn't possible to move the IP addresses associated with the existing V1 gateway seamlessly to V2. However, you can allocate an existing (unallocated) public or private IP address to the new V2 gateway.
229232
* You must provide an IP address space for another subnet within your virtual network where your V1 gateway is located. The script can't create the V2 gateway in a subnet that already has a V1 gateway. If the subnet already has a V2 gateway the script might still work, provided enough IP address space is available.
230-
* If you have a network security group or user defined routes associated to the V2 gateway subnet, make sure they adhere to the [NSG requirements](../application-gateway/configuration-infrastructure.md#network-security-groups) and [UDR requirements](../application-gateway/configuration-infrastructure.md#supported-user-defined-routes) for a successful migration
233+
* If you have a network security group or user defined routes associated to the V2 gateway subnet, make sure they adhere to the [NSG requirements](../application-gateway/configuration-infrastructure.md#network-security-groups) and [UDR requirements](../application-gateway/configuration-infrastructure.md#supported-user-defined-routes) for a successful migration.
231234
* [Virtual network service endpoint policies](../virtual-network/virtual-network-service-endpoint-policies-overview.md) are currently not supported in an Application Gateway subnet.
232235
* To migrate a TLS/SSL configuration, you must specify all the TLS/SSL certs used in your V1 gateway.
233236
* If you have FIPS mode enabled for your V1 gateway, it isn't migrated to your new V2 gateway.
@@ -253,9 +256,9 @@ To use this option, you must not have the Azure Az modules installed on your com
253256

254257
Run the script with the following command to get the latest version:
255258

256-
For enhanced cloning script - `Install-Script -Name AzureAppGWClone -Force`
259+
* For enhanced cloning script - `Install-Script -Name AzureAppGWClone -Force`
257260

258-
For the legacy cloning script - `Install-Script -Name AzureAppGWMigration -Force`
261+
* For the legacy cloning script - `Install-Script -Name AzureAppGWMigration -Force`
259262

260263
This command also installs the required Az modules.
261264

@@ -270,8 +273,8 @@ For the legacy cloning script, Version 1.0.11 is the new version of the migratio
270273
#### How to check the version of the downloaded script
271274

272275
To check the version of the downloaded script the steps are as follows:
273-
* Extract the contents of the NuGet package.
274-
* Open the `.PS1` file in the folder and check the `.VERSION` on top to confirm the version of the downloaded script
276+
1. Extract the contents of the NuGet package.
277+
2. Open the `.PS1` file in the folder and check the `.VERSION` on top to confirm the version of the downloaded script
275278
```
276279
<#PSScriptInfo
277280
.VERSION 1.0.10
@@ -316,7 +319,7 @@ AzureAppGWIPMigrate.ps1
316319
-v1resourceId /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/MyResourceGroup/providers/Microsoft.Network/applicationGateways/myv1appgateway `
317320
-v2resourceId /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/MyResourceGroup/providers/Microsoft.Network/applicationGateways/myv2appgateway `
318321
```
319-
Once the IP swap is complete, customers should check control and data plane operations on the V2 gateway. All control plane actions except Delete will be disabled on the V1 gateway.,
322+
Once the IP swap is complete, customers should check control and data plane operations on the V2 gateway. All control plane actions except Delete will be disabled on the V1 gateway.
320323
> [!NOTE]
321324
> During IP migration, don't attempt any other operation on the V1 & V2 gateway or any associated resources.
322325

0 commit comments

Comments
 (0)