SlideShare a Scribd company logo
@itielshwartz
Microservices are ‘easy’
dependencies are hard:
The right way to build
a cloud-native CI/CD
Itiel Shwartz
@itielshwartz
About me
Joined Rookout as a first developer
and production engineer
Previously Worked at Forter and
eBay as a backend engineer
@itielshwartz on both Github
and Twitter
personal blog at: https://etlsh.com
@itielshwartz
@itielshwartz
So is this talk going to be -
why K8S and helm are so awesome?
@itielshwartz
HELL NO!
@itielshwartz
• People tend to abuse it
• We are going to talk about
moving fast, while staying alive
• By the end of this session, you
will be more proficient on how to
use K8S (Superhero)
@itielshwartz
1. Build a basic app
2. K8S it
3. See why K8S isn’t enough
4. Helm it
5. Little Jenkins CI/CD
6. Conclusion
@itielshwartz
The monolith
@itielshwartz
@itielshwartz
Docker
Docker is a tool
designed to make it
easier to create, deploy,
and run applications by
using containers*
@itielshwartz
Pod
A Kubernetes pod is a group
of containers that are deployed
together on the same host. If
you frequently deploy single
containers, you can generally
replace the word "pod" with
"container" and accurately
understand the concept.
Deployment
A Deployment controller
provides declarative updates
for Pods and ReplicaSets.
@itielshwartz
K8S is so easy!
@itielshwartz
Breaking the monolith
@itielshwartz
Backend
Service
DAL Service
User
Ask for a quote
Backend logic -
random a quote
number
Fetch quote by id
@itielshwartz
@itielshwartz
Customers
@itielshwartz
@itielshwartz
Now we can get and search quotes :)
@itielshwartz
let’s not panic
@itielshwartz
@itielshwartz
All I need is to revert the DAL
Phew... this was close
@itielshwartz
Ok, let’s not panicOk, let’s not panic
@itielshwartz
All I need is to revert everything...
@itielshwartz
Ok let’s not panic
I thought microservice are the best!
@itielshwartz
1. We write a lot of boilerplate for each microservice
• Deployment.yaml , service.yaml, LB.yaml , configmap.yaml
2. No easy way testing those microservices before prod
• we need to configure each env
3. No version control for the dependencies between microservices!!!
@itielshwartz
1. The ability to deploy new code to production - everyone is talking about it!
2. The ability to test the system e2e very fast before going to production
3. Fast rollback - Your system will break! Not a question of if, but a question of when.
@itielshwartz
Helm to the rescue
@itielshwartz
Helm describes itself as the “The package manager for Kubernetes”
sounds pretty straightforward right? No? Maybe? Does it help you to Download packages?
Upload packages? Deploy envs? State control? Cluster control? Templating?
@itielshwartz
• CHART
• REPOSITORY (REPO, CHART REPOSITORY)
• RELEASE
@itielshwartz
Chart
A chart is organized as a
collection of files inside of a
directory.
The directory name is the name of
the chart (without versioning
information). Thus, a chart
describing WordPress would be
stored in the wordpress/ directory*
@itielshwartz
@itielshwartz
Backend
Service
DAL Service
User
Ask for a quote
Backend logic -
random a quote
number
Fetch quote by id
Redis cache layer
add quote
Fetch quoteCheck if quote
exist
@itielshwartz
The requirements file is one of the
most “overlooked” features helm
has to offer, and one of its
greatest!
It allows us to:
● Add external dependencies
● Deploy multiple services in
“one-shot”
Redis helm
@itielshwartz
Umbrella chart
@itielshwartz
We created a single file with all microservices, and to specify a version for each one.
● We can use a remote repository.
One chart to rule them all
@itielshwartz
The power of a single helm chart for deployment:
1. We now have a single-source of truth about our microservices versions.
2. We can rollback to a previous deployment (and by that revert all changes in all
microservices) . (helm rollback X)
3. We can Deploy to a new namespace! Meaning adding prod env and staging env using
the same files. (helm --namespace prod)
4. We can inject different variable based on the env we are deploying to (using the
values.yaml files) (helm -f prod.yaml)
@itielshwartz
Treat your CI/CD like cattle, not pets!
@itielshwartz
CI/CD blueprint for helm and K8S
Full helm microservice multiple repo ci/cd pipeline example:
1. Push to branch.
2. Build the docker.
3. Bonus: Use multistage docker build to run tests
4. Build the helm package.
If building master:
5. Try and update the umbrella chart (update backend from 1.0.x -> 1.0.x+1)
6. Deploy to staging/dev namespace
7. If it works - great! (and maybe auto move to prod)
8. If it fails -> revert the umbrella chart change (and maybe revert the backend branch)
@itielshwartz
Long live Jenkins!
Death to Jenkins!
@itielshwartz
Jenkins CI/CD, Helm and K8S
1. With Jenkins shared-libraries we can create a
full pipeline that will be shared across all repos.
2. When adding a new micro service we don’t need
to write a single line of code!
3. This also allow us to config all of our CI/CD as
code (Groovy).
4. Using Jenkins and helm we can create a full
CI/CD pipeline that is standard across all
microservices.
5. Jenkins has it own Helm chart - little meta but
works :)
6. On the other hand - Jenkins.
@itielshwartz
Conclusion
1. Managing microservice is hard.
2. Helm can make it easier.
3. All source code can be found on my github:
https://github.com/itielshwartz/microservices-using-helm
We live in a cool time, where the problem is not deploying - but deploying too fast
:)
@itielshwartz
K8S HELM
Like peanut butter and jelly
@itielshwartz

More Related Content

PDF
Understanding and Extending Prometheus AlertManager
PPTX
Introduction to Eclipse Microprofile
PDF
Lightweight Enterprise Java With Microprofile
PDF
Cluster your MicroProfile Application using CDI and JCache
PDF
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
PPTX
Advanced Git: Functionality and Features
PDF
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
PDF
2017 jenkins world
Understanding and Extending Prometheus AlertManager
Introduction to Eclipse Microprofile
Lightweight Enterprise Java With Microprofile
Cluster your MicroProfile Application using CDI and JCache
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Advanced Git: Functionality and Features
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
2017 jenkins world

What's hot (14)

PDF
Reactive Web 101: WebFlux, WebClient, and Reactor Netty
PDF
Introduction to tempest
PDF
What's new with Apache Camel 3? | DevNation Tech Talk
PDF
Reactive Programming in Java and Spring Framework 5
PDF
Lightning Fast Monitoring against Lightning Fast Outages
PDF
Reactive Programming with Rx
PDF
Docker {at,with} SignalFx
PDF
Open Source and Secure Coding Practices
PPTX
Jenkins2 - Coding Continuous Delivery Pipelines
PPTX
Migrating To GitHub
PPTX
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
PPTX
Hot to build continuously processing for 24/7 real-time data streaming platform?
PDF
Data Science Apps: Beyond Notebooks - Natalino Busa - Codemotion Amsterdam 2017
PDF
Building ‘Bootiful’ microservices cloud
Reactive Web 101: WebFlux, WebClient, and Reactor Netty
Introduction to tempest
What's new with Apache Camel 3? | DevNation Tech Talk
Reactive Programming in Java and Spring Framework 5
Lightning Fast Monitoring against Lightning Fast Outages
Reactive Programming with Rx
Docker {at,with} SignalFx
Open Source and Secure Coding Practices
Jenkins2 - Coding Continuous Delivery Pipelines
Migrating To GitHub
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Hot to build continuously processing for 24/7 real-time data streaming platform?
Data Science Apps: Beyond Notebooks - Natalino Busa - Codemotion Amsterdam 2017
Building ‘Bootiful’ microservices cloud
Ad

Similar to Microservices are ‘easy’ dependencies are hard (20)

PDF
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
PDF
Introducing Wordpress Multitenancy
PPTX
Kubernetes
PDF
Shipping NodeJS with Docker and CoreOS
PDF
DCSF19 Containers for Beginners
PDF
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
PDF
Cassandra and Docker Lessons Learned
PDF
K8s Quick Start
PDF
Docker Oxford launch - Introduction to Docker
PPTX
Puppet in k8s, Miroslav Hadzhiev
PDF
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
PDF
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
PPTX
In-Ceph-tion: Deploying a Ceph cluster on DreamCompute
PDF
Dev Environments: The Next Generation
PDF
Docker 102 - Immutable Infrastructure
PDF
Containerize! Between Docker and Jube.
PDF
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
PPTX
Docker Overview
PDF
Kubernetes in 15 minutes
PDF
Kubernetes: Learning from Zero to Production
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
Introducing Wordpress Multitenancy
Kubernetes
Shipping NodeJS with Docker and CoreOS
DCSF19 Containers for Beginners
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Cassandra and Docker Lessons Learned
K8s Quick Start
Docker Oxford launch - Introduction to Docker
Puppet in k8s, Miroslav Hadzhiev
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
In-Ceph-tion: Deploying a Ceph cluster on DreamCompute
Dev Environments: The Next Generation
Docker 102 - Immutable Infrastructure
Containerize! Between Docker and Jube.
Build High-Performance, Scalable, Distributed Applications with Stacks of Co...
Docker Overview
Kubernetes in 15 minutes
Kubernetes: Learning from Zero to Production
Ad

Recently uploaded (20)

PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
Sustainable Sites - Green Building Construction
PPTX
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
additive manufacturing of ss316l using mig welding
PPT
Project quality management in manufacturing
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PDF
ETO & MEO Certificate of Competency Questions and Answers
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CH1 Production IntroductoryConcepts.pptx
OOP with Java - Java Introduction (Basics)
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Arduino robotics embedded978-1-4302-3184-4.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
573137875-Attendance-Management-System-original
Sustainable Sites - Green Building Construction
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
additive manufacturing of ss316l using mig welding
Project quality management in manufacturing
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
ETO & MEO Certificate of Competency Questions and Answers
Structs to JSON How Go Powers REST APIs.pdf
Digital Logic Computer Design lecture notes
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT

Microservices are ‘easy’ dependencies are hard