SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Continuous integration
with Docker and Ansible
Dmitriy Slupytskyi
About project
• 70+ repositories
• 10+ microservices
• 4+ technologies (golang, php, ruby, nodejs)
• 65 build and deploy scripts
Docker
Virtual Machines Containers
Why Docker?
• Easily to manager containers
• Build specify environment for project
• Isolated workspace
• Package it and be portable
• Replicable - lower barrier to entry for new
environments, teams
• No “dependence hell”
Deployment process
Start Clone Build Push DeployTest
Jenkins
CloudBees Docker Build and Publish plugin
Build
• Use Dockerfile
• Keep layers to minimum
• Use tags for version control
• Use .dockerignore

(the same syntax as .gitignore)
• One container per service
• Manage output
• GNU Make is optional
Just for presentation, 

make better one

for your services
😉
Build
Test
Private Docker registry
• Version 0.9.1 (version 2 required docker version
1.6.0 and higher)
• Nginx + LDAP authentication

(https://hub.docker.com/r/h3nrik/nginx-ldap/)
• Dockerized
Ansible
• Inventory
• Playbooks
• Tasks
• Modules
• docker-py (<=1.1.0)
• docker module

(http://docs.ansible.com/ansible/docker_module.html)
• docker-compose
docker-compose

https://docs.docker.com/compose/
Deploy
Jenkins + Ansible plugin
Logspout

(https://hub.docker.com/r/gliderlabs/logspout/)
Papertrail
Profit
• easily to update and maintenance images
• Dockerfile
• portability
• isolated
• logspout
• docker registry timeout
• ansible freezes
• time to build
Developers
Pros
• Logs
• Build specify environment for target service
• Service management (start, stop, restart)
• Manage environment variables (one container for
few environments)
Cons
• SSH
• Time to build (can be depends on various factor,
for example docker cache)
• Jenkins plugin exit with 0, even if fails, that bring up
misunderstanding
• Unmounted volumes
Continuous integration with Docker and Ansible

Mais conteúdo relacionado

Mais procurados

Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeDanielle Madeley
 
Intro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsIntro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsThomas Chacko
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker, Inc.
 
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...Atlassian
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionSparkbit
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSSebastien Goasguen
 
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Lakmal Warusawithana
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 WorkshopVishal Biyani
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker ComposeJustin Crown
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsBen Hall
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker composeLinkMe Srl
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 
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 CochranedotCloud
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerLalatendu Mohanty
 
Docker 101 2015-05-28
Docker 101 2015-05-28Docker 101 2015-05-28
Docker 101 2015-05-28Adrian Otto
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sJeremy Haas
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterdotCloud
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerizationBalint Pato
 

Mais procurados (20)

Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and code
 
Intro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsIntro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and Windows
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOS
 
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
 
Rapid Development With Docker Compose
Rapid Development With Docker ComposeRapid Development With Docker Compose
Rapid Development With Docker Compose
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Demystifying kubernetes
Demystifying kubernetesDemystifying kubernetes
Demystifying kubernetes
 
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
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Fabric8 CI/CD
Fabric8 CI/CDFabric8 CI/CD
Fabric8 CI/CD
 
Docker 101 2015-05-28
Docker 101 2015-05-28Docker 101 2015-05-28
Docker 101 2015-05-28
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM's
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerization
 

Destaque

Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerDennis Rowe
 
Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014Matthew Skelton
 
Building (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerBuilding (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerCristovao G. Verstraeten
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в MagentoСергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в MagentoAtwix
 
DevOps в реальном времени
DevOps в реальном времениDevOps в реальном времени
DevOps в реальном времениAndriy Samilyak
 
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM Atwix
 
Itea dev ops_course_topic2
Itea dev ops_course_topic2Itea dev ops_course_topic2
Itea dev ops_course_topic2Vadym Tymoshyk
 
Functional web with elixir and elm in phoenix
Functional web with elixir and elm in phoenixFunctional web with elixir and elm in phoenix
Functional web with elixir and elm in phoenixIzzet Mustafaiev
 
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...Atwix
 
Roman Valchuk "Introducing to DevOps technologies"
Roman Valchuk "Introducing to DevOps technologies"Roman Valchuk "Introducing to DevOps technologies"
Roman Valchuk "Introducing to DevOps technologies"Vadym Muliavka
 
#nostaging - Software Circus - Amsterdam, 2-9-2016
#nostaging - Software Circus - Amsterdam, 2-9-2016#nostaging - Software Circus - Amsterdam, 2-9-2016
#nostaging - Software Circus - Amsterdam, 2-9-2016Pavel Chunyayev
 
Monitoring base, golang meetup, kyiv
Monitoring base, golang meetup, kyivMonitoring base, golang meetup, kyiv
Monitoring base, golang meetup, kyivVsevolod Polyakov
 
TIAD 2016 : Test driven infrastructure with Ansible - Docker - Jenkins
TIAD 2016 : Test driven infrastructure with Ansible - Docker - JenkinsTIAD 2016 : Test driven infrastructure with Ansible - Docker - Jenkins
TIAD 2016 : Test driven infrastructure with Ansible - Docker - JenkinsThe Incredible Automation Day
 
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法Hideyuki Takeuchi
 
Implementing DevOps In Practice
Implementing DevOps In PracticeImplementing DevOps In Practice
Implementing DevOps In PracticeZoltán Németh
 

Destaque (20)

Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
 
Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014
 
Building (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerBuilding (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with Packer
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в MagentoСергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
 
DevOps в реальном времени
DevOps в реальном времениDevOps в реальном времени
DevOps в реальном времени
 
DevOps in realtime
DevOps in realtimeDevOps in realtime
DevOps in realtime
 
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
 
Itea dev ops_course_topic2
Itea dev ops_course_topic2Itea dev ops_course_topic2
Itea dev ops_course_topic2
 
Functional web with elixir and elm in phoenix
Functional web with elixir and elm in phoenixFunctional web with elixir and elm in phoenix
Functional web with elixir and elm in phoenix
 
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
 
Roman Valchuk "Introducing to DevOps technologies"
Roman Valchuk "Introducing to DevOps technologies"Roman Valchuk "Introducing to DevOps technologies"
Roman Valchuk "Introducing to DevOps technologies"
 
Final melnyk 2
Final melnyk 2Final melnyk 2
Final melnyk 2
 
#nostaging - Software Circus - Amsterdam, 2-9-2016
#nostaging - Software Circus - Amsterdam, 2-9-2016#nostaging - Software Circus - Amsterdam, 2-9-2016
#nostaging - Software Circus - Amsterdam, 2-9-2016
 
Metrics: where and how
Metrics: where and howMetrics: where and how
Metrics: where and how
 
Monitoring base, golang meetup, kyiv
Monitoring base, golang meetup, kyivMonitoring base, golang meetup, kyiv
Monitoring base, golang meetup, kyiv
 
TIAD 2016 : Test driven infrastructure with Ansible - Docker - Jenkins
TIAD 2016 : Test driven infrastructure with Ansible - Docker - JenkinsTIAD 2016 : Test driven infrastructure with Ansible - Docker - Jenkins
TIAD 2016 : Test driven infrastructure with Ansible - Docker - Jenkins
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
SPEEDA/NewsPicksを支える価値を生み出す技術の選定手法
 
Implementing DevOps In Practice
Implementing DevOps In PracticeImplementing DevOps In Practice
Implementing DevOps In Practice
 

Semelhante a Continuous integration with Docker and Ansible

DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaRoman Dembitsky
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CDHenry Huang
 
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up LoftTurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up LoftAmazon Web Services
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraDaniel Palstra
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
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 DistributionDocker, Inc.
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2Docker, Inc.
 
Dockercon 2015 Recap
Dockercon 2015 RecapDockercon 2015 Recap
Dockercon 2015 Recapehazlett
 
Intro to Docker October 2013
Intro to Docker October 2013Intro to Docker October 2013
Intro to Docker October 2013Docker, Inc.
 
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
 
Docker Containers Deep Dive
Docker Containers Deep DiveDocker Containers Deep Dive
Docker Containers Deep DiveWill Kinard
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSFrank Munz
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with ContainersAmazon Web Services
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013dotCloud
 

Semelhante a Continuous integration with Docker and Ansible (20)

DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 Barcelona
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker
DockerDocker
Docker
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
 
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up LoftTurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
 
Docker
DockerDocker
Docker
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
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
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2
 
Dockercon 2015 Recap
Dockercon 2015 RecapDockercon 2015 Recap
Dockercon 2015 Recap
 
Intro to Docker October 2013
Intro to Docker October 2013Intro to Docker October 2013
Intro to Docker October 2013
 
Docker slides
Docker slidesDocker slides
Docker slides
 
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 Containers Deep Dive
Docker Containers Deep DiveDocker Containers Deep Dive
Docker Containers Deep Dive
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCS
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
 
Intro Docker october 2013
Intro Docker october 2013Intro Docker october 2013
Intro Docker october 2013
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 

Continuous integration with Docker and Ansible