SlideShare uma empresa Scribd logo
1 de 39
Modern CI/CD in the
microservices world with
Kubernetes
Mikalai Alimenkou
@xpinjection
https://t.me/xpinjection_channel
https://xpinjection.com
Telegram channel
https://t.me/xpinjection_channel
Disclaimer
This talk is based on
personal experience
Hello world samples on conferences
Real world is a little bit more complex
CI/CD of the son of your mother’s friend
After moving to its own cloud, Amazon engineers
deploy code every 11.7 seconds, on average
reducing both the number and duration of outages
at the same time.
Why this is not your case?
Product is developed in iterative way (Scrum, 2 weeks)
Engineering culture is far from perfect
Level of developers is not so high
No big investments in test automation at all levels
Engineering practices are not used on regular basis
Legacy services or dependencies
Business is not ready to continuous delivery
… many more reasons
Chaos deployment in DEV/QA
QA/DEV environment always contain latest versions of
all microservices
Deployment on QA/DEV is done continuously by
different dev teams when something is ‘READY’
Compatibility of microservices is not verified
There is no way to rollback on specific system version
QA life looks like a hell (random issues, non-
reproducible results, 500 HTTP codes everywhere,
chaos testing)
Does it look familiar to you?
Old monolith mindset doesn’t work
Microservices has their own lifecycles
Difference between CI and CD
Step #1: Dockerize your microservices
Immutable infrastructure principle
Artifacts promotion with tags
Unified blocks for CD stage, no dependency on
technical stack
Simplified deployment and environment management
Common configuration approach
Efficient resources utilization
Step #2: Specify versioning policy
Semantic versioning as a basis
Major version for API breaking changes or major
service release
Minor version corresponds to current dev iteration
Patch version is reserved for hot fixes
Commit hash as suffix to snapshot versioning and
tracing
Build date as an additional optional suffix
CI pipeline for each microservice
QUALITY GATES:
- Unit tests
- Integration tests
- Static code analysis
- API tests
- Contract tests
- Security checks
- … FULL VERSION: 2.3.0-350fca-20200218
What is shippable version of the system?
Step #3: Introduce compatibility sets
Store full list of compatible microservices as dedicated
artifact
VCS provides historical timeline, rollback, full tracing
Used as primary artifact for Continuous Delivery
Promoted between different environments in CD
pipeline (dev, qa, stage, prod)
Add middleware versions for full compatibility set
Compatibility set in properties file
Clear logical versions management independent from
concrete deployment technologies
Flexible usage for different purposes
Separation between deployment artifacts versioning
Customization step before deployment
Compatibility set in Helm/helmfile
Single versioned storage for environment configuration
Ability to specify compatibility on configuration level
The same toolset is used for all environments
Additional level of abstraction around K8S manifests
Helm is needed as an additional component
Step #4: Implement system level pipeline
Triggered when new candidate is built
Uses latest compatible set as a baseline
Overrides versions for ALL pending candidates
Creates new environment for system deployment
Deploys all microservices according to their versions
Waits for all health checks to become OK
Runs system level quality gates
Stores new compatibility set in case of SUCCESS
Retag and promote artifacts for the next stage
System pipeline for compatibility checks
QUALITY GATES:
- Health checks
- Smoke API tests
- Smoke UI tests
- Smoke system tests
- Smoke security tests
- …
ADDITIONAL TAGS: qa-ready, set-283gpt
Example from the real life
USER SERVICE
1.0.3-abc
EVENT SERVICE
1.0.0-cde
SCHEDULE SERVICE
0.9.1-fgh
COMPATIBLE SET
1.0.3-prs
NEW CANDIDATE
1.0.0-cde
1.0.3-prs
0.9.1-fgh
FAILED SYSTEM BUILD
1.0.1-tuv
FIX APPLIED
1.0.3-prs
0.9.1-fgh
SUCCESS SYSTEM BUILD
1.0.1-tuv
1.0.3-prs
1.0.1-tuv
0.9.1-fgh
COMPATIBLE SET
System pipeline: important notes
If pipeline fails, then candidate is not approved and it's
artifact is invisible for other environments, but pending
for the next pipeline run
Every build takes ALL available pending candidates
Different concurrency strategies may be applied:
• single build with lock on compatibility set
• concurrent builds with “last win” approach
• concurrent builds with optimistic locking in VSC
We are almost GitOps ready now!
New tools become available for CD
Step #5: Implement deployment pipeline
Triggered manually, automatically by successful system
pipeline build or by specific schedule
Predefined set of environments (dev, qa, stage, prod)
New environment may be created with specified or
generated name
Only appropriate compatible sets may be deployed
Environment TTL could be set manually or smart
default value is applied
Full CI/CD
cycle
FEATURE BRANCH PIPELINE:
- Environment name equals to feature branch name
- Reused to speed up development
- DEV compatibility set is used as a baseline
- Artifacts on microservices pipeline are tagged with branch name
- For each microservice latest available version from the branch
with the same name is used as candidate
PULL REQUEST PIPELINE:
- Triggered on each PR
- Special flag to activate system
level quality gates
- DEV compatibility set is used
as a baseline
- Only light system level quality
gates are run
- No compatibility sets updated
It is time for Kubernetes to show up!
Step #6: Speed up environments in K8S
Create dedicated namespace for each environment
Configure minimal limits and scale factors everywhere
Share common external heavy resources (DB,
Elasticsearch, Redis, Kafka, etc.)
Invest in performant K8S nodes
Use prepopulated images with data to speed up
Configure common observability tools
Reuse environments where possible with smart TTLs
Destroy environments asynchronously
Use full power of K8S namespaces
COMMON
Glossary
Service
Redis
Cache
FB-243
User
Service
Reuse
from DEV
STAGE
User
Service
Event
Service
Schedule
Service
Reuse
from DEV
QA
User
Service
Event
Service
Schedule
Service
DEV
User
Service
Event
Service
Schedule
Service
RDBMS
Kafka
Cluster Elasticsearch
How to share common resources?
It is really important to follow cloud-native 12 factors!
Redis via key prefixes or databases
RDBMS via databases or schemas
Kafka via common topics prefix
Elasticsearch via indexes
Now developers could use Skaffold continuously
QC is shifted as left as possible
Several teams could develop in common environment
Step #7: Start using K8S native CD tools
Dockerize tests with required test environment
Execute tests as K8S jobs
Manage test infrastructure in K8S
Choose suitable K8S native CD tool
Summary and take aways
Dockerize your microservices
Specify versioning policy
Introduce compatibility sets
Implement system level pipeline
Implement deployment pipeline
Speed up environments in K8S
Start using K8S native CD tools
Enjoy your life in amazing CI/CD world!
@xpinjection
https://xpinjection.com
https://t.me/xpinjection_channel

Mais conteúdo relacionado

Mais procurados

Intro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfWeaveworks
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsOpsta
 
Cloud native principles
Cloud native principlesCloud native principles
Cloud native principlesDiego Pacheco
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureAbdelghani Azri
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference ArchitecturesSonatype
 
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...SlideTeam
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitWeaveworks
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Krishna-Kumar
 
OpenShift 4 installation
OpenShift 4 installationOpenShift 4 installation
OpenShift 4 installationRobert Bohne
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysAngel Alberici
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッションTECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッションQlikPresalesJapan
 

Mais procurados (20)

Intro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdf
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOps
 
Cloud native principles
Cloud native principlesCloud native principles
Cloud native principles
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
OpenShift Introduction
OpenShift IntroductionOpenShift Introduction
OpenShift Introduction
 
Advanced Container Security
Advanced Container Security Advanced Container Security
Advanced Container Security
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
 
What Is Helm
 What Is Helm What Is Helm
What Is Helm
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!
 
OpenShift 4 installation
OpenShift 4 installationOpenShift 4 installation
OpenShift 4 installation
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleys
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Hands-on Helm
Hands-on Helm Hands-on Helm
Hands-on Helm
 
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッションTECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
 

Semelhante a Modern CI/CD in the microservices world with Kubernetes

A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything ChefMandi Walls
 
Why so continuous
Why so continuousWhy so continuous
Why so continuousMax Lobur
 
Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023
Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023
Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023VMware Tanzu
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01Scott Miao
 
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...DevOps.com
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow DemoChef
 
Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...
Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...
Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...HostedbyConfluent
 
Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...Docker, Inc.
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)QAware GmbH
 
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonPCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonVMware Tanzu
 
AWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and RavelloAWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and RavelloAmazon Web Services
 
8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the box8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the boxKangaroot
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonVMware Tanzu
 
Spring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour DallasSpring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour DallasVMware Tanzu
 
Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Miguel Zuniga
 
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S... Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...Skytap Cloud
 
Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...
Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...
Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...InfoSeption
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudCloudBees
 

Semelhante a Modern CI/CD in the microservices world with Kubernetes (20)

MidSem
MidSemMidSem
MidSem
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 
Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023
Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023
Simplify and Scale Enterprise Spring Apps in the Cloud | March 23, 2023
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01
 
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
 
Chef Workflow Demo
Chef Workflow DemoChef Workflow Demo
Chef Workflow Demo
 
Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...
Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...
Zero Down Time Move From Apache Kafka to Confluent With Justin Dempsey | Curr...
 
Kubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native ApproachKubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native Approach
 
Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonPCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
 
AWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and RavelloAWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and Ravello
 
8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the box8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the box
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - Boston
 
Spring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour DallasSpring and Pivotal Application Service - SpringOne Tour Dallas
Spring and Pivotal Application Service - SpringOne Tour Dallas
 
Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014Cloud Platform Symantec Meetup Nov 2014
Cloud Platform Symantec Meetup Nov 2014
 
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S... Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 
Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...
Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...
Driving Systems Stability & Delivery Agility through DevOps [Decoding DevOps ...
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the Cloud
 

Mais de Mikalai Alimenkou

Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.Mikalai Alimenkou
 
Static analysis tools as the best friend of QA
Static analysis tools as the best friend of QAStatic analysis tools as the best friend of QA
Static analysis tools as the best friend of QAMikalai Alimenkou
 
Saga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices worldSaga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices worldMikalai Alimenkou
 
Effectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousEffectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousMikalai Alimenkou
 
Ride the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderRide the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderMikalai Alimenkou
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentMikalai Alimenkou
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootMikalai Alimenkou
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentMikalai Alimenkou
 
DevOps checklist or how to understand where is your team in DevOps landscape ...
DevOps checklist or how to understand where is your team in DevOps landscape ...DevOps checklist or how to understand where is your team in DevOps landscape ...
DevOps checklist or how to understand where is your team in DevOps landscape ...Mikalai Alimenkou
 
DevOps checklist or how to understand where is your team in DevOps landscape
DevOps checklist or how to understand where is your team in DevOps landscapeDevOps checklist or how to understand where is your team in DevOps landscape
DevOps checklist or how to understand where is your team in DevOps landscapeMikalai Alimenkou
 
Практические трудности в разработке Медкарты для целой страны
Практические трудности в разработке Медкарты для целой страныПрактические трудности в разработке Медкарты для целой страны
Практические трудности в разработке Медкарты для целой страныMikalai Alimenkou
 
Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]Mikalai Alimenkou
 
Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]Mikalai Alimenkou
 
Agile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practiceAgile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practiceMikalai Alimenkou
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootMikalai Alimenkou
 
Bro, manage test data like a pro!
Bro, manage test data like a pro!Bro, manage test data like a pro!
Bro, manage test data like a pro!Mikalai Alimenkou
 
Бытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаБытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаMikalai Alimenkou
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisMikalai Alimenkou
 
Funny stories and anti-patterns from DevOps landscape
Funny stories and anti-patterns from DevOps landscapeFunny stories and anti-patterns from DevOps landscape
Funny stories and anti-patterns from DevOps landscapeMikalai Alimenkou
 
Developer + tester = quality++
Developer + tester = quality++Developer + tester = quality++
Developer + tester = quality++Mikalai Alimenkou
 

Mais de Mikalai Alimenkou (20)

Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.
 
Static analysis tools as the best friend of QA
Static analysis tools as the best friend of QAStatic analysis tools as the best friend of QA
Static analysis tools as the best friend of QA
 
Saga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices worldSaga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices world
 
Effectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousEffectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain Obvious
 
Ride the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderRide the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database Rider
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in development
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in development
 
DevOps checklist or how to understand where is your team in DevOps landscape ...
DevOps checklist or how to understand where is your team in DevOps landscape ...DevOps checklist or how to understand where is your team in DevOps landscape ...
DevOps checklist or how to understand where is your team in DevOps landscape ...
 
DevOps checklist or how to understand where is your team in DevOps landscape
DevOps checklist or how to understand where is your team in DevOps landscapeDevOps checklist or how to understand where is your team in DevOps landscape
DevOps checklist or how to understand where is your team in DevOps landscape
 
Практические трудности в разработке Медкарты для целой страны
Практические трудности в разработке Медкарты для целой страныПрактические трудности в разработке Медкарты для целой страны
Практические трудности в разработке Медкарты для целой страны
 
Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]
 
Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]
 
Agile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practiceAgile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practice
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 
Bro, manage test data like a pro!
Bro, manage test data like a pro!Bro, manage test data like a pro!
Bro, manage test data like a pro!
 
Бытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаБытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчика
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysis
 
Funny stories and anti-patterns from DevOps landscape
Funny stories and anti-patterns from DevOps landscapeFunny stories and anti-patterns from DevOps landscape
Funny stories and anti-patterns from DevOps landscape
 
Developer + tester = quality++
Developer + tester = quality++Developer + tester = quality++
Developer + tester = quality++
 

Último

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Último (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Modern CI/CD in the microservices world with Kubernetes

  • 1. Modern CI/CD in the microservices world with Kubernetes Mikalai Alimenkou @xpinjection https://t.me/xpinjection_channel https://xpinjection.com
  • 2.
  • 4. Disclaimer This talk is based on personal experience
  • 5. Hello world samples on conferences
  • 6. Real world is a little bit more complex
  • 7. CI/CD of the son of your mother’s friend After moving to its own cloud, Amazon engineers deploy code every 11.7 seconds, on average reducing both the number and duration of outages at the same time.
  • 8. Why this is not your case? Product is developed in iterative way (Scrum, 2 weeks) Engineering culture is far from perfect Level of developers is not so high No big investments in test automation at all levels Engineering practices are not used on regular basis Legacy services or dependencies Business is not ready to continuous delivery … many more reasons
  • 9. Chaos deployment in DEV/QA QA/DEV environment always contain latest versions of all microservices Deployment on QA/DEV is done continuously by different dev teams when something is ‘READY’ Compatibility of microservices is not verified There is no way to rollback on specific system version QA life looks like a hell (random issues, non- reproducible results, 500 HTTP codes everywhere, chaos testing)
  • 10. Does it look familiar to you?
  • 11. Old monolith mindset doesn’t work
  • 12. Microservices has their own lifecycles
  • 14. Step #1: Dockerize your microservices Immutable infrastructure principle Artifacts promotion with tags Unified blocks for CD stage, no dependency on technical stack Simplified deployment and environment management Common configuration approach Efficient resources utilization
  • 15.
  • 16. Step #2: Specify versioning policy Semantic versioning as a basis Major version for API breaking changes or major service release Minor version corresponds to current dev iteration Patch version is reserved for hot fixes Commit hash as suffix to snapshot versioning and tracing Build date as an additional optional suffix
  • 17. CI pipeline for each microservice QUALITY GATES: - Unit tests - Integration tests - Static code analysis - API tests - Contract tests - Security checks - … FULL VERSION: 2.3.0-350fca-20200218
  • 18. What is shippable version of the system?
  • 19. Step #3: Introduce compatibility sets Store full list of compatible microservices as dedicated artifact VCS provides historical timeline, rollback, full tracing Used as primary artifact for Continuous Delivery Promoted between different environments in CD pipeline (dev, qa, stage, prod) Add middleware versions for full compatibility set
  • 20. Compatibility set in properties file Clear logical versions management independent from concrete deployment technologies Flexible usage for different purposes Separation between deployment artifacts versioning Customization step before deployment
  • 21. Compatibility set in Helm/helmfile Single versioned storage for environment configuration Ability to specify compatibility on configuration level The same toolset is used for all environments Additional level of abstraction around K8S manifests Helm is needed as an additional component
  • 22. Step #4: Implement system level pipeline Triggered when new candidate is built Uses latest compatible set as a baseline Overrides versions for ALL pending candidates Creates new environment for system deployment Deploys all microservices according to their versions Waits for all health checks to become OK Runs system level quality gates Stores new compatibility set in case of SUCCESS Retag and promote artifacts for the next stage
  • 23. System pipeline for compatibility checks QUALITY GATES: - Health checks - Smoke API tests - Smoke UI tests - Smoke system tests - Smoke security tests - … ADDITIONAL TAGS: qa-ready, set-283gpt
  • 24. Example from the real life USER SERVICE 1.0.3-abc EVENT SERVICE 1.0.0-cde SCHEDULE SERVICE 0.9.1-fgh COMPATIBLE SET 1.0.3-prs NEW CANDIDATE 1.0.0-cde 1.0.3-prs 0.9.1-fgh FAILED SYSTEM BUILD 1.0.1-tuv FIX APPLIED 1.0.3-prs 0.9.1-fgh SUCCESS SYSTEM BUILD 1.0.1-tuv 1.0.3-prs 1.0.1-tuv 0.9.1-fgh COMPATIBLE SET
  • 25. System pipeline: important notes If pipeline fails, then candidate is not approved and it's artifact is invisible for other environments, but pending for the next pipeline run Every build takes ALL available pending candidates Different concurrency strategies may be applied: • single build with lock on compatibility set • concurrent builds with “last win” approach • concurrent builds with optimistic locking in VSC
  • 26. We are almost GitOps ready now!
  • 27. New tools become available for CD
  • 28. Step #5: Implement deployment pipeline Triggered manually, automatically by successful system pipeline build or by specific schedule Predefined set of environments (dev, qa, stage, prod) New environment may be created with specified or generated name Only appropriate compatible sets may be deployed Environment TTL could be set manually or smart default value is applied
  • 30. FEATURE BRANCH PIPELINE: - Environment name equals to feature branch name - Reused to speed up development - DEV compatibility set is used as a baseline - Artifacts on microservices pipeline are tagged with branch name - For each microservice latest available version from the branch with the same name is used as candidate PULL REQUEST PIPELINE: - Triggered on each PR - Special flag to activate system level quality gates - DEV compatibility set is used as a baseline - Only light system level quality gates are run - No compatibility sets updated
  • 31.
  • 32. It is time for Kubernetes to show up!
  • 33. Step #6: Speed up environments in K8S Create dedicated namespace for each environment Configure minimal limits and scale factors everywhere Share common external heavy resources (DB, Elasticsearch, Redis, Kafka, etc.) Invest in performant K8S nodes Use prepopulated images with data to speed up Configure common observability tools Reuse environments where possible with smart TTLs Destroy environments asynchronously
  • 34. Use full power of K8S namespaces COMMON Glossary Service Redis Cache FB-243 User Service Reuse from DEV STAGE User Service Event Service Schedule Service Reuse from DEV QA User Service Event Service Schedule Service DEV User Service Event Service Schedule Service RDBMS Kafka Cluster Elasticsearch
  • 35. How to share common resources? It is really important to follow cloud-native 12 factors! Redis via key prefixes or databases RDBMS via databases or schemas Kafka via common topics prefix Elasticsearch via indexes
  • 36. Now developers could use Skaffold continuously QC is shifted as left as possible Several teams could develop in common environment
  • 37. Step #7: Start using K8S native CD tools Dockerize tests with required test environment Execute tests as K8S jobs Manage test infrastructure in K8S Choose suitable K8S native CD tool
  • 38. Summary and take aways Dockerize your microservices Specify versioning policy Introduce compatibility sets Implement system level pipeline Implement deployment pipeline Speed up environments in K8S Start using K8S native CD tools Enjoy your life in amazing CI/CD world!