SlideShare a Scribd company logo
Continuous Delivery
to Kubernetes with
Jenkins and Helm
David Currie | @dcurrie
Presentation + Code @ https://github.com/davidcurrie/codeone2018
© 2018 CloudBees, Inc. All Rights Reserved. 2
CloudBees and Jenkins Trademark, Copyright and
Registration Information
• The registered trademark Jenkins®
is used pursuant to a sublicense from
the Jenkins project and Software in the Public Interest, Inc.
• © 2018 CloudBees, Inc. CloudBees and CloudBees DevOptics are registered
trademarks and CloudBees Jenkins Solutions, CloudBees Jenkins Enterprise,
CloudBees Jenkins Team, CloudBees Jenkins Operations Center, CloudBees
Jenkins Advisor and DEV@cloud are trademarks of CloudBees, Inc. Other
product or brand names may be trademarks or registered trademarks of their
respective holders.
© 2018 CloudBees, Inc. All Rights Reserved. 3
Agenda
• Running Jenkins on Kubernetes
• Deploying to Kubernetes from Jenkins
• Jenkins X
Running Jenkins
on Kubernetes
© 2018 CloudBees, Inc. All Rights Reserved. 5
Why run Jenkins on Kubernetes?
• Containerize components
• Isolated Jenkins masters
• Isolated agents and jobs
• Enforce memory and CPU limits
• Container orchestration
• Highly available Jenkins master
▸ Leverage pluggable persistent storage
• Dynamically scale number of agents across nodes
• Remove reliance on Jenkins plugins
© 2018 CloudBees, Inc. All Rights Reserved. 6
Prereqs
• A Kubernetes cluster
• AKS
• GKE
• IKS
• Minikube
• Docker Desktop
• …
• kubectl
• Helm client
﹩ brew cask install minikube
﹩ minikube start
﹩ minikube addons enable registry
﹩ brew install kubectl
﹩ brew install kubernetes-helm
© 2018 CloudBees, Inc. All Rights Reserved. 7
Getting started with Helm
• ‘Package manager’ for Kubernetes apps
• Packages called charts stored in repositories
• Charts contain templatized Kubernetes configuration
• Setup client configuration and install server-side tiller:
$ helm init --wait
http://helm.sh
© 2018 CloudBees, Inc. All Rights Reserved. 8
Deploying Jenkins with Helm
• Find the Jenkins Helm chart
• Search https://hub.kubeapps.com, or
$ helm search jenkins
• Install the chart
$ helm install
--name cd
--Master.ServiceType=NodePort
stable/jenkins
• Creates deployment, services, secret, config maps and
persistent volume claim
© 2018 CloudBees, Inc. All Rights Reserved. 9
Access the deployed Jenkins
• Follow the instructions to retrieve the Jenkins admin
password
• Access the Jenkins UI
$ minikube service cd-jenkins
© 2018 CloudBees, Inc. All Rights Reserved. 10
Kubernetes plugin for Jenkins
• Developed by Carlos Sanchez @ CloudBees
• Spins up Jenkins slave on demand as Kubernetes pod
• Pod template defines containers that should exist in pod
• JNLP agent is always one of them
• Enables reuse of existing Docker images e.g. maven or docker
• Template can define configuration for the pod/containers
• Environment variables
• Mount from secret, config map or volume
© 2018 CloudBees, Inc. All Rights Reserved. 11
Kubernetes plugin and Jenkins pipelines
• Pod templates can be defined in:
• Jenkins configuration, or
• Declaratively as part of a Jenkins pipeline (e.g. Jenkinsfile)
podTemplate(label: 'mypod', inheritFrom: 'default',
containers: [
containerTemplate(name: 'maven', image: 'maven',
ttyEnabled: true, command: 'cat')
]) {
node('mypod') {
stage ('Extract') { checkout scm }
stage ('Build') { container ('maven') { sh "mvn package" } }
}
}
© 2018 CloudBees, Inc. All Rights Reserved. 12
Go beyond physical scaling by driving
collaboration across teams to easily
propagate best practices, offer CD as a
Service across your organization and
reduce your administrative and IT
burden.
Whatever you are delivering - from
microservices, Java, .NET to mainframe
- CloudBees Core is the one CI/CD
solution for all your applications.
Sophisticated authorization reduces risks
to software delivery by ensuring
credentials and resources are not
misused. Create compliance without
hindering agility.
CloudBees Core
Flexible, governed continuous delivery for all your applications
12
FlexibilitySecurity and Compliance Scalability
Deploying to
Kubernetes
from Jenkins
© 2018 CloudBees, Inc. All Rights Reserved. 14
Creating your own Helm chart
$ helm create test
test/
Chart.yaml
values.yaml
charts/
templates/
NOTES.txt
_helpers.tpl
deployment.yaml
ingress.yaml
service.yaml
© 2018 CloudBees, Inc. All Rights Reserved. 15
Example variables and template usage
• values.yaml
image:
repository: nginx
tag: stable
pullPolicy: IfNotPresent
• deployment.yaml
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{.Values.image.tag }}"
imagePullPolicy: {{.Values.image.pullPolicy }}
© 2018 CloudBees, Inc. All Rights Reserved. 16
Overriding chart values
• Variables can be overridden at install time
• As command line parameters:
$ helm install test --set image.tag=1.13
• And/or via a file:
$ helm install test --values overrides.yaml
© 2018 CloudBees, Inc. All Rights Reserved. 17
Prereqs for using Helm in a Jenkins pipeline
• Install Helm Tiller as part of cluster configuration
• Create/find a Docker image containing the Helm client
binary e.g. lachlanevenson/k8s-helm
• Helm charts can be kept in a separate repository or
stored alongside the application source code
© 2018 CloudBees, Inc. All Rights Reserved. 18
Installing Helm charts from a Jenkins pipeline
$ helm init --client-only
• Kubernetes configuration automatically available in pod
$ helm upgrade
--install
--wait
--set image.tag= …
© 2018 CloudBees, Inc. All Rights Reserved. 19
Jenkins Helm chart customization
• Chart values allow customization of almost everything!
• Master.InstallPlugins – list of Jenkins plugins to install
• Master/Agent.image – Docker image for master/slave
• Master.InitScripts – list of Jenkins init scripts
• Master.Jobs – Jenkins XML job configs
• Agent.Cpu/Memory – resource constraints for agent
• Master.CustomConfigMap – allows a parent chart to override the
entire Jenkins config via override_config_map template
• …
© 2018 CloudBees, Inc. All Rights Reserved. 20
More Helm
• Ensure Helm chart is well formed:
$ helm lint --strict ...
• Verify successful deployment
$ helm test ...
• Define sub-charts in charts directory / requirements.yaml
• e.g. to satisfy a database dependency
• Hooks for lifecycle events e.g. pre/post install
• Helm releases are versioned enabling rollback
© 2018 CloudBees, Inc. All Rights Reserved. 21
A few things to watch out for
• Don’t use latest tag with images
• If the config doesn’t change, Kubernetes won’t see it as an update
• Use AlwaysPullImages admission controller
• Options to enforce access control with Helm:
• Deploy tiller per namespace with RBAC and client certs
• Use: helm --template test | kubectl -f -
• Wait for Helm 3.0!
• helm --wait waits for minimum pod count to be satisfied
• For default of replicas=1 and maxUnavailable=1 that is zero!
Jenkins X
https://jenkins-x.io
© 2018 CloudBees, Inc. All Rights Reserved. 23
Jenkins X
• Opinionated best-practice CI/CD for Kubernetes
• Fully-configured cluster
• Quick starts for many languages (Spring, Liberty, Node, Go, …)
• GitOps for environmental promotion
• Each environment represented as Helm umbrella chart in git
• Preview environments for pull requests
© 2018 CloudBees, Inc. All Rights Reserved. 24
Getting started with Jenkins X
• Install Jenkins X CLI
$ brew install jenkins-x/jx/jx
• Create cluster with Jenkins X pre-configured
$ jx create cluster gke # or eks, minikube, …
• Create new project (creates repo and sets up webhooks)
$ jx create quickstart
• Preview environments are automatically created for PRs
• Automatic promotion to staging on merge to master
• Manual promotion to production
$ jx promote myapp --version 1.2.3 --env promotion
© 2018 CloudBees, Inc. All Rights Reserved. 25
Demo
© 2018 CloudBees, Inc. All Rights Reserved. 26
Jenkins X is evolving
• Version 1
• Based on Kubernetes Helm chart
• Version 2
• Webhooks handled by prow
• ‘Serverless Jenkins’ spun up to run build
• Wrapped in knative build
• Blog post: https://jenkins-x.io/news/serverless-jenkins/
© 2018 CloudBees, Inc. All Rights Reserved. 27
Kube CD in Limited Availability for CloudBees Core customers
Summary
© 2018 CloudBees, Inc. All Rights Reserved. 29
Summary
• Helm is an effective way to quickly and flexibly deploy a
scalable Jenkins topology on Kubernetes
• Jenkins is a great choice for Continuous Delivery as well
as Continuous Integration
• Jenkins X is provides a modern GitOps based
development workflow for rapid deployment and iteration
Software at the speed of ideas
THANK YOU!
www.cloudbees.com
Ad

More Related Content

What's hot (20)

Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
dcjuengst
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
JEMLI Fathi
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
Edureka!
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
Nicola Baldi
 
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at GitlabDevops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
Virendra Ruhela
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
Innovation Roots
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
Janakiram MSV
 
DevOps
DevOpsDevOps
DevOps
Gehad Elsayed
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Ravindu Fernando
 
DevOps Powerpoint Presentation Slides
DevOps Powerpoint Presentation SlidesDevOps Powerpoint Presentation Slides
DevOps Powerpoint Presentation Slides
SlideTeam
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
Annie Huang
 
Azure DevOps in Action
Azure DevOps in ActionAzure DevOps in Action
Azure DevOps in Action
Callon Campbell
 
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Adrian Todorov
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
Red Hat Developers
 
Salesforce DevOps: Where Do You Start?
Salesforce DevOps: Where Do You Start?Salesforce DevOps: Where Do You Start?
Salesforce DevOps: Where Do You Start?
Chandler Anderson
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 
Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
dcjuengst
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
Edureka!
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
Nicola Baldi
 
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at GitlabDevops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
Janakiram MSV
 
DevOps Powerpoint Presentation Slides
DevOps Powerpoint Presentation SlidesDevOps Powerpoint Presentation Slides
DevOps Powerpoint Presentation Slides
SlideTeam
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
Annie Huang
 
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...Using Azure DevOps to continuously build, test, and deploy containerized appl...
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Adrian Todorov
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
Red Hat Developers
 
Salesforce DevOps: Where Do You Start?
Salesforce DevOps: Where Do You Start?Salesforce DevOps: Where Do You Start?
Salesforce DevOps: Where Do You Start?
Chandler Anderson
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 

Similar to Continuous Delivery to Kubernetes with Jenkins and Helm (20)

Continuous Delivery with CloudBees Core
Continuous Delivery with CloudBees CoreContinuous Delivery with CloudBees Core
Continuous Delivery with CloudBees Core
Bhavani Rao
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]
Mark Waite
 
Introduction to Jenkins X - a beginner's guide
Introduction to Jenkins X - a beginner's guideIntroduction to Jenkins X - a beginner's guide
Introduction to Jenkins X - a beginner's guide
Andrew Bayer
 
Docker + jenkins in the enterprise (3)
Docker + jenkins in the enterprise (3)Docker + jenkins in the enterprise (3)
Docker + jenkins in the enterprise (3)
Kurt Madel
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI Admin
Kendrick Coleman
 
Cicd.pdf
Cicd.pdfCicd.pdf
Cicd.pdf
ssuser37d481
 
Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos
Miguel Zuniga
 
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
CodeOps Technologies LLP
 
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins EnterpriseDistributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Kurt Madel
 
Helm - Application deployment management for Kubernetes
Helm - Application deployment management for KubernetesHelm - Application deployment management for Kubernetes
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)
Simon Haslam
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service Overview
Kyle Brown
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Bitnami
 
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Yong Feng
 
Hybrid cloud openstack meetup
Hybrid cloud openstack meetupHybrid cloud openstack meetup
Hybrid cloud openstack meetup
dfilppi
 
The Kubernetes WebLogic revival (part 1)
The Kubernetes WebLogic revival (part 1)The Kubernetes WebLogic revival (part 1)
The Kubernetes WebLogic revival (part 1)
Simon Haslam
 
Kube journey 2017-04-19
Kube journey   2017-04-19Kube journey   2017-04-19
Kube journey 2017-04-19
Doug Davis
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas Kolenkin
DataArt
 
DRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELM
DRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELMDRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELM
DRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELM
DrupalCamp Kyiv
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2
makker_nl
 
Continuous Delivery with CloudBees Core
Continuous Delivery with CloudBees CoreContinuous Delivery with CloudBees Core
Continuous Delivery with CloudBees Core
Bhavani Rao
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]
Mark Waite
 
Introduction to Jenkins X - a beginner's guide
Introduction to Jenkins X - a beginner's guideIntroduction to Jenkins X - a beginner's guide
Introduction to Jenkins X - a beginner's guide
Andrew Bayer
 
Docker + jenkins in the enterprise (3)
Docker + jenkins in the enterprise (3)Docker + jenkins in the enterprise (3)
Docker + jenkins in the enterprise (3)
Kurt Madel
 
Kubernetes for the VI Admin
Kubernetes for the VI AdminKubernetes for the VI Admin
Kubernetes for the VI Admin
Kendrick Coleman
 
Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos
Miguel Zuniga
 
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
CodeOps Technologies LLP
 
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins EnterpriseDistributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Kurt Madel
 
Helm - Application deployment management for Kubernetes
Helm - Application deployment management for KubernetesHelm - Application deployment management for Kubernetes
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)
Simon Haslam
 
IBM Container Service Overview
IBM Container Service OverviewIBM Container Service Overview
IBM Container Service Overview
Kyle Brown
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Bitnami
 
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Yong Feng
 
Hybrid cloud openstack meetup
Hybrid cloud openstack meetupHybrid cloud openstack meetup
Hybrid cloud openstack meetup
dfilppi
 
The Kubernetes WebLogic revival (part 1)
The Kubernetes WebLogic revival (part 1)The Kubernetes WebLogic revival (part 1)
The Kubernetes WebLogic revival (part 1)
Simon Haslam
 
Kube journey 2017-04-19
Kube journey   2017-04-19Kube journey   2017-04-19
Kube journey 2017-04-19
Doug Davis
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas Kolenkin
DataArt
 
DRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELM
DRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELMDRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELM
DRUPAL CI/CD FROM DEV TO PROD WITH GITLAB, KUBERNETES AND HELM
DrupalCamp Kyiv
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2
makker_nl
 
Ad

More from David Currie (18)

Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and Helm
David Currie
 
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
David Currie
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
David Currie
 
How to Containerize WebSphere Application Server Traditional, and Why You Mig...
How to Containerize WebSphere Application Server Traditional, and Why You Mig...How to Containerize WebSphere Application Server Traditional, and Why You Mig...
How to Containerize WebSphere Application Server Traditional, and Why You Mig...
David Currie
 
IBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep DiveIBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep Dive
David Currie
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
David Currie
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
David Currie
 
IBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep DiveIBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep Dive
David Currie
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
David Currie
 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesScalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
David Currie
 
Platform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixPlatform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM Bluemix
David Currie
 
Building out a Microservices Architecture with WebSphere Liberty Profile and ...
Building out a Microservices Architecture with WebSphere Liberty Profile and ...Building out a Microservices Architecture with WebSphere Liberty Profile and ...
Building out a Microservices Architecture with WebSphere Liberty Profile and ...
David Currie
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
David Currie
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
David Currie
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
David Currie
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
David Currie
 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesScalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
David Currie
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source Software
David Currie
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and Helm
David Currie
 
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
WebSphere Liberty and IBM Containers: The Perfect Combination for Java Micros...
David Currie
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
David Currie
 
How to Containerize WebSphere Application Server Traditional, and Why You Mig...
How to Containerize WebSphere Application Server Traditional, and Why You Mig...How to Containerize WebSphere Application Server Traditional, and Why You Mig...
How to Containerize WebSphere Application Server Traditional, and Why You Mig...
David Currie
 
IBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep DiveIBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep Dive
David Currie
 
WebSphere and Docker
WebSphere and DockerWebSphere and Docker
WebSphere and Docker
David Currie
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
David Currie
 
IBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep DiveIBM WebSphere Liberty and Docker Deep Dive
IBM WebSphere Liberty and Docker Deep Dive
David Currie
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
David Currie
 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesScalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
David Currie
 
Platform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM BluemixPlatform as a Service - Cloud Foundry and IBM Bluemix
Platform as a Service - Cloud Foundry and IBM Bluemix
David Currie
 
Building out a Microservices Architecture with WebSphere Liberty Profile and ...
Building out a Microservices Architecture with WebSphere Liberty Profile and ...Building out a Microservices Architecture with WebSphere Liberty Profile and ...
Building out a Microservices Architecture with WebSphere Liberty Profile and ...
David Currie
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
David Currie
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
David Currie
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
David Currie
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
David Currie
 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and MicroservicesScalable, Available and Reliable Cloud Applications with PaaS and Microservices
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
David Currie
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source Software
David Currie
 
Ad

Recently uploaded (20)

Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 

Continuous Delivery to Kubernetes with Jenkins and Helm

  • 1. Continuous Delivery to Kubernetes with Jenkins and Helm David Currie | @dcurrie Presentation + Code @ https://github.com/davidcurrie/codeone2018
  • 2. © 2018 CloudBees, Inc. All Rights Reserved. 2 CloudBees and Jenkins Trademark, Copyright and Registration Information • The registered trademark Jenkins® is used pursuant to a sublicense from the Jenkins project and Software in the Public Interest, Inc. • © 2018 CloudBees, Inc. CloudBees and CloudBees DevOptics are registered trademarks and CloudBees Jenkins Solutions, CloudBees Jenkins Enterprise, CloudBees Jenkins Team, CloudBees Jenkins Operations Center, CloudBees Jenkins Advisor and DEV@cloud are trademarks of CloudBees, Inc. Other product or brand names may be trademarks or registered trademarks of their respective holders.
  • 3. © 2018 CloudBees, Inc. All Rights Reserved. 3 Agenda • Running Jenkins on Kubernetes • Deploying to Kubernetes from Jenkins • Jenkins X
  • 5. © 2018 CloudBees, Inc. All Rights Reserved. 5 Why run Jenkins on Kubernetes? • Containerize components • Isolated Jenkins masters • Isolated agents and jobs • Enforce memory and CPU limits • Container orchestration • Highly available Jenkins master ▸ Leverage pluggable persistent storage • Dynamically scale number of agents across nodes • Remove reliance on Jenkins plugins
  • 6. © 2018 CloudBees, Inc. All Rights Reserved. 6 Prereqs • A Kubernetes cluster • AKS • GKE • IKS • Minikube • Docker Desktop • … • kubectl • Helm client ﹩ brew cask install minikube ﹩ minikube start ﹩ minikube addons enable registry ﹩ brew install kubectl ﹩ brew install kubernetes-helm
  • 7. © 2018 CloudBees, Inc. All Rights Reserved. 7 Getting started with Helm • ‘Package manager’ for Kubernetes apps • Packages called charts stored in repositories • Charts contain templatized Kubernetes configuration • Setup client configuration and install server-side tiller: $ helm init --wait http://helm.sh
  • 8. © 2018 CloudBees, Inc. All Rights Reserved. 8 Deploying Jenkins with Helm • Find the Jenkins Helm chart • Search https://hub.kubeapps.com, or $ helm search jenkins • Install the chart $ helm install --name cd --Master.ServiceType=NodePort stable/jenkins • Creates deployment, services, secret, config maps and persistent volume claim
  • 9. © 2018 CloudBees, Inc. All Rights Reserved. 9 Access the deployed Jenkins • Follow the instructions to retrieve the Jenkins admin password • Access the Jenkins UI $ minikube service cd-jenkins
  • 10. © 2018 CloudBees, Inc. All Rights Reserved. 10 Kubernetes plugin for Jenkins • Developed by Carlos Sanchez @ CloudBees • Spins up Jenkins slave on demand as Kubernetes pod • Pod template defines containers that should exist in pod • JNLP agent is always one of them • Enables reuse of existing Docker images e.g. maven or docker • Template can define configuration for the pod/containers • Environment variables • Mount from secret, config map or volume
  • 11. © 2018 CloudBees, Inc. All Rights Reserved. 11 Kubernetes plugin and Jenkins pipelines • Pod templates can be defined in: • Jenkins configuration, or • Declaratively as part of a Jenkins pipeline (e.g. Jenkinsfile) podTemplate(label: 'mypod', inheritFrom: 'default', containers: [ containerTemplate(name: 'maven', image: 'maven', ttyEnabled: true, command: 'cat') ]) { node('mypod') { stage ('Extract') { checkout scm } stage ('Build') { container ('maven') { sh "mvn package" } } } }
  • 12. © 2018 CloudBees, Inc. All Rights Reserved. 12 Go beyond physical scaling by driving collaboration across teams to easily propagate best practices, offer CD as a Service across your organization and reduce your administrative and IT burden. Whatever you are delivering - from microservices, Java, .NET to mainframe - CloudBees Core is the one CI/CD solution for all your applications. Sophisticated authorization reduces risks to software delivery by ensuring credentials and resources are not misused. Create compliance without hindering agility. CloudBees Core Flexible, governed continuous delivery for all your applications 12 FlexibilitySecurity and Compliance Scalability
  • 14. © 2018 CloudBees, Inc. All Rights Reserved. 14 Creating your own Helm chart $ helm create test test/ Chart.yaml values.yaml charts/ templates/ NOTES.txt _helpers.tpl deployment.yaml ingress.yaml service.yaml
  • 15. © 2018 CloudBees, Inc. All Rights Reserved. 15 Example variables and template usage • values.yaml image: repository: nginx tag: stable pullPolicy: IfNotPresent • deployment.yaml spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{.Values.image.tag }}" imagePullPolicy: {{.Values.image.pullPolicy }}
  • 16. © 2018 CloudBees, Inc. All Rights Reserved. 16 Overriding chart values • Variables can be overridden at install time • As command line parameters: $ helm install test --set image.tag=1.13 • And/or via a file: $ helm install test --values overrides.yaml
  • 17. © 2018 CloudBees, Inc. All Rights Reserved. 17 Prereqs for using Helm in a Jenkins pipeline • Install Helm Tiller as part of cluster configuration • Create/find a Docker image containing the Helm client binary e.g. lachlanevenson/k8s-helm • Helm charts can be kept in a separate repository or stored alongside the application source code
  • 18. © 2018 CloudBees, Inc. All Rights Reserved. 18 Installing Helm charts from a Jenkins pipeline $ helm init --client-only • Kubernetes configuration automatically available in pod $ helm upgrade --install --wait --set image.tag= …
  • 19. © 2018 CloudBees, Inc. All Rights Reserved. 19 Jenkins Helm chart customization • Chart values allow customization of almost everything! • Master.InstallPlugins – list of Jenkins plugins to install • Master/Agent.image – Docker image for master/slave • Master.InitScripts – list of Jenkins init scripts • Master.Jobs – Jenkins XML job configs • Agent.Cpu/Memory – resource constraints for agent • Master.CustomConfigMap – allows a parent chart to override the entire Jenkins config via override_config_map template • …
  • 20. © 2018 CloudBees, Inc. All Rights Reserved. 20 More Helm • Ensure Helm chart is well formed: $ helm lint --strict ... • Verify successful deployment $ helm test ... • Define sub-charts in charts directory / requirements.yaml • e.g. to satisfy a database dependency • Hooks for lifecycle events e.g. pre/post install • Helm releases are versioned enabling rollback
  • 21. © 2018 CloudBees, Inc. All Rights Reserved. 21 A few things to watch out for • Don’t use latest tag with images • If the config doesn’t change, Kubernetes won’t see it as an update • Use AlwaysPullImages admission controller • Options to enforce access control with Helm: • Deploy tiller per namespace with RBAC and client certs • Use: helm --template test | kubectl -f - • Wait for Helm 3.0! • helm --wait waits for minimum pod count to be satisfied • For default of replicas=1 and maxUnavailable=1 that is zero!
  • 23. © 2018 CloudBees, Inc. All Rights Reserved. 23 Jenkins X • Opinionated best-practice CI/CD for Kubernetes • Fully-configured cluster • Quick starts for many languages (Spring, Liberty, Node, Go, …) • GitOps for environmental promotion • Each environment represented as Helm umbrella chart in git • Preview environments for pull requests
  • 24. © 2018 CloudBees, Inc. All Rights Reserved. 24 Getting started with Jenkins X • Install Jenkins X CLI $ brew install jenkins-x/jx/jx • Create cluster with Jenkins X pre-configured $ jx create cluster gke # or eks, minikube, … • Create new project (creates repo and sets up webhooks) $ jx create quickstart • Preview environments are automatically created for PRs • Automatic promotion to staging on merge to master • Manual promotion to production $ jx promote myapp --version 1.2.3 --env promotion
  • 25. © 2018 CloudBees, Inc. All Rights Reserved. 25 Demo
  • 26. © 2018 CloudBees, Inc. All Rights Reserved. 26 Jenkins X is evolving • Version 1 • Based on Kubernetes Helm chart • Version 2 • Webhooks handled by prow • ‘Serverless Jenkins’ spun up to run build • Wrapped in knative build • Blog post: https://jenkins-x.io/news/serverless-jenkins/
  • 27. © 2018 CloudBees, Inc. All Rights Reserved. 27 Kube CD in Limited Availability for CloudBees Core customers
  • 29. © 2018 CloudBees, Inc. All Rights Reserved. 29 Summary • Helm is an effective way to quickly and flexibly deploy a scalable Jenkins topology on Kubernetes • Jenkins is a great choice for Continuous Delivery as well as Continuous Integration • Jenkins X is provides a modern GitOps based development workflow for rapid deployment and iteration
  • 30. Software at the speed of ideas THANK YOU! www.cloudbees.com