Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1
Microservices with Docker,
Kubernetes and Jenkins
Rafael Benevides & Christian Posta
@rafabene / @christianposta
http://...
Christian Posta
Principal Middleware Architect at Red Hat
christian@redhat.com
@christianposta
● Author “Microservices for...
Rafael Benevides
Director of Developer Experience at Red Hat
Apache DeltaSpike P.M.C
benevides@redhat.com
@rafabene
Java C...
developers.redhat.com
http://developers.redhat.comhttp://developers.redhat.com
@rafabene and @christianposta
Why do you want to run your application inside containers?
@rafabene and @christianposta
● Lightweight footprint and minimal overhead,
● Portability across machines,
● Simplify DevO...
@rafabene and @christianposta
A way to run a Linux container:
$ docker run -d <image-name>
A single and isolated Linux pro...
@rafabene and @christianposta
DevOps challenges for multiple containers
● How to scale?
● How to avoid port conflicts?
● H...
@rafabene and @christianposta
Greek for “Helmsman”; also the root of the word
“Governor” (from latin: gubernator)
● Contai...
@rafabene and @christianposta
Version 1.3
Hosted on GitHub
800+ contributors
34,000+ commits
16,000+ GitHub stars
Red Hat
...
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev...
@rafabene developers.redhat.com
Kubernetes Concepts
Pod Replication
Controller
Service Label
One or More Containers
Shared...
@rafabene and @christianposta
Concept: Pod
● Group of containers
● Live and die together
● Share:
○ IP
○ Secrets
○ Volumes...
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node...
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node...
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node...
@rafabene and @christianposta
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
E...
@rafabene and @christianposta
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
E...
@rafabene and @christianposta
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
E...
@rafabene and @christianposta
Node 2
POD
App: Cool
Env: Prod
Version: 1.0
POD
Service
Labels selector:
● App=Cool
● Env=Pr...
@rafabene and @christianposta
Using Environment variables:
Using internal DNS: $ ping mysql
Service discovery
@rafabene and @christianposta
Deployment Concept: Rolling Updates
Pod
Replication
Controller
Pod Pod Pod
App: Cool
Version...
@rafabene and @christianposta
If you want to now more about Kubernetes, join
The "Kubernertes for Java Developers" lab
Wed...
@rafabene and @christianposta
@rafabene and @christianposta
Hello World Service
- Greet
Guestbook Service
- Create
Guestbook Service -
Retrieve
@rafabene and @christianposta
Creating business value through software is
about speed, safety, iteration, and continuous
i...
@rafabene and @christianposta
@rafabene and @christianposta
How do we deliver value fast (and safely)?
ANSWER:
Continuous delivery of containerized micr...
@rafabene and @christianposta
Challenges of microservices CI/CD
● Lots of independent teams want their own
○ flexible pipe...
@rafabene and @christianposta
Jenkins and Kubernetes is kinda groovy!
Jenkins Pipeline + Jenkins Kubernetes Plugin Rocks!
@rafabene and @christianposta
Fabric8 all the things!
● Built on top of Kubernetes
● Wizards to create microservices
● Pac...
@rafabene and @christianposta
Fabric8 stands on the shoulder of giants
@rafabene and @christianposta
And more giants...
@rafabene and @christianposta
And more giants...
@rafabene and @christianposta
Did I mention giants...
@rafabene and @christianposta
Getting started with Fabric8 on Kubernetes
● Kubernetes
○ Google Container Engine (GKE)
http...
@rafabene and @christianposta
Demo Time!! Please reach out with questions!
Rafael Benevides
@rafabene
benevides@redhat.com...
Upcoming SlideShare
Loading in …5
×

Java one kubernetes, jenkins and microservices

875 views

Published on

The talk Rafael and I gave at Java One

Published in: Software
  • Be the first to comment

Java one kubernetes, jenkins and microservices

  1. 1. 1 Microservices with Docker, Kubernetes and Jenkins Rafael Benevides & Christian Posta @rafabene / @christianposta http://bit.ly/kb8s-intro
  2. 2. Christian Posta Principal Middleware Architect at Red Hat christian@redhat.com @christianposta ● Author “Microservices for Java Developers” ● Committer Apache Camel, ActiveMQ, ActiveMQ PMC, Fabric8.io ● Worked with large Microservices, web-scale companies ● Blogger, speaker about microservices, DevOps, cloud, distributed systems, messaging
  3. 3. Rafael Benevides Director of Developer Experience at Red Hat Apache DeltaSpike P.M.C benevides@redhat.com @rafabene Java Certifications: SCJA / SCJP / SCWCD / SCBCD / SCEA JBoss Certifications: JBCD / JBCAA Red Hat Certifications: OpenShift / Containers / Ansible Other Certifications: SAP Netweaver / ITIL / IBM Software Quality
  4. 4. developers.redhat.com http://developers.redhat.comhttp://developers.redhat.com
  5. 5. @rafabene and @christianposta Why do you want to run your application inside containers?
  6. 6. @rafabene and @christianposta ● Lightweight footprint and minimal overhead, ● Portability across machines, ● Simplify DevOps practices, ● Speeds up Continuous Integration, ● Empower Microservices Architectures. ● Isolation Container Advantages Container Engine
  7. 7. @rafabene and @christianposta A way to run a Linux container: $ docker run -d <image-name> A single and isolated Linux process running in a single machine
  8. 8. @rafabene and @christianposta DevOps challenges for multiple containers ● How to scale? ● How to avoid port conflicts? ● How to manage them in multiple hosts? ● What happens if a host has a trouble? ● How to keep them running? ● How to update them? ● Where are my containers? Node Node Logger Node Node Node Node
  9. 9. @rafabene and @christianposta Greek for “Helmsman”; also the root of the word “Governor” (from latin: gubernator) ● Container orchestrator ● Supports multiple cloud and bare-metal environments ● Inspired by Google’s experience with containers ● Open source, written in Go Manage applications, not machines Meet Kubernetes
  10. 10. @rafabene and @christianposta Version 1.3 Hosted on GitHub 800+ contributors 34,000+ commits 16,000+ GitHub stars Red Hat HP IBM Mesosphere Microsoft Project Partners CoreOS Pivotal SaltStack VMWare http://kubernetes.io/ https://github.com/kubernetes/kubernetes Open Source community
  11. 11. Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops SCM (Git/Svn) CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  12. 12. @rafabene developers.redhat.com Kubernetes Concepts Pod Replication Controller Service Label One or More Containers Shared IP Shared Storage Volume Shared Resources Shared Lifecycle Ensures that a specified number of pod replicas are running at any one time Grouping of pods, act as one, has stable virtual IP and DNS name Key/Value pairs associated with Kubernetes objects (e.g. env=production)
  13. 13. @rafabene and @christianposta Concept: Pod ● Group of containers ● Live and die together ● Share: ○ IP ○ Secrets ○ Volumes ○ Labels * * we will talk about labels later Labels Application Administrative console Log collector IP: 10.x.x.x Volume
  14. 14. SCM (Git/Svn) Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  15. 15. SCM (Git/Svn) Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  16. 16. SCM (Git/Svn) Master API Server Service Layer VirtualPhysical Private Public Persistent Storage Node Node Logger Node Node Node Node Dev Ops CI/CD Automation Routing Layer Registry SDN Overlay Network Controllers - Scheduler - Replication - Services - Builds - Routes - Deployment Kubernetes OpenShift - Deployments - Builds - ImageStreams
  17. 17. @rafabene and @christianposta Concept: Labels App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Everything in Kubernetes can have a label Node Logger Node NodeNode
  18. 18. @rafabene and @christianposta Concept: Labels App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Logger Node NodeNode Node
  19. 19. @rafabene and @christianposta Concept: Labels App: Cool Env: Dev Version: 1.0 App: Cool Env: Prod Version: 1.0 App: Cool Env: Dev Version: 2.0 App: Cool Env: Prod Version: 2.0 Logger Node Node Node Node
  20. 20. @rafabene and @christianposta Node 2 POD App: Cool Env: Prod Version: 1.0 POD Service Labels selector: ● App=Cool ● Env=Prod IP: 172.x.x.x App: Nice Env: Prod Version: 1.0 Concept: Services Node 1 POD
  21. 21. @rafabene and @christianposta Using Environment variables: Using internal DNS: $ ping mysql Service discovery
  22. 22. @rafabene and @christianposta Deployment Concept: Rolling Updates Pod Replication Controller Pod Pod Pod App: Cool Version: 1.0 Version: 1.0 Replicas: 4 Backend Replication Controller Version: 2.0 Replicas: 1 PodPod Pod Pod App: Cool Version: 2.0 Version: 1.0 Replicas: 3 Version: 2.0 Replicas: 2 Version: 1.0 Replicas: 2 Version: 2.0 Replicas: 3 Version: 1.0 Replicas: 1 Version: 2.0 Replicas: 4
  23. 23. @rafabene and @christianposta If you want to now more about Kubernetes, join The "Kubernertes for Java Developers" lab Wednesday, Sep 21, 12:30 p.m. - 2:30 p.m. Hilton - Franciscan Room C/D
  24. 24. @rafabene and @christianposta
  25. 25. @rafabene and @christianposta Hello World Service - Greet Guestbook Service - Create Guestbook Service - Retrieve
  26. 26. @rafabene and @christianposta Creating business value through software is about speed, safety, iteration, and continuous improvement
  27. 27. @rafabene and @christianposta
  28. 28. @rafabene and @christianposta How do we deliver value fast (and safely)? ANSWER: Continuous delivery of containerized microservices
  29. 29. @rafabene and @christianposta Challenges of microservices CI/CD ● Lots of independent teams want their own ○ flexible pipelines ○ Environments (Dev/IST/UAT/Prod) ○ Resources (compute, network, storage) ● Automation because we have lots of microservices ○ Creation of projects, CD pipelines, environments, releases, etc.
  30. 30. @rafabene and @christianposta Jenkins and Kubernetes is kinda groovy! Jenkins Pipeline + Jenkins Kubernetes Plugin Rocks!
  31. 31. @rafabene and @christianposta Fabric8 all the things! ● Built on top of Kubernetes ● Wizards to create microservices ● Package as immutable containers ● Rolling upgrade across environments ● 1-Click install of fully configured CI/CD (Jenkins Pipeline, Nexus, Git) ● Feedback loops ● Lots of developer tooling http://fabric8.io
  32. 32. @rafabene and @christianposta Fabric8 stands on the shoulder of giants
  33. 33. @rafabene and @christianposta And more giants...
  34. 34. @rafabene and @christianposta And more giants...
  35. 35. @rafabene and @christianposta Did I mention giants...
  36. 36. @rafabene and @christianposta Getting started with Fabric8 on Kubernetes ● Kubernetes ○ Google Container Engine (GKE) http://cloud.google.com/container-engine ○ Amazon, Azure, Digital Ocean, et.al. https://stackpoint.io ○ On premise: http://kubernetes.io ● OpenShift (Enterprise Kubernetes) ○ https://openshift.com ● Then deploy fabric8 with gofabric8 deploy ○ https://github.com/fabric8io/gofabric8 http://fabric8.io
  37. 37. @rafabene and @christianposta Demo Time!! Please reach out with questions! Rafael Benevides @rafabene benevides@redhat.com Christian Posta @christianposta christian@redhat.com

×