Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Apigee end to end automated deployment

Hi team / @dchiesa1 ,

I represent the API platform team in my enterprise. My current problem statement is that I would like to take an OAS file and generate the proxies using that. As a platform team, we would like to add platform default policies (e.g. Spike arrest, OAS validation policy etc) on the "generated files" before they get deployed to apigee. 
 
So the flow is as below.
Tenant OAS yaml --> Generate files (proxy files) --> add platform policies --> Deploy to apigee
 
 We would like to reduce any manual intervention as much as possible. If there are changes to OAS, we want the pipeline to pick up the new OAS file, inject the mandatory policies, inject tenant related polices and then deploy. We dont want to use the UI management console.
Solved Solved
3 3 404
1 ACCEPTED SOLUTION

The spec itself is not templatized. Instead you create a proxy template in YAML which you pass to the `render` command along with the spec itself.  Example here.

View solution in original post

3 REPLIES 3

I'd highly recommend you take a look at the Apigee Go Gen tool which we recently open sourced.  This allows you to use YAML files with Go templating alongside your OAS specs to produce Apigee proxy bundles.  You can find documentation for the tool here.

Thanks @davidrush 

I just went through the docs and my understanding is that this tool expects the OAS file to be templatized.. Is that right?

In our enterprise, we want our tenants (API providers) to write the standard OAS file and our team (.i.e. the platform team) should be ones that should take this OAS and inject our policies.

The spec itself is not templatized. Instead you create a proxy template in YAML which you pass to the `render` command along with the spec itself.  Example here.