continuous delivery and micro services - a symbiosis
DESCRIPTION
Continuous Delivery profits from Micro Services - and the other way round. This presentation shows how the two technologies work together - and how Micro Services can be used to simplify the transition to Continuous Delivery.TRANSCRIPT
![Page 1: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/1.jpg)
Continuous Delivery & Micro Services
A SymbiosisEberhard Wolff
Freelancer Head Technology Advisory
Board adesso AG http://ewolff.com
![Page 2: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/2.jpg)
Eberhard Wolff - @ewolff
Leseprobe: http://bit.ly/CD-Buch
![Page 3: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/3.jpg)
Eberhard Wolff - @ewolff
Micro Service
![Page 4: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/4.jpg)
Eberhard Wolff - @ewolff
![Page 5: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/5.jpg)
Eberhard Wolff - @ewolff
![Page 6: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/6.jpg)
Eberhard Wolff - @ewolff
How can I implement a
new feature???
![Page 7: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/7.jpg)
Eberhard Wolff - @ewolff L
![Page 8: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/8.jpg)
Eberhard Wolff - @ewolff
ECommerce System
Spring & OSGi
New Stuff
![Page 9: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/9.jpg)
Eberhard Wolff - @ewolff
New Stuff Spring & OSGi
New Stuff
ECommerce System
![Page 10: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/10.jpg)
Eberhard Wolff - @ewolff
HTTP
New Stuff
Links
No legacy code Any technology
J Small code base
![Page 11: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/11.jpg)
Little programs are delightful to write in
isolation,but the process of
maintaining large-scale software is always
miserable.
Jaron Lanier
![Page 12: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/12.jpg)
Friedenspreis des
deutschen Buchhandels
![Page 13: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/13.jpg)
Eberhard Wolff - @ewolff
Micro Services: Definition• Small • Independent deployment units • i.e. processes
• Any technology • Any infrastructure
Micro Service
Server
Micro Service
Server
![Page 14: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/14.jpg)
Eberhard Wolff - @ewolff
Components Collaborate
Micro Service
Micro Service
Link
Data Replication
REST Messaging
![Page 15: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/15.jpg)
Eberhard Wolff - @ewolff
Why Micro Services?• Strong modularization • i.e. no unwanted dependencies
• Choose best technology for each service • Includes database etc
• Teams can deploy new features • Completely independent • Micro Service must provide meaningful
set of features
![Page 16: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/16.jpg)
Eberhard Wolff - @ewolff
Continuous Delivery
![Page 17: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/17.jpg)
Eberhard Wolff - @ewolff
Continuous Delivery: Build Pipeline
Commit Stage
Automated Acceptance
Testing
Automated Capacity Testing
Manual Explorative
Testing
Release
![Page 18: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/18.jpg)
Eberhard Wolff - @ewolff
Continuous Delivery• Automated provisioning
• Fast Feedback • Tests, tests, tests… • Feedback from production • Monitoring • Logs analysis
![Page 19: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/19.jpg)
Eberhard Wolff - @ewolff
Why Continuous Delivery?• Faster time to market • i.e. can deploy changes quickly into
production
• Less risk • Many tests • Automation mean reproducible results • Smaller deployments
![Page 20: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/20.jpg)
Eberhard Wolff - @ewolff
Why Continuous Delivery Needs Micro Services
![Page 21: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/21.jpg)
Eberhard Wolff - @ewolff
Monolith
ECommerce System
3rd party systems
Database
![Page 22: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/22.jpg)
Eberhard Wolff - @ewolff
Continuous Delivery: Build Pipeline
Commit Stage
Automated Acceptance
Testing
Automated Capacity Testing
Manual Explorative
Testing
Release
ECommerce System
![Page 23: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/23.jpg)
Eberhard Wolff - @ewolff
Build Pipeline: Problems• Complex infrastructure • Huge database • 3rd party integration
• Slow feedback • Test everything for each commit • Huge deployment unit • Deployment slow
![Page 24: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/24.jpg)
Eberhard Wolff - @ewolff
Micro Services• Small independent deployment units • E.g. interface backwards compatibility • Otherwise Micro Services would need
to be deployed together
• Sensible set of features • Business features should be deployed
independently
![Page 25: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/25.jpg)
Eberhard Wolff - @ewolff
Micro Services
ECommerce System
3rd party systems
Database
Order
Customer
Item
![Page 26: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/26.jpg)
Eberhard Wolff - @ewolff
Commit Stage
Automated Acceptance
Testing Automated
Capacity Testing
Manual Explorative
Testing
Release
Commit Stage
Automated Acceptance
Testing Automated
Capacity Testing
Manual Explorative
Testing
Release
Commit Stage
Automated Acceptance
Testing Automated
Capacity Testing
Manual Explorative
Testing
Release Order
Item
Customer
![Page 27: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/27.jpg)
Eberhard Wolff - @ewolff
Build Pipeline for Micro Services
• Independent deployment • Build pipeline per Micro Service
• Smaller • Easier to set up • Less features (3rd party systems) • Faster Feedback: Less tests
![Page 28: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/28.jpg)
Eberhard Wolff - @ewolff
Micro Services
ECommerce System
3rd party systems
Database
Order
Customer
Item
![Page 29: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/29.jpg)
Eberhard Wolff - @ewolff
Micro Service & Databases• Micro Services don’t share data • i.e. database (schema) per server
• Easier schema migration • Easier deployment
![Page 30: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/30.jpg)
Eberhard Wolff - @ewolff
Micro Services Design• System becomes a distributed system
• The network is not reliable • Micro Services fail
• A failed Micro Services must not cause other to fail
![Page 31: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/31.jpg)
Eberhard Wolff - @ewolff
Resilience
![Page 32: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/32.jpg)
Eberhard Wolff - @ewolff
Resilience
A system built out of unreliable
components with resilience is more robust.
![Page 33: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/33.jpg)
Eberhard Wolff - @ewolff
Would you reboot your database just
like that?
![Page 34: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/34.jpg)
Eberhard Wolff - @ewolff
Amazon Reboot• Amazon Cloud rebooted several
machines • Netflix: video streaming • Peak: 30% of internet traffic in the US • 2700 database server • 218 rebooted • 22 not successful • 0 downtime
![Page 35: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/35.jpg)
Eberhard Wolff - @ewolff
Risk Mitigation in Continuous Delivery
• Blue / Green Deployment • Create complete cluster with new
release • Test and only switch if OK
• Canary Releasing • Release to a few nodes • Rollback if needed
![Page 36: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/36.jpg)
Eberhard Wolff - @ewolff
Micro Services: Further Risk Mitigation
• Smaller deployment units • Deployment Failure influences less
features • Easier rollback / fixing
• Resilience: Other Micro Services still operational
![Page 37: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/37.jpg)
Eberhard Wolff - @ewolff
Why Micro Services Need
Continuous Delivery
![Page 38: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/38.jpg)
Eberhard Wolff - @ewolff
Micro Service & Servers• Potentially different technology
stack per service • Individual processes
• Each component has its own server • …per stage in the pipeline
![Page 39: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/39.jpg)
Eberhard Wolff - @ewolff
Not one server
![Page 40: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/40.jpg)
Eberhard Wolff - @ewolff
Not 10 server
![Page 41: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/41.jpg)
Eberhard Wolff - @ewolff
But a lot more
![Page 42: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/42.jpg)
Eberhard Wolff - @ewolff
Micro Service: Not just a piece of
software
![Page 43: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/43.jpg)
Eberhard Wolff - @ewolff
Micro ServiceApp +
App Server + Database +
More infrastructure
Individual technology stack
![Page 44: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/44.jpg)
Eberhard Wolff - @ewolff
Micro Services & Automation• Infrastructure much more complex • More servers • More services
• Need to automate provisioning • (Virtual) Servers • Software • Complete software stacks
![Page 45: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/45.jpg)
Eberhard Wolff - @ewolff
Micro Services & Feedback: Logs
• Simple grep on a log file not enough • Too many servers • Correlation across servers
• Centralized logging needed
![Page 46: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/46.jpg)
Eberhard Wolff - @ewolff
Micro Services & Feedback: Monitoring
• Just top on a server is not enough • Too many servers • Not just your application… • …also database • …other infrastructure
• Centralized monitoring needed
![Page 47: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/47.jpg)
Eberhard Wolff - @ewolff
Why??
![Page 48: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/48.jpg)
Eberhard Wolff - @ewolff
Quick Deployment
Continuous Delivery
Delivery Pipeline
Micro Services Smaller
Deployment Units
Independent Deployment
Units
![Page 49: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/49.jpg)
Eberhard Wolff - @ewolff
Quick Deployment
Tests
Continuous Delivery
Monitoring
Logs Fast
Feedback
![Page 50: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/50.jpg)
Eberhard Wolff - @ewolff
Conclusion
![Page 51: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/51.jpg)
Eberhard Wolff - @ewolff
Micro Services & Continuous
Delivery: Goal is quick deployment.
![Page 52: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/52.jpg)
Eberhard Wolff - @ewolff
Time to Market
![Page 53: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/53.jpg)
Eberhard Wolff - @ewolff
Conclusion: Quick Deployments
Time
Size & Risk
Manual Deployment
Pipeline
Continuous Delivery Pipeline
Monolith Micro Services
![Page 54: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/54.jpg)
Eberhard Wolff - @ewolff
Conclusion
Micro Services
Continuous Delivery
Infrastructure much more complex
Smaller deployment units
![Page 55: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/55.jpg)
Eberhard Wolff - @ewolff
Micro Services and Continuous Delivery go together.
![Page 56: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/56.jpg)
Eberhard Wolff - @ewolff
You must do both: Continuous Delivery &
Micro Services
![Page 57: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/57.jpg)
Eberhard Wolff - @ewolff
You must do both: Continuous Delivery &
Micro Services
![Page 58: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/58.jpg)
Eberhard Wolff - @ewolff
Migration to Continuous
Delivery or Micro Services much
harder
![Page 59: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/59.jpg)
Eberhard Wolff - @ewolff
Migration to Continuous
Delivery or Micro Services much
harder
![Page 60: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/60.jpg)
Eberhard Wolff - @ewolff
Continuous Delivery for a
Monolith might be unrealistic
![Page 61: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/61.jpg)
Eberhard Wolff - @ewolff
Alternative Approach
ECommerce System
Database
Micro Service
Database
Integration
![Page 62: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/62.jpg)
Eberhard Wolff - @ewolff
Migration to Micro Service and Continuous Delivery
• Micro Services can be added to a Monolith
• Might use different technologies • Different way to handle legacy
applications • Easier to create a Continuous
Delivery Pipeline for Micro Service • But: Higher overall complexity
![Page 63: Continuous Delivery and Micro Services - A Symbiosis](https://reader037.vdocuments.us/reader037/viewer/2022110310/559444b71a28abfa2f8b4784/html5/thumbnails/63.jpg)
Eberhard Wolff - @ewolff
Thank You!