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.
Below are the high-level steps to perform the migration -
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.