2. Development and Operation
API Lifecycle with Open Source
Products
Muhammad Edwin
edwin@redhat.com
DevOps Indonesia - Jakarta, Februari 2020
2
3. Legal Stuffs
3
This presentation is intended for educational purposes only and does not
replace independent professional judgement.
Statements are my own, and not reflect opinion or position of
redhat.com.
Disclaimer
5. Who Am I ?
Intro
Middleware and Application Development Consultant
at RedHat.
github.com/edwin
linkedin.com/in/muhammadedwin
telegram : @JVMUserGroup or pm to @edwinkun
email : edwin at redhat dot com
6. What is an API
6
DevOpsIndonesia–Jakarta,February2020
7. A long long time ago,
a very simple life
What is an API
https://www.slashroot.in/difference-between-monolithic-and-microservices-based-architecture
8. What is an API
But it have a downside,
not scalable enough, need to either scale up or scale out
16gb to 32gb
1 instance to 3 instance
https://www.slashroot.in/difference-between-monolithic-and-microservices-based-architecture
9. What is an API
And then comes Microservices
https://www.slashroot.in/difference-between-monolithic-and-microservices-based-architecture
10. What is an API
This is where API plays an important role
https://medium.com/microservices-in-practice/microservices-in-practice-7a3e85b6624c
12. What is an API
Because of this
https://www.information-age.com/organisations-advantage-api-economy-123485729/
• API as a Service
• API as a Product
• API-Economy
13. What is API Lifecycle
13
DevOpsIndonesia–Jakarta,February2020
14. What is API Lifecycle
https://themoonjellyfish.weebly.com/life-cycle.html
https://commons.wikimedia.org/wiki/File:SDLC_-_Software_Development_Life_Cycle.jpg
What is Lifecycle anyway?
15. So, what is API Lifecycle?
What is API Lifecycle
API Lifecycle Management is a term illustrating
the need to manage all steps in a life of an API,
from creation to retirement.
16. So, what is API Lifecycle?
What is API Lifecycle
https://developers.redhat.com/blog/2019/02/25/full-api-lifecycle-management-a-primer/
17. So, what is API Lifecycle?
What is API Lifecycle
Design Mock Publish Manage Operate
18. I want to connect this two microservices
What is API Lifecycle
Microservice 01 Microservice 02??
19. API Design Principle
What is API Lifecycle
1. Contract First Approach
• Open API Specification
2. Ensure Testability of APIs
• Mocks
• Unit Testing
• Integration Testing
3. Semantic Versioning
• Minor versions are backward compatible and updated “in place”
• Major versions are deployed “side by side” with older versions
4. Idempotency
5. API Management As Code
21. After Design and then,
What is API Lifecycle
Microservice 01 Microservice 02
on development
but API design is
ready
HTTP API
next Sprint
22. After Design and then,
What is API Lifecycle
Microservice 01 Microservice 02HTTP API
on development
but API design is
ready
mock service
next Sprint
23. How to Mock API
What is API Lifecycle
microcks.github.io
24. How to Mock API
What is API Lifecycle
castlemock.com
25. I want services from Microservice 02 to be accesible to other service
What is API Lifecycle
Microservice 01 Microservice 02HTTP API
??
Microservice Y
27. I want manage services from Microservice 02 only accesible from a specific
service
What is API Lifecycle
Microservice 01 Microservice 02HTTP API
Microservice Y
HTTP API
Microservice Z
X
29. How to Manage your API
What is API Lifecycle
https://www.keycloak.org/docs/latest/authorization_services/
30. How to do Operation / DevOps of all this things?
What is API Lifecycle
Microservice 01
Microservice 02
new version
HTTP API
Microservice Y
retire
HTTP API
Microservice Z
X
50 New
Microservices
200 Developers
5 DevOps
datacenter
31. How to do API Operations (Build)
What is API Lifecycle
Jenkins
32. How to do API Operations (Deploy and Promote)
What is API Lifecycle
Ansible
Sit / uat
promote using
canary
release
prddev
deploy
deployment
success
rollback
33. What is API Lifecycle
Design Mock Publish Manage Operate
34. at least we’re half way there
What is API Lifecycle
https://developers.redhat.com/blog/2019/02/25/full-api-lifecycle-management-a-primer/