SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Simplilearn
 

Tendances (20)

Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
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
 
CI CD Basics
CI CD BasicsCI CD Basics
CI CD Basics
 
Dockerfile
Dockerfile Dockerfile
Dockerfile
 
Web technologies: HTTP
Web technologies: HTTPWeb technologies: HTTP
Web technologies: HTTP
 
Intel xeon-scalable-processors-overview
Intel xeon-scalable-processors-overviewIntel xeon-scalable-processors-overview
Intel xeon-scalable-processors-overview
 
GitLab과 Kubernetes를 통한 CI/CD 구축
GitLab과 Kubernetes를 통한 CI/CD 구축GitLab과 Kubernetes를 통한 CI/CD 구축
GitLab과 Kubernetes를 통한 CI/CD 구축
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
하이퍼레저 패브릭 실습자료
하이퍼레저 패브릭 실습자료하이퍼레저 패브릭 실습자료
하이퍼레저 패브릭 실습자료
 
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
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshell
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
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
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
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...
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de Henry Huang

Plus de 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
 

Dernier

Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 

Dernier (20)

Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 

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