SlideShare a Scribd company logo
CI/CD with Docker
Henry Huang
Agengda
• Docker brings benefits on CI/CD process
• Coding: IDE with Docker
• Build with Docker
• Jenkins with Docker
– 1 Master x Slaves
– Masters x Slaves
Docker Provides
• Easy to prepare dev build environments
• No languages/libraries dependencies
• Build starts in seconds - more faster
• Increased robustness
• Simplified deployment on CI nodes
• Faster Rollback & Canary Release
• Easy to scale on CI nodes
• Well compatible with existing CI tools
CI/CD Process
Coding
• IDE with Docker
– Can run your code any where
If it runs on your laptop it will run on the integration
server too
– Don't have to bother about libraries, conflicts or
installing GCC, etc.
– Easy to build with different language packs or
libraries, etc.
Coding
• Requirements for IDE with Docker
– Dockerfile
• Syntax highlighting
• Autocomplete
• Syntax validation
– Compose yml file
• Define inter container relation as links and volumes
• Run multiple containers with one click
– IDE build system
• Run containers from the IDE with different language packs
or library requirement, etc.
– IDE runtime system
• Launch runtime environment inside the container for
further troubleshooting and testing
Docker Plugin for IDE
• Doclipser
• Sublime Docker
• IntelliJ IDEA 14.1
• Eclipse JBossTools
• Visual Studio 2015 RCTools for Docker -
Preview extension
Summary Page: http://domeide.github.io/
Build
• Currently, we cannot meet the CI principles:
– Every commit (to baseline) should be built
– Keep the build fast
– Make it easy to get the latest deliverables
• Problems:
– [Dragged] Update dev build environment
– [Dragged/Fragile] Build the source files
– [Complicated] Get the latest/specified
deliverables
Build with Docker
• Easy to prepare dev build environments
• No languages/libraries dependencies
• Build starts in seconds - more faster
• Increased robustness
• Simplified deployment on CI nodes
• Faster Rollback & Canary Release
• Easy to scale on CI nodes
• Well compatible with existing CI tools
Example: Way of Building Docker
• Chicken and Egg
– build the latest docker binary in old version of docker container
• Dockerfile: provides the necessary dependencies and
environment to build
– COPY source files into Docker build image
• hack/make.sh: provides the build script for
– binary, cross, unit test, integration-cli-test, etc.
• Verify the new version via dind (docker-in-docker)
• Deliverables
– Docker Images
– Binary
• mounting host folder to the dev container
• Via `docker cp`
dind - build docker
# git clone https://github.com/docker/docker.git
# cd docker; docker build -t docker-dev .
# docker run --privileged --rm -ti docker-dev /bin/bash
root@383dd9ee7613:/go/src/github.com/docker/docker# hack/make.sh binary
---> Making bundle: binary (in bundles/1.8.0-dev/binary)
Building: bundles/1.8.0-dev/binary/docker-1.8.0-dev
Created binary: bundles/1.8.0-dev/binary/docker-1.8.0-dev
root@383dd9ee7613:/go/src/github.com/docker/docker# docker
bash: docker: command not found
… …
root@383dd9ee7613:/go/src/github.com/docker/docker# docker -dD
root@383dd9ee7613:/go/src/github.com/docker/docker# docker run hello-world
dind - hello world
Jenkins to build docker
• https://jenkins.dockerproject.org/job/Docker%20Master/
Docker Registry
• Docker Registry
– V1: named as registry (python, boto)
• https://github.com/docker/docker-registry
– V2: named as distribution (re-write from scratch, golang)
• https://github.com/docker/distribution
• Storage model
– inmemory
– Filesystem
– S3
– azure: Microsoft Azure Blob Storage
– rados: Ceph Object Storage
• Frontend UI
– https://github.com/kwk/docker-registry-frontend
– No supportV2
Docker Registry
# http://docs.docker.com/registry/deploying/
• Take Dockerfile
– HTTP
• Add “--insecure-registry” into docker daemon options
# docker pull private-registry.iwsaas:5000/centos:latest
– HTTPS: SSL private key and certificate
• Take Compose
– Extra data volumes, etc.
Multiple Registries
• Mirroring (still in proposal)
• Cross repository (included in the v2.1 milestone)
Jenkins with Docker
• Build/Push docker images
– Execute docker CLI in jobs: case #1
– Docker build step plugin: case #2
• https://wiki.jenkins-ci.org/display/JENKINS/Docker+build+step+plugin
• Execute tasks inside docker container
– Docker plugin (dind): case #3
• https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin
– Patched docker plugin (master and slave in the same
container level): case #4
• https://github.com/henrysher/docker-plugin
Demo for case 4
• Add new options into docker daemon marked in red:
OPTIONS='-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --selinux-
enabled'
• Run the docker image “iwsaas/jenkins” as a Jenkins container
# docker run -d -p 8080:8080 --name jenkins iwsaas/jenkins
b675af71332782a9bbfe6d92469d9a280ae751593b460520ac6bd6ab047b8b70
• Configure Docker Plugins
– Docker URL(docker0 virtual bridge address)
• http://172.17.42.1:4243
– DockerTemplate (iwsaas/jenkins-slave)
• Default username/password: jenkins/jenkins
• Create a “test” job and execute some basic commands
Case 4 - Console Output
• Execute the command inside the container
– Container ID: e380cfb050a1
Jenkins Problems
• Multiple Masters
– Sync & Standby
• Resource isolation & allocation (for slaves)
– Multiple tasks running on one slave
– CPU, Memory, Disk, etc. per task?
Mesos + Marathon +Docker+ Jenkins
• Mesos: kernel of distribute systems
• Marathon: init/upstart for mesos
Mesos + Marathon + Docker + Jenkins
• Mesos: kernel of distribute systems
• Marathon: init/upstart for mesos
Exploring Docker in CI/CD
Exploring Docker in CI/CD

More Related Content

What's hot

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 

What's hot (20)

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Devops Devops Devops
Devops Devops DevopsDevops Devops Devops
Devops Devops Devops
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
GitOps - Operation By Pull Request
GitOps - Operation By Pull RequestGitOps - Operation By Pull Request
GitOps - Operation By Pull Request
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operators
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
 
CD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdfCD using ArgoCD(KnolX).pdf
CD using ArgoCD(KnolX).pdf
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
GitOps and ArgoCD
GitOps and ArgoCDGitOps and ArgoCD
GitOps and ArgoCD
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 

Viewers also liked

Four top-team imperatives for capability building
Four top-team imperatives for capability buildingFour top-team imperatives for capability building
Four top-team imperatives for capability building
Richard Benson-Armer
 
Creating Competency Models
Creating Competency Models  Creating Competency Models
Creating Competency Models
Russell Sarder
 
Technology & Human Development - A Capability Approach
Technology & Human Development - A Capability ApproachTechnology & Human Development - A Capability Approach
Technology & Human Development - A Capability Approach
Ilse Oosterlaken
 
Competency mapping ppt
Competency mapping pptCompetency mapping ppt
Competency mapping ppt
jithindas05
 

Viewers also liked (20)

CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
 
CI/CD with Docker on AWS
CI/CD with Docker on AWSCI/CD with Docker on AWS
CI/CD with Docker on AWS
 
Four top-team imperatives for capability building
Four top-team imperatives for capability buildingFour top-team imperatives for capability building
Four top-team imperatives for capability building
 
Using technologies to develop capabilities with people living with intellectu...
Using technologies to develop capabilities with people living with intellectu...Using technologies to develop capabilities with people living with intellectu...
Using technologies to develop capabilities with people living with intellectu...
 
Presentation at uj
Presentation at ujPresentation at uj
Presentation at uj
 
ICT CAPABILITY BUILDING
ICT CAPABILITY BUILDINGICT CAPABILITY BUILDING
ICT CAPABILITY BUILDING
 
Creating Competency Models
Creating Competency Models  Creating Competency Models
Creating Competency Models
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Continuous Integration for Mobile App Testing
Continuous Integration for Mobile App TestingContinuous Integration for Mobile App Testing
Continuous Integration for Mobile App Testing
 
Docker on AWS - the Right Way
Docker on AWS - the Right WayDocker on AWS - the Right Way
Docker on AWS - the Right Way
 
Technology & Human Development - A Capability Approach
Technology & Human Development - A Capability ApproachTechnology & Human Development - A Capability Approach
Technology & Human Development - A Capability Approach
 
How open source is driving DevOps innovation: CloudOpen NA 2015
How open source is driving DevOps innovation: CloudOpen NA 2015How open source is driving DevOps innovation: CloudOpen NA 2015
How open source is driving DevOps innovation: CloudOpen NA 2015
 
Expert Talks Cardiff 2017 - Keeping your ci-cd system as fast as it needs to be
Expert Talks Cardiff 2017 - Keeping your ci-cd system as fast as it needs to beExpert Talks Cardiff 2017 - Keeping your ci-cd system as fast as it needs to be
Expert Talks Cardiff 2017 - Keeping your ci-cd system as fast as it needs to be
 
Competency model
Competency modelCompetency model
Competency model
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuous
 
Introduction to Business Strategy Development & Strategy Execution
Introduction to Business Strategy Development & Strategy ExecutionIntroduction to Business Strategy Development & Strategy Execution
Introduction to Business Strategy Development & Strategy Execution
 
Building a Business Development Strategy
Building a Business Development StrategyBuilding a Business Development Strategy
Building a Business Development Strategy
 
The Pedagogy, Andragogy, Heutagogy of Mobile Learning
The Pedagogy, Andragogy, Heutagogy of Mobile LearningThe Pedagogy, Andragogy, Heutagogy of Mobile Learning
The Pedagogy, Andragogy, Heutagogy of Mobile Learning
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 
Competency mapping ppt
Competency mapping pptCompetency mapping ppt
Competency mapping ppt
 

Similar to Exploring Docker in CI/CD

IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM France Lab
 

Similar to Exploring Docker in CI/CD (20)

ExpoQA 2017 Docker and CI
ExpoQA 2017 Docker and CIExpoQA 2017 Docker and CI
ExpoQA 2017 Docker and CI
 
Docker & ci
Docker & ciDocker & ci
Docker & ci
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
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
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on docker
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 Barcelona
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
DockerCon SF 2015: A New Model for Image Distribution
DockerCon SF 2015: A New Model for Image DistributionDockerCon SF 2015: A New Model for Image Distribution
DockerCon SF 2015: A New Model for Image Distribution
 
You, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeYou, and Me, and Docker Makes Three
You, and Me, and Docker Makes Three
 
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
IBM Bluemix Paris Meetup #14 - Le Village by CA - 20160413 - Introduction à D...
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Webinar: Using Docker Multi-stage Build to Create Advanced Pipelines
Webinar: Using Docker Multi-stage Build to Create Advanced PipelinesWebinar: Using Docker Multi-stage Build to Create Advanced Pipelines
Webinar: Using Docker Multi-stage Build to Create Advanced Pipelines
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 

More from Henry Huang

More from Henry Huang (7)

A Summary about Hykes' Keynote on Dockercon 2015
A Summary about Hykes' Keynote on Dockercon 2015A Summary about Hykes' Keynote on Dockercon 2015
A Summary about Hykes' Keynote on Dockercon 2015
 
Advanced Discussion on Cloud Formation
Advanced Discussion on Cloud FormationAdvanced Discussion on Cloud Formation
Advanced Discussion on Cloud Formation
 
DevOps, we need you.
DevOps, we need you.DevOps, we need you.
DevOps, we need you.
 
I am not a workaholic
I am not a workaholicI am not a workaholic
I am not a workaholic
 
New Way, New Truth
New Way, New TruthNew Way, New Truth
New Way, New Truth
 
Encrypted Traffic Mining
Encrypted Traffic MiningEncrypted Traffic Mining
Encrypted Traffic Mining
 
Elastic cloud
Elastic cloudElastic cloud
Elastic cloud
 

Recently uploaded

一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
aagad
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
abhinandnam9997
 

Recently uploaded (12)

The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 

Exploring Docker in CI/CD

  • 2. Agengda • Docker brings benefits on CI/CD process • Coding: IDE with Docker • Build with Docker • Jenkins with Docker – 1 Master x Slaves – Masters x Slaves
  • 3. Docker Provides • Easy to prepare dev build environments • No languages/libraries dependencies • Build starts in seconds - more faster • Increased robustness • Simplified deployment on CI nodes • Faster Rollback & Canary Release • Easy to scale on CI nodes • Well compatible with existing CI tools
  • 5. Coding • IDE with Docker – Can run your code any where If it runs on your laptop it will run on the integration server too – Don't have to bother about libraries, conflicts or installing GCC, etc. – Easy to build with different language packs or libraries, etc.
  • 6. Coding • Requirements for IDE with Docker – Dockerfile • Syntax highlighting • Autocomplete • Syntax validation – Compose yml file • Define inter container relation as links and volumes • Run multiple containers with one click – IDE build system • Run containers from the IDE with different language packs or library requirement, etc. – IDE runtime system • Launch runtime environment inside the container for further troubleshooting and testing
  • 7.
  • 8.
  • 9.
  • 10. Docker Plugin for IDE • Doclipser • Sublime Docker • IntelliJ IDEA 14.1 • Eclipse JBossTools • Visual Studio 2015 RCTools for Docker - Preview extension Summary Page: http://domeide.github.io/
  • 11. Build • Currently, we cannot meet the CI principles: – Every commit (to baseline) should be built – Keep the build fast – Make it easy to get the latest deliverables • Problems: – [Dragged] Update dev build environment – [Dragged/Fragile] Build the source files – [Complicated] Get the latest/specified deliverables
  • 12. Build with Docker • Easy to prepare dev build environments • No languages/libraries dependencies • Build starts in seconds - more faster • Increased robustness • Simplified deployment on CI nodes • Faster Rollback & Canary Release • Easy to scale on CI nodes • Well compatible with existing CI tools
  • 13. Example: Way of Building Docker • Chicken and Egg – build the latest docker binary in old version of docker container • Dockerfile: provides the necessary dependencies and environment to build – COPY source files into Docker build image • hack/make.sh: provides the build script for – binary, cross, unit test, integration-cli-test, etc. • Verify the new version via dind (docker-in-docker) • Deliverables – Docker Images – Binary • mounting host folder to the dev container • Via `docker cp`
  • 14. dind - build docker # git clone https://github.com/docker/docker.git # cd docker; docker build -t docker-dev . # docker run --privileged --rm -ti docker-dev /bin/bash root@383dd9ee7613:/go/src/github.com/docker/docker# hack/make.sh binary ---> Making bundle: binary (in bundles/1.8.0-dev/binary) Building: bundles/1.8.0-dev/binary/docker-1.8.0-dev Created binary: bundles/1.8.0-dev/binary/docker-1.8.0-dev root@383dd9ee7613:/go/src/github.com/docker/docker# docker bash: docker: command not found … … root@383dd9ee7613:/go/src/github.com/docker/docker# docker -dD root@383dd9ee7613:/go/src/github.com/docker/docker# docker run hello-world
  • 15. dind - hello world
  • 16. Jenkins to build docker • https://jenkins.dockerproject.org/job/Docker%20Master/
  • 17. Docker Registry • Docker Registry – V1: named as registry (python, boto) • https://github.com/docker/docker-registry – V2: named as distribution (re-write from scratch, golang) • https://github.com/docker/distribution • Storage model – inmemory – Filesystem – S3 – azure: Microsoft Azure Blob Storage – rados: Ceph Object Storage • Frontend UI – https://github.com/kwk/docker-registry-frontend – No supportV2
  • 18. Docker Registry # http://docs.docker.com/registry/deploying/ • Take Dockerfile – HTTP • Add “--insecure-registry” into docker daemon options # docker pull private-registry.iwsaas:5000/centos:latest – HTTPS: SSL private key and certificate • Take Compose – Extra data volumes, etc.
  • 19. Multiple Registries • Mirroring (still in proposal) • Cross repository (included in the v2.1 milestone)
  • 20. Jenkins with Docker • Build/Push docker images – Execute docker CLI in jobs: case #1 – Docker build step plugin: case #2 • https://wiki.jenkins-ci.org/display/JENKINS/Docker+build+step+plugin • Execute tasks inside docker container – Docker plugin (dind): case #3 • https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin – Patched docker plugin (master and slave in the same container level): case #4 • https://github.com/henrysher/docker-plugin
  • 21. Demo for case 4 • Add new options into docker daemon marked in red: OPTIONS='-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --selinux- enabled' • Run the docker image “iwsaas/jenkins” as a Jenkins container # docker run -d -p 8080:8080 --name jenkins iwsaas/jenkins b675af71332782a9bbfe6d92469d9a280ae751593b460520ac6bd6ab047b8b70 • Configure Docker Plugins – Docker URL(docker0 virtual bridge address) • http://172.17.42.1:4243 – DockerTemplate (iwsaas/jenkins-slave) • Default username/password: jenkins/jenkins • Create a “test” job and execute some basic commands
  • 22.
  • 23.
  • 24. Case 4 - Console Output • Execute the command inside the container – Container ID: e380cfb050a1
  • 25. Jenkins Problems • Multiple Masters – Sync & Standby • Resource isolation & allocation (for slaves) – Multiple tasks running on one slave – CPU, Memory, Disk, etc. per task?
  • 26. Mesos + Marathon +Docker+ Jenkins • Mesos: kernel of distribute systems • Marathon: init/upstart for mesos
  • 27. Mesos + Marathon + Docker + Jenkins • Mesos: kernel of distribute systems • Marathon: init/upstart for mesos