If you're using Azure API Management (APIM) services, you've likely seen this message: "Support for the single-tenant v1 (STv1) platform ends on 8/31/24. Migrate instances before that date to the new platform version (STv2) for continued support and access to new features."
This announcement highlights the urgency of migrating to STv2. To ensure a smooth transition, it's crucial to analyze our architecture, understand technical constraints, explore possible approaches, and assess risks. Here’s a summarized guide on how I managed the migration using the VNET-injection method.
My Case: APIM with Dedicated Public IP and Subnet
Configuration:
- APIM with a dedicated public IP and a dedicated subnet.
- Assigned private IP with NAT in a controlled VNET.
- Need to maintain IP addresses and DNS.
Issues:
- APIM migration requires a new public IP, new subnet with private IP, new DNS, and new NSG.
- APIM instances acquire IP addresses randomly, complicating existing firewall rules, NSG, and NAT configurations.
Options:
- In-Place Migration
- Parallel Setup
Target:
- In-Place Migration with the ability to roll back to the original subnet with NAT IP.
Migration Process
Before Migration:
- Take screenshots of every configuration of APIM STv1 instances.
- Create a new public IP, new subnet, new NSG, and new DNS for the APIM STv2 instances.
During Migration:
- Release and migrate the APIM STv1 instance to the new subnet.
- Create dummy NICs in the original subnet before the IP address of the APIM instance. For example, create 5 dummy NICs to get IPs from 10.10.10.5 to 10.10.10.9 if the APIM instance needs to acquire 10.10.10.10 (Azure reserves 10.10.10.1 to 10.10.10.4 by default).
- Once the dummy NICs are provisioned and occupy the IP addresses in the original subnet, wait for the APIM upgrade to STv2 (this took about 45 minutes).
- Move the APIM STv2 instance back to the original subnet and ensure it gets the previously assigned IP address.
- Verify that the APIM STv2 instance has the original IP. This avoids modifying firewall rules, NAT, and NSG if all steps go well.
- Test all your application APIs to ensure successful migration.
In my case, the migration was completed in less than 4 hours with no issues. Remember to delete any resources created temporarily for migration to avoid unnecessary costs.
Automation and Final Thoughts
I highly recommend automating the migration using Infrastructure-as-Code, especially for provisioning dummy NICs to ensure the APIM instance retains its IP address. In my scenario, the APIM IP was assigned as the first available IP in the subnet, requiring minimal dummy NIC creation. However, if your APIM instance uses the last available IP in your subnet, automation will be crucial to save time.
Conclusion:
The cloud environment is rapidly evolving. Migrating to STv2 ensures continued support and access to new features. This guide offers a practical approach to migrating APIM to STv2 without impacting users. Stay updated and leverage the latest cloud innovations for optimal performance.
For more details, visit the Microsoft documentation.
Thank you.
(Be knowledgeable, pass it on then)
Comments
Post a Comment