Layer7 API Management

API gateway in Continuous Integration Environment 

Nov 16, 2017 01:42 PM

Several Customers ask me about how migrate policies/fragments between environments or how to integrate APIM in a Continous Integration Model.

 

Using GMU (Gateway Migration Utility) combined with code repos and CI engines is a easy way to add APIM to de CI pipeline.

 

Is recommended to create three config files with the connection to each gateway parameters as repositori artifacts (test.arg, pre.arg, pro.arg).

 

The flow is:

 

  1. The developer who make the API endpoint uses APIM Workstation to develop the gateway policy to manage his API.
  2. When policy is ready, the developer export it and upload the xml file to the repository.
  3. APIM administrator gets the policy form rpository and imports it into test gateway. If needed, he will made the needed modifications into the policy (security assertions, common fragments...)
  4. When the policy is ready, CI engine will start the environment promotion. To do this, first of all CI engine will retrieve from repository the configuration artifact of test gw (test.args).
  5. CI Engine execute GMU cliente: GatewayMigrationUtility.sh migrateOut -z test.args --policyName newpolicy -dest bundle.xml –defaultAction NewOrUpdate
  6. CI Engine save the bundle.xml artifact with exported policy into the repository.
  7. CI Engine execute the mapping of the common variables into a a mappings file for certification and production environments : GatewayMigrationUtility.bat template --bundle bundle.xml --template preTemplate.properties , GatewayMigrationUtility.bat template --bundle bundle.xml --template proTemplate.properties
  8. The mappings file is stored in the repository.
  9. The APIM Administrator change in the certification mappings file the test environment values by certification environment values.
  10. The APIM Administrator change in the production mappings file the test environment values by production environment values.
  11. To migrate the policy into certifications, the CI Engine retrieve from repository:
    1. Bundle.xml with the exported policy.
    2. Pre.args, with the connetion information to certification Gateway.
    3. Pre_Template.properties with the variable mappings for certification environment.
  12. CI Engine upload policy into certification executing GMU: GatewayMigrationUtility.bat migrateIn -z pre.args --bundle bundle.xml –template pre_template.propertiesç
  13. After certification environment is acepted, CI Enine start the migration into production. CI Engine retrieve from repository.
    1. Bundle.xml with the exported policy.
    2. Pro.args, with the connetion information to production Gateway.
    3. Pro_Template.properties with the variable mappings for production environment.
  14. CI Engine upload policy into production executing GMU: GatewayMigrationUtility.bat migrateIn -z pro.args --bundle bundle.xml –template pro_template.propertie

Statistics
0 Favorited
12 Views
1 Files
0 Shares
18 Downloads
Attachment(s)
png file
apim_ci_cycle.png   75 KB   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.