Difficulty: Introduction
Estimated Time: 20 minutes

Jenkins on Kubernetes

Jenkins

Canary Releases with Jenkins on Kubernetes

This demonstration covers these topics:

  • A personal Kubernetes cluster with Minikube
  • Install and configure Jenkins from Helm chart
  • Installing Prometheus from Helm chart
  • Demonstrating Kubernetes plugin for Jenkins
  • Build, deploy and run container from Jenkinsfile
  • Update container with canary deployment
  • Monitoring canary deployments
  • Rollback canary

Canary release is a technique to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybody. - MartinFowler.com

Instructions Overview

  • Start a personal Kubernetes cluster
  • Create a Quay.io robot account and copy the credentials
  • Install Jenkins on the cluster
  • Configure Jenkins to leverage Kubernetes
  • Create a pipeline that builds on and publishes to Kubernetes
  • Roadmap: Add Prometheus-Operator monitoring stack from Helm charts
  • Roadmap: Observe monitoring of a deployed container
  • Roadmap: See how canary deployments work with this workflow

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat. It supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase and RTC, and can execute Apache Ant, Apache Maven and sbt based projects as well as arbitrary shell scripts and Windows batch commands. The creator of Jenkins is Kohsuke Kawaguchi. Released under the MIT License, Jenkins is free software.

Conclusion

You now understand ...

Lessons Learned

With these scenarios you have learned how:

  • to TODO...
  • to TODO...
  • to TODO...

Hopefully you also understand how Kubernetes is a new type of data center operating system that can run your applications - across multiple nodes on your local laptop, a rack of servers, or any cloud target.

Technology stack

This demonstration was performed with these tools. Newer versions may exist.

  • VirtualBox 5.8
  • Minikube 0.29.2 (with Kubernetes 1.9.4)
  • Kubectl 1.10.0
  • Helm 2.10.0
  • Prometheus Operator
  • Kube-Prometheus (Alertmanager + Grafana)
  • Python
  • See jenkins-value.yaml file for Jenkins version and its plugins

References

Acknowledgments

Etcetera

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Jenkins

Step 1 of 5

Setup

Verify Minikube and Helm are ready.

minikube status && kubectl version && helm version

Clone this project from GitHub

git clone https://github.com/javajon/jenkins-kubernetes && cd jenkins-kubernetes

Terminal
Kubernetes Dashboard
Jenkins Portal