WSO2 API build and deployment

79 Views Asked by At

I have created and published API's using API manager 2.6.0 now I need to push these changes to another environment like system & UAT testing environment. Can someone help me on how I can configure any repository to push the APIs created using API manager and move from one environment to another. I checked few sites related to WSO2 migration and CI/CD implementation but I could not able to do that properly so I am looking for high level explanation to use repository and migration to different environments.

1

There are 1 best solutions below

0
Luis Bustamante On

You can export and import APIs from different environments using the migration APIs or the CLI tool:

Export API as seen here: https://docs.wso2.com/display/AM210/Migrating+the+APIs+to+a+Different+Environment

Export CLI as seen here: https://docs.wso2.com/display/AM260/Migrating+the+APIs+to+a+Different+Environment

The exported APIs are a set of json and xml files that can be templated, and unless your APIs endpoints in other environments are the same as your development one, you will have to modify the exported APIs jsons and xmls to fit the other enviroment's data.

The best way to set up a repository, will be then to:

  1. Export from your development environment the API to a local machine
  2. Create a template out of it to be used with your favorite template deployment engine
  3. Upload this templates to a repository manager (nexus, artifactory...)
  4. Write the script to fill the template for each environment,
  5. Create another script to call the APIM import CLI or API to import the filled template to each enviroment.

This is all best done within some CI/CD pipeline.