Reducing DevOps Burden with Git-based
CI/CD Pipelines for APIs
30th September, 2020
Hello!
Malintha Amarasinghe
Associate Technical Lead
malinthaa@wso2.com
Uvindra Dias Jayasinha
Technical Lead
uvindra@wso2.com
● Why CI/CD is needed
● Building a CI/CD strategy
● WSO2 API Controller
● Demo
⦿ A multi-environment CI/CD pipeline in action
Agenda
3
Why CI/CD is Needed?
Common Problems
5
Production Development
● Enabling API Management for APIs developed by API Developers
{ dev }
Common Problems
6
Production Development
● Enabling API Management for APIs developed by API Developers
● Automate API deployment from lower environments to upper environments
{ dev }
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 }
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 }
Building a CI/CD Strategy
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
CI/CD Process Overview
11
APICTL
API Controller
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
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
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
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
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
Demo Workflow
18
dev branch
master branch
PR
dev
environment
prod
environment
dev pipeline
prod pipeline
API
project
apictl
apictl
Demo
Question Time!
20
● Download and try-out
⦿ https://wso2.com/api-management
● Slack channel
⦿ https://wso2-apim.slack.com
● Github
⦿ https://github.com/wso2/carbon-apimgt
⦿ https://github.com/wso2/product-apim
● Demo material
⦿ https://github.com/myorg-x/cicd-demo-2020
21
wso2.com
Thanks!

Reducing DevOps Burden with Git-based CI/CD Pipelines for APIs

  • 1.
    Reducing DevOps Burdenwith Git-based CI/CD Pipelines for APIs 30th September, 2020
  • 2.
    Hello! Malintha Amarasinghe Associate TechnicalLead malinthaa@wso2.com Uvindra Dias Jayasinha Technical Lead uvindra@wso2.com
  • 3.
    ● Why CI/CDis needed ● Building a CI/CD strategy ● WSO2 API Controller ● Demo ⦿ A multi-environment CI/CD pipeline in action Agenda 3
  • 4.
    Why CI/CD isNeeded?
  • 5.
    Common Problems 5 Production Development ●Enabling API Management for APIs developed by API Developers { dev }
  • 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 }
  • 9.
  • 10.
    Building a CI/CDStrategy 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
  • 11.
  • 12.
  • 13.
    API Controller andits 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 andits 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 andits Features 15 ● Native integration with Git (new in 3.2.0) API Petstore API Project API MobileStore API Project PetstoreAPI MobileStoreAPI
  • 16.
    API Controller andits 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 andits 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
  • 18.
    Demo Workflow 18 dev branch masterbranch PR dev environment prod environment dev pipeline prod pipeline API project apictl apictl
  • 19.
  • 20.
  • 21.
    ● Download andtry-out ⦿ https://wso2.com/api-management ● Slack channel ⦿ https://wso2-apim.slack.com ● Github ⦿ https://github.com/wso2/carbon-apimgt ⦿ https://github.com/wso2/product-apim ● Demo material ⦿ https://github.com/myorg-x/cicd-demo-2020 21
  • 22.