Why use Apigee API bootstrap framework?
Apigee API gateway
API gateway architecture pattern is widely adopted across the cloud native technology stacks. We wrote the detailed post describing the pros and cons of this pattern.
Apigee API api gateway is widely adopted by enterprises and is one of the most used api management platforms from the list of api gateway products.
While designing and building Apigee powered api centric products and platforms for the last few years, we have developed Apigee api project blueprint framework.
This post describes the philosophy and details behind Apigee bootstrap framework. And why you would benefit using it for your own projects.
Importance of development lifecycle
If you are using Google Apigee API gateway as part of your technology stack, you most likely noticed that their team released multiple detailed video tutorials about this platform.
Together with a good, detailed product documentation and community forum these provide great help to technical architects and developers.
However, majority of the tutorials focus on the examples of UI based API development workflows.
Great for learning the product itself, but not enough for incorporating Apigee API gateway development lifecycle to overall software development flow within larger technology organizations.
Many technology organizations are aiming for continuous integration / continuous delivery, TDD (test driven development), BDD (behavior driven development), documentation as code.
This requires more structured approach than drag and drop, web UI based api development.
Apigee bootstrap framework addresses this.
Management APIs to the rescue
One of the most powerful features of Apigee API gateway platform is its management api collection.
Apigee management apis allow to programmatically setup, configure, control and manage apis, api products, functionality and integrations.
There are multiple ways of using such management apis.
Apigee bootstrap framework is preset with API and configuration deployments via Apache Maven and dedicated plugins.
Apigee bootstrap framework has opinionated API project structure, which is battle tested across multiple Apigee implementation projects we completed.
It contains the actual Apigee api proxy directory, tests and specifications directories and helper scripts.
Single Maven configuration file pom.xml
provides setup to perform releases to multiple environments. The framework philosophy is to keep things as simple as possible, but not simpler.
Example API deployments done in the following way
mvn install -P{environment name} -Dorganization={Apigee org name} -Dusername={Apigee username} -Dpassword={Apigee password}
Example environment configuration releases
mvn apigee-config:targetservers -P{environment name} -Dorganization={Apigee org name} -Dapigee.config.options=update
mvn apigee-config:caches -P{environment name} -Dorganization={Apigee org name} -Dapigee.config.options=update
mvn apigee-config:kvms -P{environment name} -Dorganization={Apigee org name} -Dapigee.config.options=update
Framework uses Apigee config Maven plugin which allows to version control all platform configurations within JSON structure.
API flows, Errors
Apigee bootstrap api framework implements the following:
- Bad requests default setup. While adding new api resources or methods to your apis, developers have to specifically enable them. Otherwise the default behavior is http 400 bad request error.
- Status endpoint. Provides the status endpoint for specific api. This allows monitoring to use monitoring tools and circuit breaker patterns.
- Cross origin (CORS) header setup. Framework implements CORS response headers, which are dynamically configurable.
- Error handling flow. Implemented based on proven production patterns.
Continuous delivery
- Deploy to multiple environments conditionally, based on passing tests.
- TDD setup with Cucumber and Apickli. Ready for creating tests before writing api implementation code.
- Example Jenkins, CircleCI pipelines.
Summary
- Apigee bootstrap framework code is open sourced under GLPv3 license.