Azure APIM Management: Migrating contents of managed developer portal with source control

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

In the scenario I refer to this blog, customer would like to automate the deployment of contents for their APIM developer portal with a source control. While Automate developer portal deployments - Azure API Management | Microsoft Learn gives us the detail about how to automate developer portal deployments using scripts, I will go through how to split the process into multiple steps to apply the concepts of GitOps and DevOps to the developer portal migration.

 

The repository mentioned in the Azure document has all the source code and this repository is managed by the Microsoft Azure API Management team. The script and the pipeline migrate the contents of the managed portal from source APIM instance to destination APIM instance, but it does not support the source control of contents and publishing the contents to the multiple environments.

 

As part of this blog, I will discuss how to use the different pipelines to capture the snapshot of the contents from source APIM developer portal to a repository, create a pull request against the repository, update the existing Urls in the repository and import and publish the contents to the multiple destination APIM developer portal from the repository.

 

To perform the above-mentioned steps, you should fork this repository and set up your pipelines. Instructions are there for Azure DevOps and GitHub Actions.

 

We provide you with a template architecture diagram for your developer portal migration baseline architecture. 

 

bbanerjee_2-1685033312341.png

Below are the high-level steps to perform the migration - 

 

  • Configure APIM Developer Portal Pipelines
    • (Optional) Update URL configurations into the repository
  • Capture APIM Developer Portal artifacts
  • (optional) Review/Approve the PR for production environment
  • Release and Publish APIM Developer Portal Artifacts

 

Though the current implementation focuses on developer portal content alone, the scripts can be enhanced to include other developer portal related objects like users, groups, Identities etc. Also, the script currently bundles all portal configuration into a single data.json file. For scenarios that require complete control over the customizations, the captureContent method in the utils.js can be altered to emit separate files.

 

I hope this post was useful and helped with a better approach of migrating managed APIM developer portal to another instance.

 

Happy Learning!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.