SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
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.
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
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.

Weitere ähnliche Inhalte

Was ist angesagt?

Kubernetes and container security
Kubernetes and container securityKubernetes and container security
Kubernetes and container security
Volodymyr Shynkar
 

Was ist angesagt? (20)

Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
Argocd up and running
Argocd up and runningArgocd up and running
Argocd up and running
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
KFServing and Kubeflow Pipelines
KFServing and Kubeflow PipelinesKFServing and Kubeflow Pipelines
KFServing and Kubeflow Pipelines
 
Secret Management with Hashicorp Vault and Consul on Kubernetes
Secret Management with Hashicorp Vault and Consul on KubernetesSecret Management with Hashicorp Vault and Consul on Kubernetes
Secret Management with Hashicorp Vault and Consul on Kubernetes
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
 
What Is Helm
 What Is Helm What Is Helm
What Is Helm
 
Kubernetes and container security
Kubernetes and container securityKubernetes and container security
Kubernetes and container security
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & Operators
 
NGINX Ingress Controller for Kubernetes
NGINX Ingress Controller for KubernetesNGINX Ingress Controller for Kubernetes
NGINX Ingress Controller for Kubernetes
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security Journey
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operators
 
Opa gatekeeper
Opa gatekeeperOpa gatekeeper
Opa gatekeeper
 
Securing and Automating Kubernetes with Kyverno
Securing and Automating Kubernetes with KyvernoSecuring and Automating Kubernetes with Kyverno
Securing and Automating Kubernetes with Kyverno
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Rancher and Kubernetes Best Practices
Rancher and  Kubernetes Best PracticesRancher and  Kubernetes Best Practices
Rancher and Kubernetes Best Practices
 
GitOps on Kubernetes with Carvel
GitOps on Kubernetes with CarvelGitOps on Kubernetes with Carvel
GitOps on Kubernetes with Carvel
 

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

Ähnlich wie CI/CD with Kubernetes, Helm & Wercker (#madScalability) (20)

Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
 
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation NightKubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 
What Is AWS Elastic Kubernetes Service
 What Is AWS Elastic Kubernetes Service What Is AWS Elastic Kubernetes Service
What Is AWS Elastic Kubernetes Service
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
Containerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with KubernetesContainerised ASP.NET Core apps with Kubernetes
Containerised ASP.NET Core apps with Kubernetes
 
Resilient microservices with Kubernetes - Mete Atamel
Resilient microservices with Kubernetes - Mete AtamelResilient microservices with Kubernetes - Mete Atamel
Resilient microservices with Kubernetes - Mete Atamel
 
ProxySQL on Kubernetes
ProxySQL on KubernetesProxySQL on Kubernetes
ProxySQL on Kubernetes
 
Deliver Docker Containers Continuously on AWS - QCon 2017
Deliver Docker Containers Continuously on AWS - QCon 2017Deliver Docker Containers Continuously on AWS - QCon 2017
Deliver Docker Containers Continuously on AWS - QCon 2017
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
 
Cassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons Learned
 

Mehr von Diacode

Presentación de Kogi
Presentación de KogiPresentación de Kogi
Presentación de Kogi
Diacode
 

Mehr von Diacode (13)

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

Kürzlich hochgeladen

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Kürzlich hochgeladen (20)

WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

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.
  • 5.
  • 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)
  • 27.
  • 28.
  • 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.