SlideShare a Scribd company logo
1 of 44
Download to read offline
Build, Publish, Deploy and Test Docker images
and containers with Jenkins Workflow.
Nigel Harniman
Senior Solutions Architect, CloudBees Inc
About me
Nigel Harniman
@harniman
Build Engineer,
Devops and
Architect
DevOps, Infra as Code,
Continuous Delivery
“Software is eating
the world”
Marc Andreessen
4
How Do You Deliver Better Software Faster?
ProdDev
5
Automation is the Key
Photo courtesy of Steve Jurvetson via Flickr
The Docker
Advantage
Docker Has Potential
An example: Software Configuration Management Space
Docker Has Potential
An example: Software Configuration Management Space
The New World Order: Containers Codify OS Config
9
ProdDev QA Staging
DEV Server/VM QA Server/VM STG Server/VMPROD Server/VM
<PROD OS config><STG OS config><QA OS config><DEV OS config>
App
<code>
<APP OS config>
App
<code>
<APP OS config>
App
<code>
<APP OS config>
App
<code>
<APP OS config>
So is this how I build a Docker Image?
10
Jenkins & Docker
How Can You Use Jenkins & Docker Together?
+
How Can You Use Jenkins & Docker Together?
1. Run Jenkins Masters & Slaves in
Docker
2. Build, Test, & Deploy Docker Images
from Jenkins
1. Run Jenkins Masters & Slaves in Docker
Docker (Cloud) – use Docker
images as standardized build
environments to improve isolation
and elasticity
Docker Custom Build
Environment – specify customized
build environments as Docker
containers
CloudBees Docker Shared
Config – manage Docker (or
Swarm) host configuration centrally
in CloudBees Jenkins Operations
Center
2. Build, Test, & Deploy Docker Images from Jenkins
Build and Publish – build projects
that have a Dockerfile and push
the resultant tagged image to
Docker Hub
Docker Traceability – identify
which build pushed a particular
container and displays the build /
image details in Jenkins
Docker Hub Notification – trigger
downstream jobs when a tagged
container is pushed to Docker Hub
Jenkins Workflow &
Docker
Jenkins Workflow Primer
Jenkins powered CD pipelines
Jenkins Workflow
ProdDev
Perf Test
BuildCommit
Selenium
Test
Stage Deploy
Sonar
Test
Pipelines Need:
 Branching
 Looping
 Restarts
 Checkpoints
 Manual Input
??
Key Workflow Features
18
 Entire flow is one concise Groovy script using Workflow DSL
• For loops, try-finally, fork-join …
 Can restart Jenkins while flow is running
 Allocate slave nodes and workspaces
• As many as you want, when you want
 Stages throttle concurrency of builds
 Human input/approval integrated into flow
 Standard project concepts: SCM, artifacts, plugins
Jenkins Workflow + Docker
Pipeline Stages
20
Build
and Unit
Test App
Test
Docker
Image
Publish
Docker
Image
SCM Checkout
mvn package
mvn sonar:sonar
mvn verify
docker build
docker tag
docker run
notify
cucumber
war img
Sonar
Analysis
Prepare
Release
Build
Docker
Image
Int Test
docker push
image.inside withServer
Build, unit test and package
21
Build
and Unit
Test App
Test
Docker
Image
Publish
Docker
Image
SCM Checkout
mvn package
mvn sonar:sonar
mvn verify
docker build
docker Tag
docker run
notify
cucumber
war img
Sonar
Analysis
Prepare
Release
Build
Docker
Image
Int Test
docker push
image.inside withServer
Build, unit test and package
stage 'Build App’
node('docker') {
docker.image(‘maven:3.3.3-jdk-8’).inside(‘-v /data:/data’ {
mkdir –p /data/mvn
writeFile file: 'settings.xml', text: ”(………)"
git 'https://github.com/cloudbees/mobile-deposit-api.git’
sh 'mvn –s settings.xml clean package’
…
Specify the Stage Name
Specify the slave label
Custom Build Env Mount volume from slave
.m2 repo location
co and build
Defining a Docker Slave
Specify Image as template
Assign labels
Test the app
24
Build
and Unit
Test App
Test
Docker
Image
Publish
Docker
Image
SCM Checkout
mvn package
mvn sonar:sonar
mvn verify
docker build
docker Tag
docker run
notify
cucumber
war img
Sonar
Analysis
Prepare
Release
Build
Docker
Image
Int Test
docker push
image.inside withServer
Test the app
node('docker') {
docker.image(‘maven:3.3.3-jdk-8’).inside(‘-v /data:/data’ {
…
stage 'Sonar analysis’
sh 'mvn -s settings.xml sonar:sonar’
stage 'Integration-test’
sh 'mvn -s settings.xml verify’
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
}
…
In same env as build
Sonar tests
Run API Tests
Build, test and publish Docker image
26
Build
and Unit
Test App
Test
Docker
Image
Publish
Docker
Image
SCM Checkout
mvn package
mvn sonar:sonar
mvn verify
docker build
docker Tag
docker run
notify
cucumber
war img
Sonar
Analysis
Prepare
Release
Build
Docker
Image
Int Test
docker push
image.inside withServer
Build, test and publish Docker image
docker.withServer('tcp://192.168.99.100:2376', 'slave-docker-us-east-1-tls'){
stage 'Build Docker image’
def mobileDepositApiImage
dir('.docker') {
sh "mv ../target/*-SNAPSHOT.jar mobile-deposit-api.jar”
mobileDepositApiImage = docker.build "harniman/mobile-deposit-api:${buildVersion}”
}
stage 'Test Docker image’
container=mobileDepositApiImage.run("--name mobile-deposit-api -p 8080:8080”)
sh "curl http://<user>:<token>@<host>:8080/docker-traceability/submitContainerStatus ......
// insert cucumber tests here
stage 'Publish Docker image’
withDockerRegistry(registry: [credentialsId: 'dockerhub-harniman']) {
mobileDepositApiImage.push()
}
}
Bind to docker host
Change directory
Launch container
Build docker image
Bind to registry
Push image
Submit traceability report
28
Tagged Version
a
Tagged Image in Docker Hub
a
Traceability
Traceability
Builds on existing Jenkins artifact traceability
Allows the tracking of the creation and use of Docker containers in
Jenkins and their future use.
Combine with artifact fingerprinting for a comprehensive solution
Each Build shows the image fingerprints created
30
Identify which build pushed a particular container and display the
build / image details in Jenkins
Image fingerprints
Traceability – registering events
Jenkins can track actions against this image such as:
• Creating a container
• Container events such as start/stop
To achieve this, it is necessary to call the Traceability API – see
$(JENKINS_URL)/docker-traceability/api/
There are two endpoints to submit events to:
31
/docker-
traceability/submitContai
nerStatus
Allows to submit the current container status
snapshot with a minimal set of parameters. Outputs
of docker inspect $(containerId) can be directly
submitted to Jenkins server using this command.
/docker-
traceability/submitReport
Submits a report using the extended JSON API. This
endpoint can be used by scripts to submit the full
available info about the container and its
environment in a single command.
Traceability – registering events - example
Workflow usage example:
32
container = mobileDepositApiImage.run("--name mobile-deposit-api -p 8080:8080")
sh "curl http://<user>:<token>@<host>:8080/docker-traceability/submitContainerStatus 
--data-urlencode status=deployed 
--data-urlencode inspectData="$(docker inspect $container.id)" 
--data-urlencode environment=test 
--data-urlencode hostName=mymac 
--data-urlencode imageName=harniman/mobile-deposit-api"
Spin up container
Notify Jenkins
Docker Traceability View
33
Docker Traceability
Container
Container Use View
34
Deployment Events
Link to Build
Dockerhub Notifications
Docker Hub Notification
Trigger downstream jobs when a tagged container is pushed to Docker Hub
The Docker Hub Notification Trigger plugin lets you configure Jenkins to
trigger builds when an image is pushed to Docker Hub. E.g. to run
verification for the container.
What are the steps
Set up a WebHook Account for Notification
Set up your Docker Registry to make callbacks on Image events
Set up your builds
36
Docker Hub Notification – Docker Registry Webhook
37
In the format:
http://<user>:<token>@<jenkins_url>/dockerhub-webhook/notify
Docker Hub Notification – Job Set up
38
Configure Trigger
In Conclusion
Docker and Jenkins with Workflow is the proven
CD Platform
40
+
TESTING
STAGING
PRODUCTION
Workflow CD Pipeline Triggers:
• New application code (i.e. feature, bug, etc.)
• Updated certified stack (security fix in Linux, etc.)
… will lead to a new gold image being built and available for…
… TESTING
… STAGING
… PRODUCTION
All taking place in a standardized/similar/consistent environment
<OS config>
Company
“Gold”
Docker Img
(~per app)
App
<code>
(git, etc.)
<OS config>
Certified
Docker
Images
(Ubuntu, etc.)
Jenkins Workflow
CloudBees: Leading the Way for Docker and CD
Docker Workflow – Provides first-class support for Jenkins Workflow to build real
world CD pipelines for containerized applications using Jenkins and Docker
Build and Publish – Builds projects that have a Dockerfile and pushes the
resultant tagged image to Docker Hub
Docker Hub Notification – Triggers downstream jobs when a tagged container is
pushed to Docker Hub
Docker Traceability – Identifies which build pushed a particular container that is
running in production and displays that on the Jenkins builds page
Docker – Uses Docker containers as standardized build environments to improve
isolation and elasticity – Dockerized Build Slaves
Docker Custom Build Environment – Specifies customized build environments
as Docker containers
Getting started
Docker plugin documentation:
http://documentation.cloudbees.com/docs/cje-user-guide/docker-
workflow.html
Workflow tutorial:
https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md
Example Source Code
https://github.com/harniman/mobile-deposit-api/blob/master/flow.groovy
How Do You Manage CD at Enterprise Scale?
43
CloudBees Jenkins Platform
Jenkins at Enterprise Scale for CI and CD
Thank you!
Nigel Harniman
@harniman
nharniman@cloudbees.com

More Related Content

What's hot

Building a CICD pipeline for deploying to containers
Building a CICD pipeline for deploying to containersBuilding a CICD pipeline for deploying to containers
Building a CICD pipeline for deploying to containersAmazon Web Services
 
DevOps overview 2019-04-13 Nelkinda April Meetup
DevOps overview  2019-04-13 Nelkinda April MeetupDevOps overview  2019-04-13 Nelkinda April Meetup
DevOps overview 2019-04-13 Nelkinda April MeetupShweta Sadawarte
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on KubernetesOpsta
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesQAware GmbH
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage buildAlexei Ledenev
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker, Inc.
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsKnoldus Inc.
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesAmazon Web Services
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureKasun Kodagoda
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To JenkinsKnoldus Inc.
 

What's hot (20)

Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Building a CICD pipeline for deploying to containers
Building a CICD pipeline for deploying to containersBuilding a CICD pipeline for deploying to containers
Building a CICD pipeline for deploying to containers
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
DevOps overview 2019-04-13 Nelkinda April Meetup
DevOps overview  2019-04-13 Nelkinda April MeetupDevOps overview  2019-04-13 Nelkinda April Meetup
DevOps overview 2019-04-13 Nelkinda April Meetup
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on Kubernetes
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Devops ppt
Devops pptDevops ppt
Devops ppt
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
presentation on Docker
presentation on Dockerpresentation on Docker
presentation on Docker
 
DevOps introduction
DevOps introductionDevOps introduction
DevOps introduction
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage build
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker Slides
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 

Viewers also liked

Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsDaniel Oh
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsMicael Gallego
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker AgileDenver
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsContinuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsMarcel Birkner
 
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)Chris Richardson
 
CI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumCI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumSreenivas Makam
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsFrancesco Bruni
 
Jenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous ImprovementJenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous ImprovementUdaypal Aarkoti
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleRobert Reiz
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerSonatype
 

Viewers also liked (11)

Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOps
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsContinuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
 
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
 
CI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumCI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and Tutum
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Jenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous ImprovementJenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous Improvement
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for Docker
 

Similar to Build, Publish, Deploy and Test Docker images and containers with Jenkins Workflow

Production sec ops with kubernetes in docker
Production sec ops with kubernetes in dockerProduction sec ops with kubernetes in docker
Production sec ops with kubernetes in dockerDocker, Inc.
 
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, CloudbeesReduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, CloudbeesDocker, Inc.
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 augVincent De Smet
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containersinside-BigData.com
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
2016 Docker Palo Alto - CD with ECS and Jenkins
2016 Docker Palo Alto -  CD with ECS and Jenkins2016 Docker Palo Alto -  CD with ECS and Jenkins
2016 Docker Palo Alto - CD with ECS and JenkinsTracy Kennedy
 
SDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and ProfitSDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and Profitdantheelder
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationSuresh Balla
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...Puppet
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeEvoke Technologies
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...jemije2490
 
Añadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continuaAñadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continuaCésar Martín Ortiz Pintado
 
Linuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopLinuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopElton Stoneman
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandPRIYADARSHINI ANAND
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 

Similar to Build, Publish, Deploy and Test Docker images and containers with Jenkins Workflow (20)

Production sec ops with kubernetes in docker
Production sec ops with kubernetes in dockerProduction sec ops with kubernetes in docker
Production sec ops with kubernetes in docker
 
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, CloudbeesReduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
2016 Docker Palo Alto - CD with ECS and Jenkins
2016 Docker Palo Alto -  CD with ECS and Jenkins2016 Docker Palo Alto -  CD with ECS and Jenkins
2016 Docker Palo Alto - CD with ECS and Jenkins
 
SDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and ProfitSDLC Using Docker for Fun and Profit
SDLC Using Docker for Fun and Profit
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Docking with Docker
Docking with DockerDocking with Docker
Docking with Docker
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
 
Añadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continuaAñadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continua
 
Linuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopLinuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro Workshop
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 

More from Docker, Inc.

Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Docker, Inc.
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildDocker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSDocker, Inc.
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXDocker, Inc.
 
How To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and ComposeHow To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and ComposeDocker, Inc.
 
Distributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at SalesforceDistributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at SalesforceDocker, Inc.
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker HubThe First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker HubDocker, Inc.
 
Monitoring in a Microservices World
Monitoring in a Microservices WorldMonitoring in a Microservices World
Monitoring in a Microservices WorldDocker, Inc.
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...Docker, Inc.
 
Predicting Space Weather with Docker
Predicting Space Weather with DockerPredicting Space Weather with Docker
Predicting Space Weather with DockerDocker, Inc.
 
Become a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio CodeBecome a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio CodeDocker, Inc.
 
How to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container RegistryHow to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container RegistryDocker, Inc.
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!Docker, Inc.
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog ScaleDocker, Inc.
 
Labels, Labels, Labels
Labels, Labels, Labels Labels, Labels, Labels
Labels, Labels, Labels Docker, Inc.
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelUsing Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelDocker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSDocker, Inc.
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...Docker, Inc.
 
Developing with Docker for the Arm Architecture
Developing with Docker for the Arm ArchitectureDeveloping with Docker for the Arm Architecture
Developing with Docker for the Arm ArchitectureDocker, Inc.
 

More from Docker, Inc. (20)

Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker Build
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINX
 
How To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and ComposeHow To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and Compose
 
Hands-on Helm
Hands-on Helm Hands-on Helm
Hands-on Helm
 
Distributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at SalesforceDistributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at Salesforce
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker HubThe First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker Hub
 
Monitoring in a Microservices World
Monitoring in a Microservices WorldMonitoring in a Microservices World
Monitoring in a Microservices World
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
 
Predicting Space Weather with Docker
Predicting Space Weather with DockerPredicting Space Weather with Docker
Predicting Space Weather with Docker
 
Become a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio CodeBecome a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio Code
 
How to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container RegistryHow to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container Registry
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
 
Labels, Labels, Labels
Labels, Labels, Labels Labels, Labels, Labels
Labels, Labels, Labels
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelUsing Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
 
Developing with Docker for the Arm Architecture
Developing with Docker for the Arm ArchitectureDeveloping with Docker for the Arm Architecture
Developing with Docker for the Arm Architecture
 

Recently uploaded

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Build, Publish, Deploy and Test Docker images and containers with Jenkins Workflow

  • 1. Build, Publish, Deploy and Test Docker images and containers with Jenkins Workflow. Nigel Harniman Senior Solutions Architect, CloudBees Inc
  • 2. About me Nigel Harniman @harniman Build Engineer, Devops and Architect DevOps, Infra as Code, Continuous Delivery
  • 3. “Software is eating the world” Marc Andreessen
  • 4. 4 How Do You Deliver Better Software Faster? ProdDev
  • 5. 5 Automation is the Key Photo courtesy of Steve Jurvetson via Flickr
  • 7. Docker Has Potential An example: Software Configuration Management Space
  • 8. Docker Has Potential An example: Software Configuration Management Space
  • 9. The New World Order: Containers Codify OS Config 9 ProdDev QA Staging DEV Server/VM QA Server/VM STG Server/VMPROD Server/VM <PROD OS config><STG OS config><QA OS config><DEV OS config> App <code> <APP OS config> App <code> <APP OS config> App <code> <APP OS config> App <code> <APP OS config>
  • 10. So is this how I build a Docker Image? 10
  • 12. How Can You Use Jenkins & Docker Together? +
  • 13. How Can You Use Jenkins & Docker Together? 1. Run Jenkins Masters & Slaves in Docker 2. Build, Test, & Deploy Docker Images from Jenkins
  • 14. 1. Run Jenkins Masters & Slaves in Docker Docker (Cloud) – use Docker images as standardized build environments to improve isolation and elasticity Docker Custom Build Environment – specify customized build environments as Docker containers CloudBees Docker Shared Config – manage Docker (or Swarm) host configuration centrally in CloudBees Jenkins Operations Center
  • 15. 2. Build, Test, & Deploy Docker Images from Jenkins Build and Publish – build projects that have a Dockerfile and push the resultant tagged image to Docker Hub Docker Traceability – identify which build pushed a particular container and displays the build / image details in Jenkins Docker Hub Notification – trigger downstream jobs when a tagged container is pushed to Docker Hub
  • 17. Jenkins Workflow Primer Jenkins powered CD pipelines Jenkins Workflow ProdDev Perf Test BuildCommit Selenium Test Stage Deploy Sonar Test Pipelines Need:  Branching  Looping  Restarts  Checkpoints  Manual Input ??
  • 18. Key Workflow Features 18  Entire flow is one concise Groovy script using Workflow DSL • For loops, try-finally, fork-join …  Can restart Jenkins while flow is running  Allocate slave nodes and workspaces • As many as you want, when you want  Stages throttle concurrency of builds  Human input/approval integrated into flow  Standard project concepts: SCM, artifacts, plugins
  • 20. Pipeline Stages 20 Build and Unit Test App Test Docker Image Publish Docker Image SCM Checkout mvn package mvn sonar:sonar mvn verify docker build docker tag docker run notify cucumber war img Sonar Analysis Prepare Release Build Docker Image Int Test docker push image.inside withServer
  • 21. Build, unit test and package 21 Build and Unit Test App Test Docker Image Publish Docker Image SCM Checkout mvn package mvn sonar:sonar mvn verify docker build docker Tag docker run notify cucumber war img Sonar Analysis Prepare Release Build Docker Image Int Test docker push image.inside withServer
  • 22. Build, unit test and package stage 'Build App’ node('docker') { docker.image(‘maven:3.3.3-jdk-8’).inside(‘-v /data:/data’ { mkdir –p /data/mvn writeFile file: 'settings.xml', text: ”(………)" git 'https://github.com/cloudbees/mobile-deposit-api.git’ sh 'mvn –s settings.xml clean package’ … Specify the Stage Name Specify the slave label Custom Build Env Mount volume from slave .m2 repo location co and build
  • 23. Defining a Docker Slave Specify Image as template Assign labels
  • 24. Test the app 24 Build and Unit Test App Test Docker Image Publish Docker Image SCM Checkout mvn package mvn sonar:sonar mvn verify docker build docker Tag docker run notify cucumber war img Sonar Analysis Prepare Release Build Docker Image Int Test docker push image.inside withServer
  • 25. Test the app node('docker') { docker.image(‘maven:3.3.3-jdk-8’).inside(‘-v /data:/data’ { … stage 'Sonar analysis’ sh 'mvn -s settings.xml sonar:sonar’ stage 'Integration-test’ sh 'mvn -s settings.xml verify’ step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) } … In same env as build Sonar tests Run API Tests
  • 26. Build, test and publish Docker image 26 Build and Unit Test App Test Docker Image Publish Docker Image SCM Checkout mvn package mvn sonar:sonar mvn verify docker build docker Tag docker run notify cucumber war img Sonar Analysis Prepare Release Build Docker Image Int Test docker push image.inside withServer
  • 27. Build, test and publish Docker image docker.withServer('tcp://192.168.99.100:2376', 'slave-docker-us-east-1-tls'){ stage 'Build Docker image’ def mobileDepositApiImage dir('.docker') { sh "mv ../target/*-SNAPSHOT.jar mobile-deposit-api.jar” mobileDepositApiImage = docker.build "harniman/mobile-deposit-api:${buildVersion}” } stage 'Test Docker image’ container=mobileDepositApiImage.run("--name mobile-deposit-api -p 8080:8080”) sh "curl http://<user>:<token>@<host>:8080/docker-traceability/submitContainerStatus ...... // insert cucumber tests here stage 'Publish Docker image’ withDockerRegistry(registry: [credentialsId: 'dockerhub-harniman']) { mobileDepositApiImage.push() } } Bind to docker host Change directory Launch container Build docker image Bind to registry Push image Submit traceability report
  • 30. Traceability Builds on existing Jenkins artifact traceability Allows the tracking of the creation and use of Docker containers in Jenkins and their future use. Combine with artifact fingerprinting for a comprehensive solution Each Build shows the image fingerprints created 30 Identify which build pushed a particular container and display the build / image details in Jenkins Image fingerprints
  • 31. Traceability – registering events Jenkins can track actions against this image such as: • Creating a container • Container events such as start/stop To achieve this, it is necessary to call the Traceability API – see $(JENKINS_URL)/docker-traceability/api/ There are two endpoints to submit events to: 31 /docker- traceability/submitContai nerStatus Allows to submit the current container status snapshot with a minimal set of parameters. Outputs of docker inspect $(containerId) can be directly submitted to Jenkins server using this command. /docker- traceability/submitReport Submits a report using the extended JSON API. This endpoint can be used by scripts to submit the full available info about the container and its environment in a single command.
  • 32. Traceability – registering events - example Workflow usage example: 32 container = mobileDepositApiImage.run("--name mobile-deposit-api -p 8080:8080") sh "curl http://<user>:<token>@<host>:8080/docker-traceability/submitContainerStatus --data-urlencode status=deployed --data-urlencode inspectData="$(docker inspect $container.id)" --data-urlencode environment=test --data-urlencode hostName=mymac --data-urlencode imageName=harniman/mobile-deposit-api" Spin up container Notify Jenkins
  • 33. Docker Traceability View 33 Docker Traceability Container
  • 34. Container Use View 34 Deployment Events Link to Build
  • 36. Docker Hub Notification Trigger downstream jobs when a tagged container is pushed to Docker Hub The Docker Hub Notification Trigger plugin lets you configure Jenkins to trigger builds when an image is pushed to Docker Hub. E.g. to run verification for the container. What are the steps Set up a WebHook Account for Notification Set up your Docker Registry to make callbacks on Image events Set up your builds 36
  • 37. Docker Hub Notification – Docker Registry Webhook 37 In the format: http://<user>:<token>@<jenkins_url>/dockerhub-webhook/notify
  • 38. Docker Hub Notification – Job Set up 38 Configure Trigger
  • 40. Docker and Jenkins with Workflow is the proven CD Platform 40 + TESTING STAGING PRODUCTION Workflow CD Pipeline Triggers: • New application code (i.e. feature, bug, etc.) • Updated certified stack (security fix in Linux, etc.) … will lead to a new gold image being built and available for… … TESTING … STAGING … PRODUCTION All taking place in a standardized/similar/consistent environment <OS config> Company “Gold” Docker Img (~per app) App <code> (git, etc.) <OS config> Certified Docker Images (Ubuntu, etc.) Jenkins Workflow
  • 41. CloudBees: Leading the Way for Docker and CD Docker Workflow – Provides first-class support for Jenkins Workflow to build real world CD pipelines for containerized applications using Jenkins and Docker Build and Publish – Builds projects that have a Dockerfile and pushes the resultant tagged image to Docker Hub Docker Hub Notification – Triggers downstream jobs when a tagged container is pushed to Docker Hub Docker Traceability – Identifies which build pushed a particular container that is running in production and displays that on the Jenkins builds page Docker – Uses Docker containers as standardized build environments to improve isolation and elasticity – Dockerized Build Slaves Docker Custom Build Environment – Specifies customized build environments as Docker containers
  • 42. Getting started Docker plugin documentation: http://documentation.cloudbees.com/docs/cje-user-guide/docker- workflow.html Workflow tutorial: https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md Example Source Code https://github.com/harniman/mobile-deposit-api/blob/master/flow.groovy
  • 43. How Do You Manage CD at Enterprise Scale? 43 CloudBees Jenkins Platform Jenkins at Enterprise Scale for CI and CD

Editor's Notes

  1. About me: I work for CloudBees as a Solution Architect helping our customers understand how CloudBees Jenkins Platform can help them solve their goals. I have been in engineering for over 20 years and have performed various java development and architecture roles including a stint as a build engineer and as a lead Dev Ops. I came to CloudBees from Sky where I had responsibility for the online video platform, and as part of my time there I designed and built an online platform for sales and service using Infrastructure as Code principles – devops before it was called that! QAs deployed many times a day via a self service mechanism with db redeployment/upgrade and flexible mocking options. We deployed to prod weekly with full VM tear down and rebuild via a scripted ‘next”, “next” approach I am interested in all things automation, devops, and especially how that applies in the cloud.
  2. We’ve heard this Meme over and over. Marc Andreeson said “Software is eating the World.” What does this mean? Wherever we look, products are being defined by the software they run as much as the physical appearance. For instance, is a car defined just by its style, or by the driver automation features implemented by software such as auto parking, lane assist, adaptive cruise control, self driving? What about the recent emissions scandal involving a certain German manufacturer? Has this been attributed to Hardware or Software? The software stakes have never been higher. Quality needs have never been higher – who wants their self driving car to crash – but speed to market of new features becomes critical as software becomes a key differentiator.
  3. So, how do we do that? How do we deliver better software faster? How do we take code developed by developers and rapidly move it to production as new features for users? Whilst maintaining quality.
  4. Well, Automation is the key. Just as the Tesla Motor Company built a fully automated factory floor to produce their leading edge cars, we need to build a fully automated software factory using automation technologies.
  5. Lets look at the advantage Docker brings to speeding up this process.
  6. A typical full stack configuration looks like this: Develop Code Commit to SCM Build and test app with Jenkins Provision environment with Puppet Test Environment and App code are not bound tightly together. Environment changes do not propagate with App changes. Testers find bugs, developers have to spend time investigating why it worked in DEV and not in PROD and then re-working. This is not fast
  7. Use Docker to manage the environment config alongside the application. Propagate the same configuration across all environments. If it works in Dev, it will work in prod. Focus on new innovation rather than fault finding.
  8. What does this look like in reality? We package all app related OS config with the application code. The same tested package is propagated across the environments. This takes the single binary concept to the next level. (NB we still have to manage data network layers and provide consistent configuration. Other tooling can address these needs.
  9. Images need to be built using a reliable, repeatable and automated process These days it is not acceptable to build application artifacts by hand – so Docker Images need the same type of automation.
  10. This is where Jenkins comes to our rescue Jenkins is widely used for application CI and drives many CD initiaves (RebelLabs research showed 70% of Java projects use Jenkins)
  11. Lets look at how Jenkins and Docker can be used together to take your delivery process to the next level.
  12. Two patterns of use: Use Docker to provide run-time environments for Jenkins components – Slaves and Masters (And Operations Center if running CloudBees Jenkins Platform) Use Jenkins to build and test Docker Images
  13. Firstly Docker can be leveraged as the runtime platform for Jenkins components such as Masters and Slaves. There are standard docker images for Masters, and the CloudBees Jenkins Platform components. Docker can also be used to provision Slave nodes on demand using the Docker Slaves plugin. Various images exist, or roll your own with all required tools. Also integrates via Swam and Kubernetes for scaling across many Docker hosts Sometimes you want a very controlled build environment – think clean room, or you need certain pre-configured credentials or other config to exist. The Custom Build Environment plugin allows you to achieve just this. Within your slave, a container is spun up from a predefined image, filesystems mounted from the slave and the build steps executed within the container. Users of the CloudBees Jenkins Platform are able to leverage the Shared Config capability to distribute the docker host and image/label configuration across the whole cluster of masters from a central point. I won’t go into details of these now, as we want to focus on pipelines.
  14. The second area that Jenkins and Docker deliver is the ability to create a fully automated pipeline to Build, Test and Deploy Docker images. The Build and Publish plugin provides an easy to use abstraction of the Docker command line and adds Jenkins Build Steps for build, tag, push etc Docker Traceability extends Jenkins existing Fingerprint capability to allow identification of the underlying build that created a given image, and allows tracing back from a running container Docker Hub Notification addresses two needs. How do I trigger a redeployment when an Image is pushed, and, given Docker’s layered approach, how do I rebuild my image if an upstream layer is changed – ie my Company pushes a new Ubuntu-secure-base These plugins can be used in regular Jenkins jobs to assemble pipelines, but I want to show you how super simple this is using Jenkins Workflow.
  15. Workflow is a new Job type. Launched in Nov 2014. Workflow is available to the OSS users. A job now becomes the whole pipeline, and has the power to model complex scenarios such as Branching, Looping, handling human input. A workflow also runs in a detached manner, which means as long as the real work is being performed on executors, it survives a Master restart.
  16. Jenkins Workflow has some really cool features…
  17. Workflow has the concept of Stages. This screen shot is using the Stage View plugin from CloudBees Jenkins Platform to show how a typical Docker pipeline might look. Stages are fully customizable.
  18. Lets look at this example pipeline in more detail. We are going to build the app just like we do today – this will compile and unit test, produce a war (mvn package) , run Sonar analysis (mvn sonar:sonar) and then Integration test (mvn verify) The difference here, is we are going to run this inside a specific Docker container using the Custom Build Environment plugin We will then prepare the release – in this case it is grabbing the version from the POM Now comes the real Docker integration. We will create the docker image and tag it. We then spin up a container from this image, notify Jenkins of the container (for traceability) and run tests against it – these could be functional, security, performance – maybe you will have multiple test phases run in parallel against multiple containers. If the tests pass, we then publish the image to our registry – public or private – the choice is yours.
  19. Lets look at the build step in more detail
  20. We specify the stage name Next, we need to run these steps on a slave. This slave needs docker installed. Then we define the container we need to run the build in And mount a additional data volume – we do this to provide a common maven repo cache Which is why we use a custom settings file to point to the repo location And then we perform a git checkout, and run mvn from the command line
  21. A note about docker slaves In the global config, you specify various docker images that can be used as slaves, and map to labels. There is an existing docker-in-docker plugin that I am using to spin up a container that also can run docker,
  22. Next we will look at the sonar and integration test steps
  23. We add stage names And then we run the mvn targets from the command line This is typical workflow pipeline construction
  24. Now we’ll focus on the image creation and use.
  25. First we need to ensure we have access to a docker host. You can see here I am referencing a Jenkins Credentials via its ID. The docker plugins are fully integrated with Jenkins Credentials API. Within this block that performs the bind, I will then execute the workflow steps You can see more stages defined – I’m not going to cover these in detail – it’s the same as before Next we need to ensue we are executing commands within the context of the correct directory on the filesystem that contains the dockerfile We then invoke the build – providing the tag at the same time – note we obtain a reference to the image Once the image is built, we want to provision a container. Note we also grab a handle to this so we can address it later. The next step is to notify Jenkins that we have created a container from this image (I’ll show more details a bit later) If the tests pass, we bind to the registry (the default is dockerhub) – note we also supply credentials reference here too, and the push the image
  26. And voila, we have a tagged version that is fully tested.
  27. So I mentioned earlier I would talk more about traceability.
  28. Identify which build pushed a particular container and display the build / image details in Jenkins
  29. After we have spun up a container, we need to call the Jenkins traceability endpoint with details. Fortunately we can pass in the output of “docker inspect”
  30. What does this give us? On the left hand menu we have a new Docker Traceability item It shows the containers known to Jenkins Clicking on one reveals
  31. The container’s events – as logged via the Traceability API And the Build that created the image so you can trace back to the source.
  32. A final word on Docker Hub Notifications
  33. Trigger downstream jobs when a tagged container is pushed to Docker Hub
  34. Need to configure Docker registry with a WebHook and provide the user and token to access
  35. Then you configure the trigger conditions on the jobs It can either be automatic from any Docker image used by the build – ie deploy container from image x Or, you can list the depenant images explicity
  36. OK, so in conclusion
  37. Jenkins and Docker can be your key to Continuous Delivery. The same automation engine that you already know and use for CI can fully power your docker based CD process as well. Jenkins supports the creation and management of complex Delivery Pipelines
  38. CloudBees has been working closely with Docker, the company, to create a number of Jenkins plugins that insure that Docker is a first-class entity in the CD/DevOps ecosystem.
  39. How can you get started? Documentation on the Docker extensions for Workflow Workflow Tutorial Take a look at the example application and pipeline on my Github
  40. So, how do you manage Jenkins at Enterprise scale? If you are going to use Jenkins for CI or CD, then it will become a crucial part of your application delivery environment. You need to be confident that it will be there when needed. That’s where we come in. <click build> CloudBees is the enterprise Jenkins company. We offer subscription based access to CloudBees Jenkins Enterprise which is an enhanced, robust, and highly available version of Jenkins that is built on the same open source core that you know and trust.