Jenkins Container Support Juggernaut Arrives at Kubernetes, Google Container Registry

Written by: Harpreet Singh

Jenkins now publishes Docker containers to Google Container Registry.
Use Kubernetes to run isolated containers as agents in Jenkins.

Last month, I wrote about exciting news with Jenkins namely its support for Docker. This month, I am happy to announce that Jenkins continues on its march for container technology support by providing support for Kubernetes.

Overview of all technology components in this blog:

Kubernetes
Kubernetes is a system to help manage a cluster of Linux containers as a single system. Kubernetes is an open source project that was started by Google and now supported by various companies such Red Hat, IBM and others.

Kubernetes and Docker
As teams graduate beyond simple use cases with Docker, they realise that containers are not really meant to be deployed as a single unit.The next question is, how to do you start these containers across multiple hosts, how can these containers be grouped together and treated as a single unit of deployment? This is the use case that Kubernetes solves.

Google Container Registry
The container registry is a service by Google to securely host, share and manager private container repositories and is part of the Google Container Engine service.

Interplay of these technology pieces

Kubernetes, Google Container Registry, Docker and Jenkins
While Kubernetes focusses on the deployment side of Docker, Jenkins focuses the entire lifecycle of moving your docker containers from development to production. If a team builds a CD pipeline, the pipeline is managed through Jenkins which moves the containers through the pipeline (Dev->QA->Prod) and the containers finally deployed using Kubernetes. Thus, the four technologies make for a powerful combination for building CD pipelines.

Kubernetes and Jenkins announcement
With Docker, I talked about 2 meta-use cases

Building CD pipelines with Docker and
Using Docker containers as Jenkins agents.

Today, the Jenkins community brings both stories to the Kubernetes.

Use case 1 : Building CD pipelines with Google Container Registry
The first use case enables teams to work with Google Container Registry (GCR). The community has taken the Docker Build and Publish plugin and extended it so that builds can publish containers to GCR. Details on this blog.

Use case 2 : First class support for Jenkins Workflow
Jenkins Workflow is fast becoming the standard way to build real world pipelines with Jenkins. Build managers can use the Workflow DSL to build these pipelines The community has provided support for Kubernetes by adding a kubernetes DSL that launches a build within a Kubernetes cluster.

Use case 3 : Running docker containers as Jenkins agents through Kubernetes
One of the common issues in Jenkins is isolating agents. Today, if an errant build contaminates the build machine, it may impact downstream builds. If these agents are running as Docker containers, any “leakages” from previous builds is eliminated. With the Kubernetes plugin and Docker Custom Build Environment plugin, Jenkins can get a build agent from Kubernetes and run builds within the containers.

What’s Next?
The CloudBees and Google teams have collaborated on these plugins and you can expect to see more efforts to support more use cases between Jenkins and Kubernetes. Some of these use cases, involve piggy-backing on the Docker support released by the community (for example Docker Traceability and Docker Notifications plugin).

If you are a developer and want to contribute to this effort reach out on the Jenkins developer alias (hint talk to Nicolas DeLoof ;-))

Closing Thoughts:
The OSS community has innovated in the last couple of months, they have quickly added support for Docker and Kubernetes and have established Jenkins as the premier way to build modern real world continuous delivery pipelines.

I hope you have fun playing with all the goodies just released.

Where do I start?

  • Docker use cases: for a background on the use cases talked about in this blog

  • Using Docker Build and Publish with the Google Cloud Platform

  • Workflow with Kubernetes

  • On-demand Jenkins agents with Kubernetes

  • Clustering Jenkins with Kubernetes

- See more at: http://blog.cloudbees.com/2015/07/jenkins-container-support-juggernaut.html#sthash.TE4Z4Gho.dpuf

Harpreet Singh

Vice President of Product Management
CloudBees

Harpreet is the Vice President of Product Management and is based out of San Jose. Follow Harpreet on Twitter .

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.