Jenkins-X - CD for the Kloud

Gerd Aschemann

About me

  • Gerd Aschemann

  • Freelancer: Java, Groovy, Enterprise, CRM, CI/CD, Architecture, DDD, …​

  • Co-Organizer:

    • JUG Darmstadt

    • Javaland Conference

    • Open Source Conference Planner DukeCon


  1. Recap: Kubernetes

  2. Questions

  3. Answers





  4. Demos

  5. Features + Roadmap

Recap: Kubernetes (k8s)

k8s pods and services

K8S Building Blocks

  • Nodes

  • Pods

  • Services

  • Overlay Networks

  • Ingresses

  • Configmaps + Secrets

  • Volumes

  • Custom Ressource Definitions (CRDs)

JX Overview


Start into DevOps

intro dev2jx

It is really simple!

intro ops simple

Use a Maven build

intro dev add maven

Maven Build Setup

  • How to write the pom.xml?

  • How to deploy the build artifact to the repository?

  • How to get the artifact to k8s?

  • How to set up a Maven repository?

Use a Docker registry

intro dev add docker

Docker Build Setup

  • How to write the Dockerfile?

  • Or use Maven, Skaffold, Jib, …​???

  • How to deploy Docker image to the registry?

  • How to get the image to k8s?

  • How to set up a Docker registry?

Use a Helm chart

intro dev add helm

Helm/K8S Setup (Test)

  • How to write the deployment configuration?

    • Deployment YAML?

    • Service YAML?

    • Ingress???

    • ConfigMap + Secrets?

    • …​

      → Helm Chart(s)

      Helm is the Homebrew of K8S

  • How to set up Chart repository?

  • How to set up Kubernetes?

Integration + Production

  • How to set up Integration or Production?

  • How to cope with

    • multiple (interdependent) applications?

    • different configurations?

    • other infrastructure (DBs, Messaging, UIs, …​)?

    • multiple Kubernetes clusters?

  • What is the driving entity?

a: Jenkins-X + Kubernetes

JX Overview (2nd)


JX Architecture: Repositories

  • Github (External): Source Code Management

  • Nexus (in K8S): Maven Repository

  • Docker Registry (in K8S): Docker Images

  • Chartmuseum (in K8S): Deployment Configurations

Demo 0: Create JX

JX is an opinionated command line tool!
JX Create Cluster (GKE)
jx create cluster gke


JX Install Cluster (GKE)
jx install cluster gke

Kubernetes Providers

  • Google Kubernetes Engine (GKE)

  • local (Docker) machine: Minikube / Minishift

  • Amazon: Minikube, AWS native, Elastic Kubernetes Service (EKS)

  • Azure Kubernetes Service (AKS)

  • Oracle Kubernetes Environment (OKE)

  • OpenShift?

  • On Premise?

b: GitOps

GitOps Overview


GitOps: Processes + Environments

  • Build + Deploy

  • Combine

    • Infrastructure as Code

    • + (Opinionated) Deployment Workflow

  • Promote

    • To Staging (Default)

    • To Production (on Demand)

    • To more test environments if required (LuP, UAT, …​)

    • To Preview (on PR/Branch)

Demo 1: JX Create/Import App

JX Create Spring/Node/Go/…​
jx create spring


JX Import
# cd $dirWithApp
jx import
Checkout Spring Initializr:

Automatically Staged

Change to jx-staging environment automatically merged as PR:

diff --git a/env/requirements.yaml b/env/requirements.yaml
@@ -6,9 +6,12 @@
   name: exposecontroller
   version: 2.3.58
   alias: cleanup
+- name: jx-demo-180906-1131
+  repository: http://jenkins-x-chartmuseum:8080
+  version: 0.0.1

And thereby promoted as new application in the env.

GitOps Overview (2nd)


GitOps Steps

  • Promote deployments through opinionated workflow

  • Describe formally (e.g., Helm chart)

    • Single application

    • Environment composition

  • Cover application as well as configuration

  • File change request as pull request

  • Automatically merge (including tests) and roll out

  • Monitoring + Synchronisation of state

  • Roll back on demand

Demo 2: JX Promote

JX Promote (to production)
jx promote --version 0.0.1 --env production

The Developer Experience

intro devpod

Demo 3a: JX DevPod / Sync

JX Sync (Run once)
jx sync
JX DevPod (Init / Run 1st)
jx create devpod --reuse --sync
# Then in the remote shell
mvn spring-boot:run

Demo 3b: Access DevPod

JX Port Forwarding
jx get devpod

ascheman-maven maven 1h39m34s Ready

K8S Port Forwarding
kubectl port-forward ascheman-maven 8080 # or any other POD name
# Then locally
curl localhost:8080/actuator/health


Demo 3c: Dev in DevPod

Add Spring DevTools to Dependencies
  • Restart mvn spring-boot:run

  • Then Open 2nd rsh and let Maven compile → Reload of Java code

JX DevPod Remote Shell / Login (2nd)
jx rsh -d
# Then in the remote shell
mvn compile

Demo 3d: Extend App

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

public class DemoController {
    public String getGreeting() {
        return "World";

Demo 3e: Docker Build in DevPod

Docker build (via skaffold)
jx rsh -d
# Then in the remote shell
VERSION=xxx skaffold build

Build / Push of Docker Image
Starting build...
Building [changeme]...
Sending build context to Docker daemon  17.55MB
Step 1/8 : FROM openjdk:8-jdk-slim
Build complete in 416.607605ms
changeme ->

JX Features/Roadmaps

  • Client: OSX + Linux, Windows: Planned

  • Dev + Build + Deployment: CLI, DevPod, Preview/Pull-Request → GitOps

  • Providers: GCP/GKE, AWS/EKS, Azure, IBM Cloud, MiniShift/MiniKube, OpenShift, …​

  • Tools: Helm, Skaffold, Prow, Argo, …​

  • Repositories: Chart Museum, Docker Registry, Nexus, Artifactory (Planned)

  • Issue Trackers: Github/GH Enterprise, Jira, Gitea (In Progress)

  • Multi-Cluster (In Progress)

  • Istio Canaries (In Progress)

Git providers

  • Working: Github/Github Enterprise

  • In Progress:

    • Gitea

    • Bitbucket Server/Cloud

    • Gitlab


  • Working: Go, Maven, Gradle, NPM, Rust

  • In Progress: Python

  • Planned: Kubeless, Serverless, Swift, .Net


  • Working: Prometheus, Gitea, Anchore

  • Planned: Cloud9, Eclipse Che, SonarQube

JX Overview (last)



  • CLI based setup: Jenkins, Nexus, Docker Registry, Chartmuseum

  • Misc. k8s providers

  • Fast evolving (Features, Repositories, Addons)

  • Strong support for GitOps

  • Open source/Community

  • Production ready?

Thank You