You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/migrate-stv1-to-stv2-vnet.md
+90-12Lines changed: 90 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,11 @@ This article provides steps to migrate an API Management instance hosted on the
18
18
19
19
For this scenario, you have the following migration options:
20
20
21
-
* Use the [Migrate to stv2](/rest/api/apimanagement/current-ga/api-management-service/migratetostv2) REST API. The REST API migrates the instance in-place using the instances's existing subnet configuration. Currently, for instances in external mode, you can also choose to preserve the instance's VIP address (or addresses) during migration.
21
+
* Use the [Migrate to stv2](/rest/api/apimanagement/current-ga/api-management-service/migratetostv2) REST API. The REST API migrates the instance in-place using the instances's existing subnet configuration. You can choose whether the API Management instance's original VIP address(es) is preserved (recommended) or whether a new VIP address will be generated.
22
22
23
-
* Use the **Platform migration** blade in the Azure portal. Currently, using the portal, you migrate your instance in-place but must specify a different subnet in the same or a different VNet. After migration, optionally migrate back to the instance's original subnet. The migration process changes the VIP address(es) of the instance. After migration, you need to update any network dependencies including DNS, firewall rules, and VNets to use the new VIP address(es).
23
+
With this option, the `stv1` compute is deleted permanently after the migration is complete, with no option to retain it temporarily.
24
+
25
+
* Use the **Platform migration** blade in the Azure portal. Currently, using the portal, you migrate your instance by specifying a different subnet in the same or a different VNet. After migration, optionally migrate back to the instance's original subnet. The migration process changes the VIP address(es) of the instance. After migration, you need to update any network dependencies including DNS, firewall rules, and VNets to use the new VIP address(es).
24
26
25
27
If you need to migrate a *non-VNnet-injected* API Management hosted on the `stv1` platform, see [Migrate a non-VNet-injected API Management instance to the stv2 platform](migrate-stv1-to-stv2-no-vnet.md).
26
28
@@ -53,24 +55,98 @@ API Management platform migration from `stv1` to `stv2` involves updating the un
* VNet resources required when configuring a new subnet for migration:
57
-
* A new subnet in the current virtual network, in each region where the API Management instance is deployed. (Alternatively, set up a subnet in a different virtual network in the same regions and subscription as your API Management instance). A network security group must be attached to the subnet, and [NSG rules](virtual-network-reference.md#required-ports) for API Management must be configured.
58
+
* VNet resources required when performing migration **within existing subnet(s)**:
59
+
* A network security group must be attached to each subnet, and [NSG rules](virtual-network-reference.md#required-ports) for API Management on the `stv2` platform must be configured. The following are minimum connectivity settings:
60
+
61
+
* Outbound to Azure Storage over port 443
62
+
* Outbound to Azure SQL over port 1433
63
+
* Outbound to Azure Key Vault over port 443
64
+
* Inbound from Azure Load Balancer over port 6390
65
+
* Inbound from ApiManagement service tag over port 3443
66
+
* Inbound over port 80/443 for clients calling API Management service
67
+
* The subnet must have service endpoints enabled for Azure Storage, Azure SQL, and Azure Key Vault
68
+
* The address space of each existing subnet must be large enough to host a copy of your existing service side-by side with your existing service during migration.
69
+
70
+
* VNet resources required when configuring **new subnet(s) for migration**:
71
+
* A new subnet in the current virtual network, in each region where the API Management instance is deployed. (Alternatively, set up a subnet in a different virtual network in the same regions and subscription as your API Management instance). A network security group must be attached to each subnet, and [NSG rules](virtual-network-reference.md#required-ports) for API Management on the `stv2` platform must be configured.
58
72
59
73
* (Optional) A new Standard SKU [public IPv4 address](../virtual-network/ip-services/public-ip-addresses.md#sku) resource in the same region(s) and subscription as your API Management instance. For details, see [Prerequisites for network connections](virtual-network-injection-resources.md).
## Migrate the instance using the REST API - keep same subnet configuration
64
78
65
-
With the Migrate to stv2 REST API, you migrate your API Management instance to the `stv2` platform using the original subnet configuration, simplifying your migration. You can choose whether the API Management instance's original VIP address is preserved (recommended) or whether a new VIP address will be generated.
79
+
With the Migrate to stv2 REST API, you migrate your API Management instance to the `stv2` platform keeping the same subnet configuration, simplifying your migration.
66
80
67
-
> [!IMPORTANT]
68
-
> Currently, the option to preserve the VIP address when migrating using the REST API is only available for VNet-injected services in the *external* mode, not in the internal mode.
81
+
### Public IP address options
82
+
83
+
You can choose whether the API Management instance's original VIP address is preserved (recommended) or whether a new VIP address will be generated.
84
+
85
+
***Preserve virtual IP address** - If you preserve the VIP address in a VNet in external mode, API requests can remain responsive during migration (see [Expected downtime](#expected-downtime)); for a VNet in internal mode, temporary downtime is expected. Infrastructure configuration (such as custom domains, locations, and CA certificates) will be locked for 45 minutes. No further configuration is required after migration.
86
+
87
+
With this option, the `stv1` compute is deleted permanently after the migration is complete. There is no option to retain it temporarily.
88
+
89
+
***New virtual IP address** - If you choose this option, API Management generates a new VIP address for your instance. API requests remain responsive during migration. Infrastructure configuration (such as custom domains, locations, and CA certificates) will be locked for 30 minutes. After migration, you'll need to update any network dependencies including DNS, firewall rules, and VNets to use the new VIP address.
90
+
91
+
With this option, the `stv1` compute is retained for approximately 1 hour after migration is complete so that you can validate the migrated instance and confirm the network and DNS configuration. Optionally, set a custom retention time by setting using the [REST API](/rest/api/apimanagement/api-management-service/create-or-update).
92
+
93
+
If your API Management instance is deployed in multiple regions, the REST API migrates the VNet settings for all locations of your instance.
94
+
95
+
<!--
96
+
### Pre-created IP addresses for migration
69
97
70
-
***Preserve IP address** - If you preserve the VIP address, API requests will be unresponsive for approximately 15 minutes while the IP address is migrated to the new infrastructure. Infrastructure configuration (such as custom domains, locations, and CA certificates) will be locked for 45 minutes. No further configuration is required after migration.
98
+
API Management pre-creates public IP addresses for the migration process. Find the pre-created IP address in [TBD]. The pre-created IP address is used in the following scenarios:
71
99
72
-
***New virtual IP address** - If you choose this option, API Management generates a new VIP address for your instance. API requests remain responsive during migration. Infrastructure configuration (such as custom domains, locations, and CA certificates) will be locked for 30 minutes. After migration, you'll need to update any network dependencies including DNS, firewall rules, and VNets to use the new VIP address.
100
+
* When you migrate and preserve the VIP address, the pre-created IP address is assigned temporarily to the new `stv2` deployment during migration. The pre-created IP address is released after the migration is complete and the original IP address is assigned to the `stv2` deployment.
101
+
* When you migrate and generate a new VIP address, the pre-created IP address is assigned to the new `stv2` deployment during migration and persists after migration is complete.
73
102
103
+
You can configure the pre-created IP address to serve runtime traffic during migration and, in the case of migration to a new IP address, afterward. For example, whitelist the pre-created IP address in your firewall rules to allow traffic to the new `stv2` deployment during migration.
104
+
-->
105
+
106
+
### Limitations and considerations for same-subnet migration
107
+
108
+
* Verify that each subnet meets the [prerequisites](#prerequisites) for migration. If the subnet doesn't meet the requirements, the migration may fail.
109
+
* Turn off any autoscale rules configured for API Management instances deployed in the subnet. Autoscale rules can interfere with the migration process.
110
+
* If you have multiple API Management instances in the same subnet, migrate each instance in sequence. We recommend that you promptly migrate all instances in the subnet to avoid any potential issues with instances hosted on different platforms in the same subnet.
111
+
112
+
### Expected downtime
113
+
114
+
When migrating a VNet-injected instance keeping the same subnet configuration, minimal or no downtime for the API gateway is expected. The following table summarizes the expected downtime for the API gateway for each migration scenario when keeping the same subnet:
|External | Preserve VIP | No downtime; traffic is served on a temporary IP address for up to 20 minutes during migration to the new `stv2` deployment | No retention |
119
+
|External | New VIP | No downtime<br/><br/>New IP address can be used to serve runtime traffic | Retained for configurable period to allow you to update network dependencies |
120
+
|Internal | Preserve VIP | Downtime for approximately 20 minutes during migration when the existing IP address is assigned to the new `stv2` deployment. | No retention |
121
+
|Internal | New VIP | No downtime | Retained for configurable period to allow you to update network dependencies |
122
+
123
+
### Set custom retention time for `stv1` compute
124
+
125
+
When you migrate your VNet-injected instance and a new IP address is generated, the `stv1` compute is retained by default for 1 hour. In most cases the default retention time is sufficient. If you need a different retention time, set the `Microsoft.WindowsAzure.ApiManagement.Stv1VnetRetentionInMinutes` custom property using the [API Management Service - Update](/rest/api/apimanagement/api-management-service/create-or-update) API. You must configure the retention time before migration.
126
+
127
+
The following are brief steps to set the custom retention time:
128
+
129
+
1. Identify existing custom properties for your API Management instance by calling the [API Management Service - Get](/rest/api/apimanagement/api-management-service/get) API.
130
+
1. In the JSON response, locate and copy the `customProperties` element.
131
+
1. Add the `Microsoft.WindowsAzure.ApiManagement.Stv1VnetRetentionInMinutes` custom property to the copied `customProperties` element. Set the value using a UTC date/time in the format `YYYY-MM-DD HH:MM`. The UTC timestamp represents the time until which the `stv1` deployment remains active. Example: `"Microsoft.WindowsAzure.ApiManagement.Stv1VnetRetentionInMinutes": "2024-08-16 18:00"`.
132
+
1. Update the API Management instance using the [API Management Service - Update](/rest/api/apimanagement/api-management-service/update) API. Pass the updated `customProperties` in the body of the API request. For example:
@@ -105,7 +181,7 @@ If your API Management instance is deployed in multiple regions, repeat the prec
105
181
106
182
## (Optional) Migrate back to original subnet
107
183
108
-
If you used platform migration in the portal, optionally migrate back to the original subnet you used in each region after migration to the `stv2` platform. To do so, update the VNet configuration again, this time specifying the original VNet and subnet in each region. As in the preceding migration, expect a long-running operation, and expect the VIP address to change.
184
+
If you used platform migration in the portal, optionally migrate back to the original subnet you used in each region. To do so, update the VNet configuration again, this time specifying the original VNet and subnet in each region. As in the preceding migration, expect a long-running operation, and expect the VIP address to change.
109
185
110
186
The following image shows a high level overview of what happens during migration back to the original subnet.
111
187
@@ -229,7 +305,9 @@ After you update the VNet configuration, the status of your API Management insta
229
305
230
306
- **Can I upgrade my stv1 instance to the same subnet?**
231
307
232
-
- Currently, you can only upgrade to the same subnet in a single pass when using the [Migrate to stv2 REST API](#migrate-the-instance-using-the-rest-api). Currently, if you use the **Platform migration** blade in the portal, you need to migrate to a new subnet and then migrate back to the original subnet:
308
+
- Currently, you can only upgrade to the same subnet in a single pass when using the [Migrate to stv2 REST API](#migrate-the-instance-using-the-rest-api).
309
+
310
+
Currently, if you use the **Platform migration** blade in the portal, you need to migrate to a new subnet and then migrate back to the original subnet:
233
311
- The old gateway takes between 15 mins to 45 mins to vacate the subnet, so that you can initiate the move. However, you can enable a migration setting to retain the old gateway for 48 hours.
234
312
- Ensure that the old subnet's networking for [NSG](./virtual-network-reference.md#required-ports) and [firewall](./api-management-using-with-vnet.md?tabs=stv2#force-tunnel-traffic-to-on-premises-firewall-using-expressroute-or-network-virtual-appliance) is updated for `stv2` dependencies.
235
313
- Subnet IP address allocation is nondeterministic, therefore the original ILB (ingress) IP for "internal mode" deployments may change when you move back to the original subnet. This would require a DNS change if you're using A records.
Copy file name to clipboardExpand all lines: includes/api-management-migration-cli-steps.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,6 @@ ms.author: danlep
7
7
---
8
8
9
9
Run the following Azure CLI commands, setting variables where indicated with the name of your API Management instance and the name of the resource group in which it was created.
10
-
> [!NOTE]
11
-
> The Migrate to `stv2` REST API is available starting in API Management REST API version `2022-04-01-preview`.
12
10
13
11
> [!NOTE]
14
12
> The following script is written for the bash shell. To run the script in PowerShell, prefix the variable name with the `$` character when setting the variables. Example: `$APIM_NAME=...`.
Copy file name to clipboardExpand all lines: includes/api-management-publicip-internal-vnet.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
author: dlepow
3
3
ms.service: azure-api-management
4
4
ms.topic: include
5
-
ms.date: 05/13/2024
5
+
ms.date: 08/16/2024
6
6
ms.author: danlep
7
7
---
8
8
9
9
> [!IMPORTANT]
10
-
> * Starting May 2024, a public IP address is *no longer needed* when deploying (injecting) an API Management instance in a VNet in internal mode or migrating the internal VNet configuration to a new subnet. In external VNet mode, specifying a public IP address is *optional*; if you don't provide one, an Azure-managed public IP address is automatically configured. In external VNet mode, the public IP address is used for runtime API traffic.
10
+
> * Starting May 2024, a public IP address resource is *no longer needed* when deploying (injecting) an API Management instance in a VNet in internal mode or migrating the internal VNet configuration to a new subnet. In external VNet mode, specifying a public IP address is *optional*; if you don't provide one, an Azure-managed public IP address is automatically configured and used for runtime API traffic. Only provide the public IP address if you want to own and control the public IP address used for inbound or outbound communication to the internet.
11
11
> * Currently, if you enable zone redundancy for an API Management instance in a VNet in either internal mode or external mode, you must specify a new public IP address.
0 commit comments