1 of 18

Jenkins X

automated CI/CD for kubernetes

2 of 18

Everything has changed in software in 5 years...

  • Move from on premise -> public cloud
  • Move from VMs to containers
    • Immutable infrastructure for DevOps speed and reduced cost
  • Kubernetes has become the defacto standard in orchestrating containers
    • 2018 all public clouds will support GA kubernetes as a service
    • All other significant operating system, PaaS and platform vendors support kubernetes now too
  • Move from monoliths -> microservices
    • Hypothesis driven development, small iterations, fast feedback
  • Become high performing teams via CI/CD
    • Deliver business value faster!

3 of 18

Challenges for teams who want to be high performing:

  • Setup the cloud/kubernetes & environments
  • Move to containers
  • Deploy containers into Kubernetes
    • Generate YAML or helm charts?
  • Adopt Continuous Delivery and promotion
    • What’s this GitOps thing?
  • Automate everything and improve feedback
  • Keep delivering actual business value to customers

4 of 18

Jenkins X

5 of 18

How does Jenkins X help?

  • Automates the installation, configuration and upgrade of Jenkins + other apps (helm, skaffold, nexus, monocular etc) on Kubernetes
  • Automates CI/CD for your applications on Kubernetes
    • Docker images
    • Helm charts
    • Pipelines
  • Uses GitOps to manage promotion between environments
    • Test -> Staging -> Production
  • Lots of feedback
    • E.g. commenting on issues as they hit Staging + Production

6 of 18

How do we setup Kubernetes + Jenkins X?

7 of 18

Install the command line tool: jx

https://jenkins-x.io/getting-started/install/

macOs:

brew tap jenkins-x/jx

brew install jx

linux:

curl -L https://github.com/jenkins-x/jx/releases/download/v1.2.16/jx-linux-amd64.tar.gz | tar xzv

sudo mv jx /usr/local/bin

8 of 18

Jenkins X: setup kubernetes + Jenkins X

  • If using the public cloud use:
    • jx create cluster aws
    • jx create cluster gke
    • jx create cluster aks

  • If you have a cluster already - ensure RBAC enabled then:
    • jx install

More help here: https://jenkins-x.io/getting-started/

9 of 18

jx create cluster (aks|aws|gke|minikube)

10 of 18

What does that give me?

Each team gets their own:

  • Development Tools Environment
    • Jenkins master
    • Elastic pool of Kubernetes build pods
    • Nexus + Monocular (helm application store)
  • Staging Environment
  • Production Environment

11 of 18

12 of 18

Jenkins X: Summary

  • Please try it out!
    • https://jenkins-x.io/
  • Feedback:
  • CloudBees

13 of 18

Jenkins X: create/import projects

  • Available commands:
    • jx create spring
    • jx create quickstart
    • jx import
  • Automatically set up CI/CD Pipelines for new + imported projects
    • Setups git repository
    • Adds webhooks on git provider to trigger Jenkins pipelines on PR / master
    • Triggers first pipeline

14 of 18

Jenkins X: on Pull Request

  • Compiles + runs tests
  • Creates preview docker image + helm chart
  • Creates a Preview Environment and comments on the PR with a link to the app

15 of 18

Jenkins X: on Release (push to master)

  • Compiles + runs tests
  • Creates semantic release version
  • Publishes versioned artifacts, docker image & helm chart
  • Promotes through all automatic environments, e.g. Staging

16 of 18

Jenkins X: promotion via GitOps

  • Each environment stores its configuration as helm charts in a git repository
    • Configuration as code
    • All changes audited and easy to revert
    • Reuse the Pull Request workflow for changes
  • To promote a version to, say, Production Jenkins X submits a Pull Request
    • The Promote step waits for the Pull Request CI build to complete, merge and for the environments pipeline to complete applying the change

17 of 18

Jenkins X: Summary

  • Please try it out!
    • https://jenkins-x.io/
  • Feedback:
  • CloudBees

18 of 18

Jenkins X