Businesses are now relying heavily on APIs that are running business-critical operations. It’s hard to imagine a stable and effective API-driven business without some form of Continuous Integration and Continuous Delivery/Deployment (CI/CD). Having a CI/CD pipeline for APIs ensures the stability of the API and enables speedy and effective processes when releasing new features and bug fixes that assist to keep the business running smoothly.
A typical CI/CD pipeline starts with a central repository that keeps the API artifacts. A new change that is introduced needs to be fully tested before promoting to the upper environment. Tying the CI/CD pipeline with a widely used Version Control System like GIT makes it easy to fully automate this.
With the new release of API Controller, it has the built-in support to make use of GIT to manage API deployments. It is armed with a simple yet powerful command set to deploy APIs while ensuring the APIs are in a fully working state.
This slide deck explores how to build an effective CI/CD pipeline for APIs with minimal effort.
On-demand webinar: https://wso2.com/library/webinars/reducing-devops-burden-with-git-based-ci-cd-pipelines-for-apis
6. Common Problems
6
Production Development
● Enabling API Management for APIs developed by API Developers
● Automate API deployment from lower environments to upper environments
{ dev }
7. Common Problems
7
Production Development
● Enabling API Management for APIs developed by API Developers
● Automate API deployment from lower environments to upper environments
● Handling deployment automations for the APIs provisioned in different ways
{ dev }
{ dev }
8. Common Problems
8
Production Development
● Enabling API Management for APIs developed by API Developers
● Automate API deployment from lower environments to upper environments
● Handling deployment automations for the APIs provisioned with different ways
● Efficiently manage multiple API development projects and change propagation to upper environments
● Environment specific (endpoints) configurations
{ dev }
{ dev }
{ dev }
{ dev }
10. Building a CI/CD Strategy
10
There is no silver bullet!
● First step of building a CI/CD process associates with
⦿ Organization culture
⦿ Governance structure and process
⦿ Team structure and dynamics
● Selection of proper CI/CD tools
● Selection of source code repository
13. API Controller and its Features
13
● A command Line tool
● Export APIs from WSO2 API Manager into API projects
● Create API projects using OpenAPI specifications
apictl
API
MobileStoreAPI
export
apictl
initialize API
PetstoreAPI
Petstore
OpenAPI spec
14. API Controller and its Features
14
● Import API projects and create APIs in WSO2 API Manager
● Inject per-environment configuration
API
MobileStoreAPI
staging:
backend=stg.mobile.com
production:
backend=prod.mobile.com
ProductionStaging
stg.mobile.com
prod.mobile.com
apictl
import
apictl
import
15. API Controller and its Features
15
● Native integration with Git (new in 3.2.0)
API
Petstore API
Project
API
MobileStore API
Project
PetstoreAPI
MobileStoreAPI
16. API Controller and its Features
16
● Native integration with Git (new in 3.2.0)
PetstoreAPI
MobileStoreAPI
API
Petstore API
Project
API
MobileStore API
Project
+/- changed
{ dev }
commit
17. API Controller and its Features
17
● Native integration with Git (new in 3.2.0)
apictl
PetstoreAPI
MobileStoreAPI
API
Petstore API
Project
API
MobileStore API
Project
+/- changed
Deploy repository (vcs deploy)
{ dev }
commit