O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift

471 visualizações

Publicada em

Ultimate DevOps with CloudBees Jenkins Enterprise and Red Hat OpenShift. Reference Architecture for Jenkins Pipeline deployment to Openshift v3.

Publicada em: Software
  • Seja o primeiro a comentar

Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift

  1. 1. Ultimate DevOps: OpenShift & CloudBees Jenkins Platform Andy Pemberton @apemberton
  2. 2. About Andy Author of DZone Refcard on Jenkins Pipeline Hands-on Delivery experience on CloudBees Jenkins and Pipelines Lead CloudBees Solution Architecture and Consulting Teams @apemberton
  3. 3. OpenShift: PaaS by Red Hat, Built on Docker and Kubernetes
  4. 4. projects templates applications services routes pods imagestreams deployment
  5. 5. $ oc login --token=$foobar --server=https://api.foo.openshift.com $ oc new-project mobile-development $ oc project mobile-development $ oc new-app https://github.com/cloudbees/openshift-example.git $ oc scale mobile-deposit-ui-1 --replicas=4 Examples
  6. 6. $ oc help Examples
  7. 7. OpenShift Web Console
  8. 8. Jenkins
  9. 9. Easy to Start java -jar jenkins.war
  10. 10. Easy to Start java -jar jenkins.war
  11. 11. Easy to Start java -jar jenkins.war
  12. 12. Jenkins Popularity 0 1,000,000 2,000,000 3,000,000 4,000,000 5,000,000 6,000,000 7,000,000 0 20,000 40,000 60,000 80,000 100,000 120,000 11/1/2008 11/1/2009 11/1/2010 11/1/2011 11/1/2012 11/1/2013 11/1/2014 Active Jenkins Installations Worldwide Total Jenkins Jobs Worldwide http://www.infoq.com/research/ci-server http://stats.jenkins-ci.org/jenkins-stats
  13. 13. CloudBees Jenkins Enterprise … part of CloudBees Jenkins Platform Jenkins for the EnterpriseCommunity Innovation
  14. 14. Jenkins + OpenShift: better together +
  15. 15. Jenkins + OpenShift: better together MASTER AGENT AGENT AGENT AGENT AGENT AGENT Use case #1: OpenShift as an Elastic Runtime for Jenkins
  16. 16. Jenkins + OpenShift: better together MASTER Use case #2: OpenShift as deployment target from Jenkins
  17. 17. Jenkins + OpenShift: better together MASTER AGENT AGENT AGENT
  18. 18. Jenkins Pipeline
  19. 19. Pipeline: a new Job Type
  20. 20. Pipeline: a new Job Type Concise Long-running Durable Flexible Extensible 22
  21. 21. stage 'build' node { checkout scm tool 'mvn-3.3' sh 'mvn clean install' stash name: 'source', excludes: 'target/' } stage 'test' node { unstash 'source' sh 'mvn verify' }
  22. 22. Pipeline-as-Code
  23. 23. PIPELINE
  24. 24. Jenkins Pipeline + OpenShift
  25. 25. Live Demo. What could go wrong?
  26. 26. https://github.com/cloudbees/openshift-example
  27. 27. wrap([$class: 'OpenShiftBuildWrapper', url: 'https://api.foobar.openshift.com', credentialsId: 'development-credentials', installation: 'oc-latest']){ ... } Your OpenShift server API (Origin, Enterprise, etc.)
  28. 28. wrap([$class: 'OpenShiftBuildWrapper', url: 'https://api.foobar.openshift.com', credentialsId: 'development-credentials', installation: 'oc-latest']){ ... } Credentials for your OpenShift account (probably a serviceaccount)
  29. 29. wrap([$class: 'OpenShiftBuildWrapper', url: 'https://api.foobar.openshift.com', credentialsId: 'development-credentials', installation: 'oc-latest']){ ... } CLI version for your OpenShift Server, defined by a Jenkins Tool
  30. 30. wrap([$class: 'OpenShiftBuildWrapper', ... ]){ oc('project mobile-development -q') def bc = oc('get bc -o json') if(!bc.items) { oc("new-app --name=mobile-deposit-ui --code='.’ --image-stream=jboss-webserver30-tomcat8-openshift") wait('app=mobile-deposit-ui', 5, 'MINUTES') oc('expose service mobile-deposit-ui') } else { oc("start-build mobile-deposit-ui --from-dir=. --wait") } }
  31. 31. Additional Resources
  32. 32. Additional Resources https://blog.openshift.com/openshift-cloudbees-jenkins-enterprise-devops https://www.cloudbees.com/partners/platform/red-hat @apemberton
  33. 33. www.cloudbees.com/get-started
  34. 34. CloudBees Jenkins Platform Editions Platinum Support Gold Support Enterprise Edition Cloud/Container Support Private SaaS Edition ü Self-Service ü Docker-based ü Elastic & Resilient ü Private Cloud ü Analytics ü Shared Resources

×