Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
@burrsutter burr@redhat.com
Fabric8: Better Software Faster
with Docker, Kubernetes, Jenkins
�ಂಗ��
�ಂಗ��
�ಂಗ��
Change History
1.0 - Great Indian Developer Summit
developers.redhat.com
Continuous improvement
is better than delayed
perfection. Mark Twain
(American Writer, Satirist)
Your Journey to
Awesomeness
Self-Service,
On-Demand,
Elastic
Infrastructure
Automation
Puppet, Chef,
Ansible,
Kubernetes
C...
java-jar myapp.jar
DropWizard
www.dropwizard.io
JAX-RS API
First to market
DropWizard Metrics
Embeddable
servers:
Jetty
Sp...
Our IT World Morphs
Jez Humble Continuous Integration
 Software (trunk) is always deployable
 Everyone is checking into trunk daily (at leas...
https://fabric8.io/
 Create wizards to create microservices
 Build packaging into immutable container images
 Release rolling upgrades acro...
Your Stack Matters
Server Hardware
Operating System
Application Server
your.war
Java Virtual Machine
Custom Configuration
...
 Lightweight footprint, minimal overhead
 Portability across machines
 Simplify DevOps practices
 Speed up Continuous ...
Docker Demo
DevOps Challenges for Multiple Containers
 How to scale?
 How to avoid port conflicts?
 How to manage them on
multiple ...
 Greek for “Helmsman,” also the root of the
word “Governor” (from latin: gubernator)
 Container orchestrator
 Supports ...
Ops
Dev
Master
api
etcd
scheduler
controllers
Kubernetes Cluster
Node
Node Node
Node Node
Logge
r
Node
Pod
Replication
Controller/
Deployment
Service Label
 1+ containers
 Shared IP
 Shared storage volume
 Shared resource...
Pods
A group of whales is commonly referred to
as a pod and a pod usually consists a
group of whales that have bonded toge...
Key Kubernetes Capabilities
 Self-healing
 Horizontal manual & auto scaling
 Automatic restarting
 Scheduled across ho...
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev...
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...
Kubernetes Demo
https://github.com/burrsutter/kube4docker
Recorded Demo: https://youtu.be/AoDhQt8PtUQ
The job of a deployment pipeline
is to prove that the release
candidate is unreleasable.
Jez Humble
Jenkins for Continuous Delivery
Jenkins Pipeline
implements CD:
 orchestrator of build,
test, promote,
approve steps
 ol...
Jenkinsfile
Simple
node('maven') {
stage 'validate'
echo 'Test some stuff'
sleep 10
input "Approve?"
stage 'build'
openshiftBuild(buil...
Leveraging “oc”
node('maven') {
stage 'Git'
git url: 'https://github.com/burrsutter/ola'
stage 'Maven build'
sh "mvn packa...
https://github.com/redhat-helloworld-
msa/aloha/blob/master/Jenkinsfile
https://github.com/Red-Hat-Middleware-
Keynote/cic...
Jenkins Demo
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
Canary Deployment
DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS
SCM
More Information
THANK YOU!
http://bit.ly/msa-instructions
@burrsutter burr@redhat.com
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Prochain SlideShare
Chargement dans…5
×

Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins

These days time to value is critical. We all need to develop better software and to get it to customers faster. The quicker the software gets to customers, the more iterations and feedback then the more value we create. Continuous Delivery of Containerized Microservices is the best approach today for developing better software by iterating fast, capturing user feedback and iterating again, continuously.

In this talk, we'll introduce the Fabric8 Microservices Platform which is open source, Apache licensed and built on top of Docker, Kubernetes, OpenShift and Jenkins. We'll demonstrate how to create microservices easily, have them automatically built, tested and staged with Continuous Delivery and deal with the issues of supporting microservices architectures like service discovery, high availability, auto scaling, rolling upgrades, canary deployments, circuit breakers, tracing, logging and metrics.

  • Soyez le premier à commenter

Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins

  1. 1. @burrsutter burr@redhat.com Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
  2. 2. �ಂಗ��
  3. 3. �ಂಗ��
  4. 4. �ಂಗ��
  5. 5. Change History 1.0 - Great Indian Developer Summit
  6. 6. developers.redhat.com
  7. 7. Continuous improvement is better than delayed perfection. Mark Twain (American Writer, Satirist)
  8. 8. Your Journey to Awesomeness Self-Service, On-Demand, Elastic Infrastructure Automation Puppet, Chef, Ansible, Kubernetes CI & CD Deployment Pipeline Advanced Deployment Techniques Microservices Re-Org to DevOps
  9. 9. java-jar myapp.jar DropWizard www.dropwizard.io JAX-RS API First to market DropWizard Metrics Embeddable servers: Jetty Spring Boot projects.spring.io/spring- boot Spring API (@RestController) ‘Starter’ POMs: start.spring.io Embeddable servers: Tomcat, Jetty, Undertow WildFly Swarm wildfly-swarm.io Java EE 7 APIs ‘Starter’ POMs: wildfly- swarm.io/generator Embeddable servers: WildFly (Undertow) Vert.x vertx.io Reactive Async/non-blocking vertx run myhttp.java HTTP, HTTP/2, TCP, UDP, Websockets, etc. (out of the box)
  10. 10. Our IT World Morphs
  11. 11. Jez Humble Continuous Integration  Software (trunk) is always deployable  Everyone is checking into trunk daily (at least)— not feature branches  If the build breaks, it’s fixed in 10 minutes (all hands on deck)  A new engineer can be on-boarded in 1 day— with a production-like environment on the developer workstation  Deployment is a low-risk, push-button affair
  12. 12. https://fabric8.io/
  13. 13.  Create wizards to create microservices  Build packaging into immutable container images  Release rolling upgrades across teams environments  Runtime service discovery, scaling, failover, load balancing  Manage centralize logs, metrics, alerts, tracing, circuit breakers  Feedback dashboards and metrics to get feedback!  Platform on premise, public or hybrid cloud Fabric8 (https://fabric8.io/)
  14. 14. Your Stack Matters Server Hardware Operating System Application Server your.war Java Virtual Machine Custom Configuration Linux Kernel Version & Distribution Java 1.6.6_45 or Java 1.7.0_67 Weblogic 10.x.y, Tomcat 6.x.y, JBoss EAP 6.x.y JDBC driver, datasource, JMS queue, users
  15. 15.  Lightweight footprint, minimal overhead  Portability across machines  Simplify DevOps practices  Speed up Continuous Integration  Empower Microservices architectures  Isolation Container Advantages Container Engine
  16. 16. Docker Demo
  17. 17. DevOps Challenges for Multiple Containers  How to scale?  How to avoid port conflicts?  How to manage them on multiple hosts?  What happens if a host has trouble?  How to keep them running?  How to update them?  Where are my containers? Node Node Node Node Node Logger Node
  18. 18.  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
  19. 19. Ops Dev Master api etcd scheduler controllers Kubernetes Cluster Node Node Node Node Node Logge r Node
  20. 20. Pod Replication Controller/ Deployment Service Label  1+ 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 (acting as one) has stable virtual IP and DNS name  Key/Value pairs associated with Kubernetes objects (env=production) Kubernetes Cluster
  21. 21. Pods A group of whales is commonly referred to as a pod and a pod usually consists a group of whales that have bonded together either because of biological reasons or through friendships developed between two or more whales. In many cases a typical whale pod consists of anywhere from 2 to 30 whales or more.* *http://www.whalefacts.org/what-is-a-group-of-whales-called/
  22. 22. Key Kubernetes Capabilities  Self-healing  Horizontal manual & auto scaling  Automatic restarting  Scheduled across hosts  Built-in load-balancer  Rolling upgrades
  23. 23. 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 - Deployments - Services - Builds - Routes - DeploymentConfigs Kubernetes OpenShift - Builds - ImageStreams
  24. 24. 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 - Deployments - Services - Builds - Routes - DeploymentConfigs Kubernetes OpenShift - Builds - ImageStreams
  25. 25. 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 - Deployments - Services - Builds - Routes - DeploymentConfigs Kubernetes OpenShift - Builds - ImageStreams
  26. 26. 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 - Deployments - Services - Builds - Routes - DeploymentConfigs Kubernetes OpenShift - Builds - ImageStreams
  27. 27. Kubernetes Demo https://github.com/burrsutter/kube4docker Recorded Demo: https://youtu.be/AoDhQt8PtUQ
  28. 28. The job of a deployment pipeline is to prove that the release candidate is unreleasable. Jez Humble
  29. 29. Jenkins for Continuous Delivery Jenkins Pipeline implements CD:  orchestrator of build, test, promote, approve steps  old name is Jenkins Workflow plugin A Jenkinsfile:  a Groovy DSL for defining the pipeline steps, pods, docker images, secret  maps to a single Jenkins job with minimal configuration  Label parts of the pipeline with stages to simplify pipeline progress visualisation  Pipeline as code! Fabric8 adds a reusable library of:  Jenkinsfiles (pipelines) for different technologies  functions for reuse of code across the Jenkinsfiles
  30. 30. Jenkinsfile
  31. 31. Simple node('maven') { stage 'validate' echo 'Test some stuff' sleep 10 input "Approve?" stage 'build' openshiftBuild(buildConfig: 'ruby-sample-build', showBuildLogs: 'true') stage 'deploy' openshiftDeploy(deploymentConfig: 'frontend') }
  32. 32. Leveraging “oc” node('maven') { stage 'Git' git url: 'https://github.com/burrsutter/ola' stage 'Maven build' sh "mvn package" stage 'Unit Tests' echo "Unit Tests" stage 'Docker build' echo "Login" withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'developer', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) { sh "oc login --insecure-skip-tls-verify=true -u $env.USERNAME -p $env.PASSWORD https://10.1.2.2:8443" } echo "OpenShift Docker Build" sh "oc new-build --binary --name=ola -l app=ola || echo 'Build exists'" sh "oc start-build ola --from-dir=. --follow" stage 'Integration Tests' echo "Integration Tests" stage 'Deploy' echo "Deploy, Deploy, Deploy" sh "oc new-app ola -l app=ola,hystrix.enabled=true || echo 'Application already Exists'" sh "oc expose service ola || echo 'Service already exposed'" }
  33. 33. https://github.com/redhat-helloworld- msa/aloha/blob/master/Jenkinsfile https://github.com/Red-Hat-Middleware- Keynote/cicd/blob/master/blue-green https://github.com/Red-Hat-Middleware- Keynote/cicd/blob/master/canary Other Jenkinsfile Examples
  34. 34. Jenkins Demo
  35. 35. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  36. 36. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  37. 37. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  38. 38. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  39. 39. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  40. 40. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  41. 41. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  42. 42. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  43. 43. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  44. 44. Canary Deployment DEVELOPMENT QA STAGING PRODUCTION ROUTER USERS SCM
  45. 45. More Information THANK YOU! http://bit.ly/msa-instructions @burrsutter burr@redhat.com

×