SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
The pain and gains running
Docker in live @Pipedrive
Renno Reinurm
17.01.17
● Pipedrive helps small businesses control the complex
selling process
● Founded in 2010
● 30,000 paying customers worldwide
● 200+ employees
● Offices in Tallinn and Tartu
New York, NY
Pipedrive helps small businesses control the complex selling process
Why to use Docker?
● Growth pains with Chef
● New language + new tools = entry barrier
● You write recipes seldom enough and forget how it’s done
● But it runs fine in test!
Early docker platform started with
evaluating running docker inside
Vagrant box.
Instead we started to use custom built
docker-machine.
Lately moved to Docker4Mac
First use case for containers
Provision on demand test
environments per branch.
Was implemented only for test
coverage-suite execution
environment.
Lot of custom hacks to make it
work.
Docker infrastructure v1
The first Docker builds using Codeship Docker CI beta
The first usage of Tutum (Docker Cloud) as orchestration service
Yeah we were using Docker, but
CI processes with Codeship was slow, Docker build itself took ~15minutes
Deployment in Docker Tutum cluster took another ~10minutes
Sometimes it was so slow we wondered if it still works
Stability issues - we experienced “data loss” and “service downtime”
The Birth of Docker Infrastructure v2.0
Requirements:
Improve the speed of CI processes
Improve the reliability of Docker Infrastructure
Docker Infrastructure v2.0
Jenkins for automating processes
Docker image builds
Container deployment
Docker Swarm
Container Scheduler
Shipyard
Troubleshooting
Pain 1
You shall not build/test/deploy
Docker container
over 5 minutes
Based on: xkcd.com
Improved Docker builds
First iteration:
FROM node
ENV SERVICE_NAME=statistics
ENV SERVICE_DESC="Statistics"
ENV SERVICE_TAGS=statistics
ENV SERVICE_CHECK_HTTP=/health
ENV SERVICE_CHECK_INTERVAL=10s
ENV SERVICE_CHECK_TIMEOUT=5s
EXPOSE 8000
WORKDIR /src
COPY . /src/
RUN npm install
CMD ["node", "."]
Improved:
FROM node:6-alpine
ENV SERVICE_NAME=statistics 
SERVICE_DESC="Statistics" 
SERVICE_TAGS=statistics 
SERVICE_CHECK_HTTP=/health-statistics 
SERVICE_CHECK_INTERVAL=10s 
SERVICE_CHECK_TIMEOUT=5s
EXPOSE 8000
WORKDIR /src
USER node
CMD ["node", "."]
COPY libraries/ /src/
COPY src/ /src/
https://youtu.be/X_q2l8hotAc?t=365
Deployment process optimizations
NB! https://docs.docker.com/engine/userguide/storagedriver/selectadriver/
Replacement of Devicemapper to AUFS reduced deployment process time 10x.
There are still improvements possible:
● Handle Linux signals
● Parallel rolling updates
https://teespring.com/sigkill
Pain 2
Consumers shall connect
only to healthy services
Beware the service discovery corruption
● Always enable health checks
● Use unique health checks or validate output
SERVICE_CHECK_HTTP=/health
vs
SERVICE_CHECK_HTTP=/statistics-health
Pain 3 - Every day maintenance of Jenkins jobs
Pain 4
Container shall handle 10 000
connections and constant
high load.
https://youtu.be/PivpCKEiQOQ
We deployed Killer-Container to the cluster and
rescheduled it every time then it managed to crash the
Docker host
Issues
● Linux kernel 3.13
● Fluentd logging agent
● Graylog logging driver
● Kernel sysctl parameters
● Swap usage
● PEBKAC
○ "net.ipv4.ip_forward" => 0
● WARNING: No memory limit support
● WARNING: No swap limit support
● WARNING: No kernel memory limit support
● WARNING: No oom kill disable support
● WARNING: No cpu cfs quota support
● WARNING: No cpu cfs period support
Service risk mitigation
● Number of nodes in cluster
● Spreading policies
● Multiple instances
● Memory limitations
● Healing policies
○ Autorestart
○ Reschedule
Gains
Evolution of applications
generic enough to run in multiple regions, environments
Delivery time from idea to live
From 2 weeks to 1 day
Servers vs Services
those be managed asynchronously
Statistics
~ 70 inhouse built Dockerized services
~ 90 Docker images
~ 500 containers running
3200 container deploys since October
Remember - Every Day
1 new container borns to stay @Pipedrive
30 container deployments
Recommendations for going
Live with Docker
● You still need to take care of OS
● Read Github issues
● Read from the source
● Keep it up to date
● (Performance) Test it
Thank you!
Give me your feedback
@rreinurm

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-ComposeTales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
 
What’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerWhat’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, Docker
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
 
DockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with Docker
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the Union
 
2015 05-06-elias weingaertner-docker-intro
2015 05-06-elias weingaertner-docker-intro2015 05-06-elias weingaertner-docker-intro
2015 05-06-elias weingaertner-docker-intro
 
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
DockerCon EU 2015: Stop Being Lazy and Test Your Software!DockerCon EU 2015: Stop Being Lazy and Test Your Software!
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
 
DockerCon EU 2015: Placing a container on a train at 200mph
DockerCon EU 2015: Placing a container on a train at 200mphDockerCon EU 2015: Placing a container on a train at 200mph
DockerCon EU 2015: Placing a container on a train at 200mph
 
Docker for Developers - Part 1 by David Gageot
Docker for Developers - Part 1 by David GageotDocker for Developers - Part 1 by David Gageot
Docker for Developers - Part 1 by David Gageot
 
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
 
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
 
Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker Meetup 08 03-2016
Docker Meetup 08 03-2016
 
Android Meets Docker
Android Meets DockerAndroid Meets Docker
Android Meets Docker
 
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
Developer South Coast 2018: Docker on Windows - The Beginner's GuideDeveloper South Coast 2018: Docker on Windows - The Beginner's Guide
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
 
Modernizing .NET Apps
Modernizing .NET AppsModernizing .NET Apps
Modernizing .NET Apps
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 

Similar a The pain and gains running Docker in live @Pipedrive

Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTable
Docker, Inc.
 

Similar a The pain and gains running Docker in live @Pipedrive (20)

Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Run automated tests in Docker
Run automated tests in DockerRun automated tests in Docker
Run automated tests in Docker
 
Dockerizing Aurea - Docker Con EU 2017
Dockerizing Aurea - Docker Con EU 2017Dockerizing Aurea - Docker Con EU 2017
Dockerizing Aurea - Docker Con EU 2017
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Container orchestration and microservices world
Container orchestration and microservices worldContainer orchestration and microservices world
Container orchestration and microservices world
 
Kubernetes in Google Cloud
Kubernetes in Google CloudKubernetes in Google Cloud
Kubernetes in Google Cloud
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
Atmosphere 2018: Yury Tsarev - TEST DRIVEN INFRASTRUCTURE FOR HIGHLY PERFORMI...
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
Utilzing docker containers for testing optimization and acceleration
Utilzing docker containers for testing optimization and accelerationUtilzing docker containers for testing optimization and acceleration
Utilzing docker containers for testing optimization and acceleration
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTable
 
Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTable
 
Dockerize magento 2 24.02.2016
Dockerize magento 2   24.02.2016Dockerize magento 2   24.02.2016
Dockerize magento 2 24.02.2016
 
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- ...
 
Café com Arquitetura - Hello Docker Captain
Café com Arquitetura - Hello Docker CaptainCafé com Arquitetura - Hello Docker Captain
Café com Arquitetura - Hello Docker Captain
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

The pain and gains running Docker in live @Pipedrive

  • 1. The pain and gains running Docker in live @Pipedrive Renno Reinurm 17.01.17
  • 2. ● Pipedrive helps small businesses control the complex selling process ● Founded in 2010 ● 30,000 paying customers worldwide ● 200+ employees ● Offices in Tallinn and Tartu New York, NY
  • 3. Pipedrive helps small businesses control the complex selling process
  • 4. Why to use Docker? ● Growth pains with Chef ● New language + new tools = entry barrier ● You write recipes seldom enough and forget how it’s done ● But it runs fine in test!
  • 5. Early docker platform started with evaluating running docker inside Vagrant box. Instead we started to use custom built docker-machine. Lately moved to Docker4Mac
  • 6. First use case for containers Provision on demand test environments per branch. Was implemented only for test coverage-suite execution environment. Lot of custom hacks to make it work.
  • 7. Docker infrastructure v1 The first Docker builds using Codeship Docker CI beta The first usage of Tutum (Docker Cloud) as orchestration service
  • 8. Yeah we were using Docker, but CI processes with Codeship was slow, Docker build itself took ~15minutes Deployment in Docker Tutum cluster took another ~10minutes Sometimes it was so slow we wondered if it still works Stability issues - we experienced “data loss” and “service downtime”
  • 9. The Birth of Docker Infrastructure v2.0 Requirements: Improve the speed of CI processes Improve the reliability of Docker Infrastructure
  • 10. Docker Infrastructure v2.0 Jenkins for automating processes Docker image builds Container deployment Docker Swarm Container Scheduler Shipyard Troubleshooting
  • 11. Pain 1 You shall not build/test/deploy Docker container over 5 minutes Based on: xkcd.com
  • 12. Improved Docker builds First iteration: FROM node ENV SERVICE_NAME=statistics ENV SERVICE_DESC="Statistics" ENV SERVICE_TAGS=statistics ENV SERVICE_CHECK_HTTP=/health ENV SERVICE_CHECK_INTERVAL=10s ENV SERVICE_CHECK_TIMEOUT=5s EXPOSE 8000 WORKDIR /src COPY . /src/ RUN npm install CMD ["node", "."] Improved: FROM node:6-alpine ENV SERVICE_NAME=statistics SERVICE_DESC="Statistics" SERVICE_TAGS=statistics SERVICE_CHECK_HTTP=/health-statistics SERVICE_CHECK_INTERVAL=10s SERVICE_CHECK_TIMEOUT=5s EXPOSE 8000 WORKDIR /src USER node CMD ["node", "."] COPY libraries/ /src/ COPY src/ /src/
  • 14. Deployment process optimizations NB! https://docs.docker.com/engine/userguide/storagedriver/selectadriver/ Replacement of Devicemapper to AUFS reduced deployment process time 10x. There are still improvements possible: ● Handle Linux signals ● Parallel rolling updates https://teespring.com/sigkill
  • 15. Pain 2 Consumers shall connect only to healthy services
  • 16. Beware the service discovery corruption ● Always enable health checks ● Use unique health checks or validate output SERVICE_CHECK_HTTP=/health vs SERVICE_CHECK_HTTP=/statistics-health
  • 17. Pain 3 - Every day maintenance of Jenkins jobs
  • 18. Pain 4 Container shall handle 10 000 connections and constant high load.
  • 19. https://youtu.be/PivpCKEiQOQ We deployed Killer-Container to the cluster and rescheduled it every time then it managed to crash the Docker host
  • 20.
  • 21. Issues ● Linux kernel 3.13 ● Fluentd logging agent ● Graylog logging driver ● Kernel sysctl parameters ● Swap usage ● PEBKAC ○ "net.ipv4.ip_forward" => 0 ● WARNING: No memory limit support ● WARNING: No swap limit support ● WARNING: No kernel memory limit support ● WARNING: No oom kill disable support ● WARNING: No cpu cfs quota support ● WARNING: No cpu cfs period support
  • 22. Service risk mitigation ● Number of nodes in cluster ● Spreading policies ● Multiple instances ● Memory limitations ● Healing policies ○ Autorestart ○ Reschedule
  • 23. Gains Evolution of applications generic enough to run in multiple regions, environments Delivery time from idea to live From 2 weeks to 1 day Servers vs Services those be managed asynchronously
  • 24. Statistics ~ 70 inhouse built Dockerized services ~ 90 Docker images ~ 500 containers running 3200 container deploys since October
  • 25.
  • 26. Remember - Every Day 1 new container borns to stay @Pipedrive 30 container deployments
  • 27. Recommendations for going Live with Docker ● You still need to take care of OS ● Read Github issues ● Read from the source ● Keep it up to date ● (Performance) Test it
  • 28. Thank you! Give me your feedback @rreinurm