The New Builders

Installing Jenkins X on IBM Cloud Kubernetes Service

Share this post:

Introducing the Jenkins X open source project

The Jenkins X open source project is a continuous delivery solution that was designed and configured especially for Kubernetes. It comes with a simple installer tool that provides a turn-key install when pointed at a Kubernetes cluster, and it supports multiple Kubernetes environments with custom configurations for each.

IBM Cloud has a built-in, hosted Continuous Delivery toolchain that can be used for automating the building and deployment of applications. However, we know our customers sometimes like to use custom solutions, especially when building multi-cloud environments.

Jenkins X comes with regular Jenkins and additional components which are pre-wired together to provide an opinionated, out-of-the-box CI/CD for cloud-native applications on Kubernetes. These additional components include Nexus for caching build artifacts and chartmuseum for Helm chart repository. It also comes with Build Packs for creating quick-start applications and generating Dockerfile, Jenkinsfile, and Helm charts for existing applications. As a result, the CI/CD experience is seamless. It’s worth mentioning that IBM Cloud Developer Tools CLI provides similar functionality.

In this blog, I’ll show you the installation steps to get Jenkins X running on IBM Cloud Kubernetes Service.

Installing Jenkins X on IBM Cloud Kubernetes Service

  1. Install Jenkins-X and Helm.
  2. Use the Jenkins X CLI to create a new cluster on IBM Cloud Kubernetes Service. This command invokes the ibmcloud cli to log in, create a cluster, install, required local dependencies, and provision the Jenkins X platform. I recommend choosing a Standard cluster with at least 4 Core X 16GB with 3 nodes for optimal performance. Note: Choose Kubernetes Version 1.10.
    jx create cluster iks

Stand up and stretch your legs for a few minutes. The installer creates several deployments, persistent volumes, services, and ingress. After your break to stretch, set your KUBECONFIG to your new cluster and run kubectl get deployments,services,pvc,pv,ingress -n jx to see everything that got installed. Note that there are additional charges that are incurred due to the persistent volumes.

After installation, run jx console to launch the console. Verify that you can log into Jenkins using the provided URL and admin password.

Configure Jenkins X to use IBM Cloud Container Registry

If you used the jx create cluster iks method described above, the cluster and Jenkins X installation are already configured to use the IBM Cloud Container Registry to store your container images.

All done with the setup! Now for the fun part

Back in the terminal, use jx create quickstart to create a project.

This will create a new git repository in your GitHub org with the starter source code, a Jenkins pipeline, and a github webhook to automatically pick up any code changes. On code commits, the build checks out the source code from GitHub, builds the app, creates a Docker image, stores the image in the container registry, and then uses the Helm chart in the repo to deploy the application to your cluster.

Note: Due to a current limitation, your IBM Cloud Container registry namespace (ibmcloud cr namespaces) has to match your github org name. If they do not match, create a new namespace using ibmcloud cr namespace-add <your-github-org>.

Make code changes in your git repository and watch for a new pipeline and an updated application. This gives you a great starting point and is ready for you to modify it to match your requirements.

I hope this post gave you a quick overview of what Jenkins X is and how you can use it with IBM Cloud Kubernetes Service. To learn more, I recommend watching the presentation from KubeCon 2018.

If you have trouble

For questions regarding the IBM Cloud Kubernetes service, engage our team via Slack by registering here. Join the discussion in the #questions channel on https://ibm-container-service.slack.com.

IBM Cloud Technical Offering Manager

More The New Builders stories
March 28, 2019

VIDEO – Virtualization in 2019

In this video, we’re going to be looking at virtualization from the 10,000-foot view. Even though it is a decades-old technology, it's still vital to understand the basic components of virtualization as it is a core pillar of cloud computing methodology in 2019.

Continue reading

March 22, 2019

VIDEO – Containerization Explained

We're back with another lightboarding video, and this time we'll be investigating containerization. Sai Vennam will be using the example of a Node.js application that we want to push into production, and we'll be using two different form factors—virtual machines (VMs) and containers—to explain the advantages of containerization.

Continue reading

February 28, 2019

VIDEO – What are Microservices?

Interest and implementation of cloud-native development utilizing microservices have increased dramatically over the last few years. In this lightboarding video, we provide a high-level overview of microservices and compare them to traditional monolithic architectures by utilizing an example of a company that sells tickets to concerts and sporting events.

Continue reading