SlideShare a Scribd company logo
CI/CD with Kubernetes,
Helm & Wercker
#madScalability

Madrid

30/11/2016
About me:
Javier Cuevas 

@javier_dev
AIRBNB FOR DOGS
“MAJESTIC” RAILS 3.2 MONOLITH
RUBY ON RAILS SHOP 

WHO EMBRACED ELIXIR
previously now full time!
First things first:

My review of the new
MacBook Pro with Touch Bar:
Meh 😔
Disclaimers
1. I learned Docker while learning
Kubernetes. I ain’t no expert.
2. Gudog is not at unicorn scale.
We’re just at dog scale.
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
NOW LET’S
GET STARTED
A LOOK BACK
TO DEVOPS 

@ Gudog
Hosting / Cloud Provisioning
Continuos 

Integration
Deployments
2013 DigitalOcean SSH all the things 🙀 Jenkins Capistrano
2014 AWS EC2 Rubber Shippable Capistrano
2015 AWS EC2 (OpsWorks) Chef (OpsWorks) Shippable Chef (OpsWorks)
2016
Google Container Engine 

(GKE)
Kubernetes 💙 Wercker Kubernetes + Helm
Why we chose

Google Cloud
😱 Because we ran out of AWS credits and
we got new credits for Google Cloud.
💸 Because (now that we’re paying for it) is
cheaper than AWS.
👌 Because it has the best integration
available with Kubernetes.
Why we chose

Kubernetes
' Because the guy from Google Cloud
told us it was super cool.
🤔 Because we had no idea what that
Docker thing was about and we were
wondering.
Why we chose

Wercker
🚀 Because it was way faster than Shippable
running our Slow Rails Test Suite™ .
🤑 Because, as Shippable, it’s free.
✨ Because the UX/UI is so pretty.
KUBERNETES 101
(IN 3 MINS)
What is Kubernetes?
• Open-source system for container
orchestration and more.
• Works with many cloud providers
(Google Cloud, AWS, etc.) and bare
metal.
Basic Kubernetes concepts
• Node: a VM or bare metal machine running
Kubernetes.
• Cluster: a bunch of nodes.
• Pod: a group of one or more containers.
• Deployment: defines how many replicas of a Pod
you want and how to perform updates (deploys).
• Service: exposes some pods in a given port.
More about Kubernetes
https://www.youtube.com/watch?v=K_Kh4LMiiqQ
HOW WE USE
KUBERNETES
Worker Deployment
…
Web

Service
DB 

Service
Redis 

Service
Memcached 

Service
Memcached Deployment
Memcached Pod

memcached
Worker Pod

resque
Worker Pod

resque
Web Deployment
…Web Pod

nginx + unicorn
Web Pod

nginx + unicorn
Cron Deployment
Cron Pod

cron -f
Redis Deployment
Redis Pod

redis
DB Deployment
DB Pod

postgres
Web

Ingress
☁Internet
HELM 101
(IN 3 MINS)
What is Helm?
• It’s a package manager for Kubernetes 🤔
• Charts are packages of pre-configured Kubernetes
resources.
• You can use public Charts to easily install apps
into your cluster (eg: postgresql, wordpress).
• … Or you can create a private Chart for your
application.
What is Helm?
• You can use templates to define your Charts 🙌
• Helm has two parts:
- helm: a CLI client
- tiller: A server (tiller) than runs in your Kubernetes
cluster as another pod. You can install tiller in your
cluster with: $ helm init
More about Helm
https://www.youtube.com/watch?v=zBc1goRfk3k
https://speakerdeck.com/michellen/delivering-kubernetes-applications-with-helm
HOW WE USE
HELM
File structure & code
!"" app
!"" config
!"" db
!"" deploy
!"" lib
!"" log
!"" public
!"" script
!"" spec
!"" vendor
!"" Gemfile
!"" Gemfile.lock
!"" Procfile
!"" Rakefile
!"" config.ru
#"" wercker.yml
deploy
!"" kubernetes-chart
$   !"" templates
$   $   !"" _helpers.tpl
$   $   !"" cron.yaml
$   $   !"" db.yaml
$   $   !"" memcached.yaml
$   $   !"" redis.yaml
$   $   !"" secrets.yaml
$   $   !"" web.yaml
$   $   #"" worker.yaml
$   !"" Chart.yaml
$   !"" README.md
$   !"" production-values.yaml
$   !"" rails_env.yaml
$   !"" staging-values.yaml
$   #"" values.yaml
!"" nginx.conf
#"" unicorn.rb
https://gist.github.com/javiercr/fa4335e6bc67147b1e12523b0282a18a
WERCKER 101
(IN 3 MINS)
What is Wercker?
• It’s a Docker-Native CI/CD Automation platform for
Kubernetes & Microservice Deployments.
• With Wercker you define your CI/CD process as
Workflow composed by multiple Pipelines.
• Each Pipeline is defined by multiple Steps. 

Wercker offers a Registry of shared steps 

(eg: to install kubectl)
HOW WE USE
WERCKER
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
install nodejs, phantomjs
bundle install
rake db:create
rspec
install nodejs, nginx, cron
copy nginx.conf
copy unicorn.rb
bundle install
rake assets:precompile
hipchat notification
install kubectl
install helm
helm upgrade
hipchat notification
build
build-container
deploy-staging
Gudog’s Wercker Workflow
note that we decided to only automate deployments to staging. env.
however deploying to production it’s just one click 

(executing the deploy-production pipeline from wercker ui)
docker push to GCR
Gudog’s Wercker Workflow
Our wercker.yml:
https://gist.github.com/javiercr/fa4335e6bc67147b1e12523b0282a18a#file-wercker-yml
http://blog.wercker.com/Dockerfiles-considered-harmful
THANK YOU
Questions?
Special thanks to @LachlanEvenson from Deis
for helping me get started with Helm and the k8s community.

More Related Content

PDF
Current General CV
PPTX
OpenID Connect: An Overview
PDF
RPKI Introduction by Randy Bush
PDF
MPLS Concepts and Fundamentals
PDF
Spring Cloud Gateway
PPT
ss7 and M3UA
PDF
OpenID Connect Explained
Current General CV
OpenID Connect: An Overview
RPKI Introduction by Randy Bush
MPLS Concepts and Fundamentals
Spring Cloud Gateway
ss7 and M3UA
OpenID Connect Explained

What's hot (20)

PDF
Flagger: Istio Progressive Delivery Operator
PDF
BGP on RouterOS7 -Part 1
PPTX
OAuth2 + API Security
PPTX
Basic BGP Configuration
PDF
MPLS - Multiprotocol Label Switching
PPTX
Introduction to gRPC
PDF
HashiCorp's Vault - The Examples
PPTX
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
PDF
Hyperledger Fabric practice (v2.0)
PDF
DevConf 2014 Kernel Networking Walkthrough
PDF
20170925 onos and p4
PPTX
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
PDF
Elliptic Curves in Cryptography
PDF
Dynamic Routing with FRR - pfSense Hangout December 2017
PDF
Api Gateway
PDF
Microservices & API Gateways
PDF
Everything You wanted to Know About Distributed Tracing
PPTX
Point to-point protocol (ppp), PAP & CHAP
PDF
WSO2 Identity Server - Product Overview
PDF
OAuth & OpenID Connect Deep Dive
Flagger: Istio Progressive Delivery Operator
BGP on RouterOS7 -Part 1
OAuth2 + API Security
Basic BGP Configuration
MPLS - Multiprotocol Label Switching
Introduction to gRPC
HashiCorp's Vault - The Examples
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
Hyperledger Fabric practice (v2.0)
DevConf 2014 Kernel Networking Walkthrough
20170925 onos and p4
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
Elliptic Curves in Cryptography
Dynamic Routing with FRR - pfSense Hangout December 2017
Api Gateway
Microservices & API Gateways
Everything You wanted to Know About Distributed Tracing
Point to-point protocol (ppp), PAP & CHAP
WSO2 Identity Server - Product Overview
OAuth & OpenID Connect Deep Dive
Ad

Similar to CI/CD with Kubernetes, Helm & Wercker (#madScalability) (20)

PPTX
Introduction+to+Kubernetes-Details-D.pptx
PDF
Kubernetes Architecture - beyond a black box - Part 1
PDF
Introduction to Kubernetes Workshop
PDF
Kubernetes
PPTX
Kubernetes PPT.pptx
PDF
The App Developer's Kubernetes Toolbox
PDF
Docker and Kubernetes 101 workshop
PPTX
Kube 101
PDF
Introduction to kubernetes
PPTX
Working with kubernetes
PPTX
Kubernetes
PDF
Craig Box (Google) - The road to Kubernetes 1.0
PDF
Elastic Kubernetes Services (EKS)
PPTX
Kubernetes 101
PPTX
Kubernetes20151017a
PDF
Why do we even have Kubernetes?
PDF
Kubecon seattle 2018 workshop slides
PDF
DevJam 2019 - Introduction to Kubernetes
PPTX
Kubernetes: від знайомства до використання у CI/CD
PPTX
HA Kubernetes on Mesos / Marathon
Introduction+to+Kubernetes-Details-D.pptx
Kubernetes Architecture - beyond a black box - Part 1
Introduction to Kubernetes Workshop
Kubernetes
Kubernetes PPT.pptx
The App Developer's Kubernetes Toolbox
Docker and Kubernetes 101 workshop
Kube 101
Introduction to kubernetes
Working with kubernetes
Kubernetes
Craig Box (Google) - The road to Kubernetes 1.0
Elastic Kubernetes Services (EKS)
Kubernetes 101
Kubernetes20151017a
Why do we even have Kubernetes?
Kubecon seattle 2018 workshop slides
DevJam 2019 - Introduction to Kubernetes
Kubernetes: від знайомства до використання у CI/CD
HA Kubernetes on Mesos / Marathon
Ad

More from Diacode (13)

PDF
Phoenix for Rails Devs
PDF
Introduction to Elixir
PDF
Startup nomads
PDF
Ruby on Rails & TDD con RSpec
PDF
Hacking your bank with Ruby and reverse engineering (Madrid.rb)
PDF
TLKR.io @ Betabeers Madrid
PDF
Métricas para hacer crecer tu proyecto
PDF
Métricas para hacer crecer tu proyecto
PDF
Presentación de Kogi
PDF
Educación: The Next Big Thing
PDF
Front-End Frameworks: a quick overview
KEY
Taller de Introducción a Ruby on Rails (2ª parte)
KEY
Taller de Introducción a Ruby on Rails
Phoenix for Rails Devs
Introduction to Elixir
Startup nomads
Ruby on Rails & TDD con RSpec
Hacking your bank with Ruby and reverse engineering (Madrid.rb)
TLKR.io @ Betabeers Madrid
Métricas para hacer crecer tu proyecto
Métricas para hacer crecer tu proyecto
Presentación de Kogi
Educación: The Next Big Thing
Front-End Frameworks: a quick overview
Taller de Introducción a Ruby on Rails (2ª parte)
Taller de Introducción a Ruby on Rails

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Introduction to Artificial Intelligence
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Nekopoi APK 2025 free lastest update
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
System and Network Administraation Chapter 3
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
L1 - Introduction to python Backend.pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
How to Migrate SBCGlobal Email to Yahoo Easily
VVF-Customer-Presentation2025-Ver1.9.pptx
Introduction to Artificial Intelligence
Adobe Illustrator 28.6 Crack My Vision of Vector Design
2025 Textile ERP Trends: SAP, Odoo & Oracle
ISO 45001 Occupational Health and Safety Management System
Nekopoi APK 2025 free lastest update
How Creative Agencies Leverage Project Management Software.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Operating system designcfffgfgggggggvggggggggg
System and Network Administraation Chapter 3
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 41
L1 - Introduction to python Backend.pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Softaken Excel to vCard Converter Software.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
CHAPTER 2 - PM Management and IT Context

CI/CD with Kubernetes, Helm & Wercker (#madScalability)

  • 1. CI/CD with Kubernetes, Helm & Wercker #madScalability
 Madrid
 30/11/2016
  • 2. About me: Javier Cuevas 
 @javier_dev AIRBNB FOR DOGS “MAJESTIC” RAILS 3.2 MONOLITH RUBY ON RAILS SHOP 
 WHO EMBRACED ELIXIR previously now full time!
  • 3. First things first:
 My review of the new MacBook Pro with Touch Bar: Meh 😔
  • 4. Disclaimers 1. I learned Docker while learning Kubernetes. I ain’t no expert. 2. Gudog is not at unicorn scale. We’re just at dog scale.
  • 7. A LOOK BACK TO DEVOPS 
 @ Gudog
  • 8. Hosting / Cloud Provisioning Continuos 
 Integration Deployments 2013 DigitalOcean SSH all the things 🙀 Jenkins Capistrano 2014 AWS EC2 Rubber Shippable Capistrano 2015 AWS EC2 (OpsWorks) Chef (OpsWorks) Shippable Chef (OpsWorks) 2016 Google Container Engine 
 (GKE) Kubernetes 💙 Wercker Kubernetes + Helm
  • 9. Why we chose
 Google Cloud 😱 Because we ran out of AWS credits and we got new credits for Google Cloud. 💸 Because (now that we’re paying for it) is cheaper than AWS. 👌 Because it has the best integration available with Kubernetes.
  • 10. Why we chose
 Kubernetes ' Because the guy from Google Cloud told us it was super cool. 🤔 Because we had no idea what that Docker thing was about and we were wondering.
  • 11. Why we chose
 Wercker 🚀 Because it was way faster than Shippable running our Slow Rails Test Suite™ . 🤑 Because, as Shippable, it’s free. ✨ Because the UX/UI is so pretty.
  • 13. What is Kubernetes? • Open-source system for container orchestration and more. • Works with many cloud providers (Google Cloud, AWS, etc.) and bare metal.
  • 14. Basic Kubernetes concepts • Node: a VM or bare metal machine running Kubernetes. • Cluster: a bunch of nodes. • Pod: a group of one or more containers. • Deployment: defines how many replicas of a Pod you want and how to perform updates (deploys). • Service: exposes some pods in a given port.
  • 17. Worker Deployment … Web
 Service DB 
 Service Redis 
 Service Memcached 
 Service Memcached Deployment Memcached Pod
 memcached Worker Pod
 resque Worker Pod
 resque Web Deployment …Web Pod
 nginx + unicorn Web Pod
 nginx + unicorn Cron Deployment Cron Pod
 cron -f Redis Deployment Redis Pod
 redis DB Deployment DB Pod
 postgres Web
 Ingress ☁Internet
  • 18. HELM 101 (IN 3 MINS)
  • 19. What is Helm? • It’s a package manager for Kubernetes 🤔 • Charts are packages of pre-configured Kubernetes resources. • You can use public Charts to easily install apps into your cluster (eg: postgresql, wordpress). • … Or you can create a private Chart for your application.
  • 20. What is Helm? • You can use templates to define your Charts 🙌 • Helm has two parts: - helm: a CLI client - tiller: A server (tiller) than runs in your Kubernetes cluster as another pod. You can install tiller in your cluster with: $ helm init
  • 23. File structure & code !"" app !"" config !"" db !"" deploy !"" lib !"" log !"" public !"" script !"" spec !"" vendor !"" Gemfile !"" Gemfile.lock !"" Procfile !"" Rakefile !"" config.ru #"" wercker.yml deploy !"" kubernetes-chart $   !"" templates $   $   !"" _helpers.tpl $   $   !"" cron.yaml $   $   !"" db.yaml $   $   !"" memcached.yaml $   $   !"" redis.yaml $   $   !"" secrets.yaml $   $   !"" web.yaml $   $   #"" worker.yaml $   !"" Chart.yaml $   !"" README.md $   !"" production-values.yaml $   !"" rails_env.yaml $   !"" staging-values.yaml $   #"" values.yaml !"" nginx.conf #"" unicorn.rb https://gist.github.com/javiercr/fa4335e6bc67147b1e12523b0282a18a
  • 25. What is Wercker? • It’s a Docker-Native CI/CD Automation platform for Kubernetes & Microservice Deployments. • With Wercker you define your CI/CD process as Workflow composed by multiple Pipelines. • Each Pipeline is defined by multiple Steps. 
 Wercker offers a Registry of shared steps 
 (eg: to install kubectl)
  • 29. install nodejs, phantomjs bundle install rake db:create rspec install nodejs, nginx, cron copy nginx.conf copy unicorn.rb bundle install rake assets:precompile hipchat notification install kubectl install helm helm upgrade hipchat notification build build-container deploy-staging Gudog’s Wercker Workflow note that we decided to only automate deployments to staging. env. however deploying to production it’s just one click 
 (executing the deploy-production pipeline from wercker ui) docker push to GCR
  • 30. Gudog’s Wercker Workflow Our wercker.yml: https://gist.github.com/javiercr/fa4335e6bc67147b1e12523b0282a18a#file-wercker-yml
  • 32. THANK YOU Questions? Special thanks to @LachlanEvenson from Deis for helping me get started with Helm and the k8s community.