ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
CI/CD with OpenShift and Jenkins
by Ari LiVigni, Michal Fojtik, and Aaron Weitekamp
Agenda
¡ñ Introduction and Goals
¡ñ Jenkins Master/Slave Setup and Tools
¡ñ CI/CD Workflow and Pipeline
¡ñ Demo
¡ñ Q&A
Why Containers?
¡ñ Speed
¡ñ Agility (Cattle vs Pets)
¡ñ Microservices are real
¡ñ Ephemeral nature enforces persistent data volume
¡ñ Portability / reproducibility
Why OpenShift?
¡ñ Run containers in cluster, DNS routing
¡ñ Application blueprints (templatize microservices)
¡ñ Integrated components and services: Builds,
Docker Registry, Jenkins and more...
¡ñ Source-to-Image (S2I)
¡ñ Generalize a container-based CI/CD pipeline
1. Test every code change automatically
2. Build image and promote manually
3. Deploy to Stage
4. Deploy to Production
¡ñ Prevent promotion of broken builds
Goals
Jenkins on OpenShift
¡ñ Master / Slave
¡ñ S2I allows customization of Jenkins image
¡ñ Template to turn any builder image into a Jenkins
slave
¡ð Slaves reach out to Jenkins and download JNLP Java agent
¡ð Slave provides same environment as application runtime
¡ð Slaves run as Pods and are started on-demand
Jenkins Job Builder
¡ñ Jenkins jobs defined locally as YAML templates,
uploaded as XML to any Jenkins Master
¡ñ Templating reduces redundancy in Jenkins jobs
¡ñ Maintain YAML, not XML
¡ñ Promotes source control management
CI/CD Workflow/Pipeline
Enough talk
Show me the demo!
Conclusion
¡ñ Creating a custom CI/CD pipeline should be easy
¡ñ Openshift Roadmap, release v3.3
¡ð Example https://github.com/arilivigni/openshift-ci-pipeline
¡ð Openshift Jenkins Plugin
¡ñ Add Delivery Pipeline plugin to show visualization
¡ñ Add more features to JJB for Promoted Build plugin
References
¡ñ OpenShift CI
¡ð Openshift Jenkins https://github.com/openshift/jenkins
¡ð Example https://github.com/arilivigni/openshift-ci-pipeline
¡ð Vagrant quickstart https://www.openshift.org/vm/
¡ð Video https://youtu.be/IreIK-jICgY
¡ñ Jenkins Plugins
¡ð Promoted builds plugin https://wiki.jenkins-ci.
org/display/JENKINS/Promoted+Builds+Plugin
¡ð OpenShift pipeline plugin
https://wiki.jenkins-ci.org/display/JENKINS/OpenShift+Pipeline+Plugin

More Related Content

CI/CD with Openshift and Jenkins

  • 1. CI/CD with OpenShift and Jenkins by Ari LiVigni, Michal Fojtik, and Aaron Weitekamp
  • 2. Agenda ¡ñ Introduction and Goals ¡ñ Jenkins Master/Slave Setup and Tools ¡ñ CI/CD Workflow and Pipeline ¡ñ Demo ¡ñ Q&A
  • 3. Why Containers? ¡ñ Speed ¡ñ Agility (Cattle vs Pets) ¡ñ Microservices are real ¡ñ Ephemeral nature enforces persistent data volume ¡ñ Portability / reproducibility
  • 4. Why OpenShift? ¡ñ Run containers in cluster, DNS routing ¡ñ Application blueprints (templatize microservices) ¡ñ Integrated components and services: Builds, Docker Registry, Jenkins and more... ¡ñ Source-to-Image (S2I)
  • 5. ¡ñ Generalize a container-based CI/CD pipeline 1. Test every code change automatically 2. Build image and promote manually 3. Deploy to Stage 4. Deploy to Production ¡ñ Prevent promotion of broken builds Goals
  • 6. Jenkins on OpenShift ¡ñ Master / Slave ¡ñ S2I allows customization of Jenkins image ¡ñ Template to turn any builder image into a Jenkins slave ¡ð Slaves reach out to Jenkins and download JNLP Java agent ¡ð Slave provides same environment as application runtime ¡ð Slaves run as Pods and are started on-demand
  • 7. Jenkins Job Builder ¡ñ Jenkins jobs defined locally as YAML templates, uploaded as XML to any Jenkins Master ¡ñ Templating reduces redundancy in Jenkins jobs ¡ñ Maintain YAML, not XML ¡ñ Promotes source control management
  • 10. Conclusion ¡ñ Creating a custom CI/CD pipeline should be easy ¡ñ Openshift Roadmap, release v3.3 ¡ð Example https://github.com/arilivigni/openshift-ci-pipeline ¡ð Openshift Jenkins Plugin ¡ñ Add Delivery Pipeline plugin to show visualization ¡ñ Add more features to JJB for Promoted Build plugin
  • 11. References ¡ñ OpenShift CI ¡ð Openshift Jenkins https://github.com/openshift/jenkins ¡ð Example https://github.com/arilivigni/openshift-ci-pipeline ¡ð Vagrant quickstart https://www.openshift.org/vm/ ¡ð Video https://youtu.be/IreIK-jICgY ¡ñ Jenkins Plugins ¡ð Promoted builds plugin https://wiki.jenkins-ci. org/display/JENKINS/Promoted+Builds+Plugin ¡ð OpenShift pipeline plugin https://wiki.jenkins-ci.org/display/JENKINS/OpenShift+Pipeline+Plugin