Top Banner
Why to Docker? Karthik Gaekwad @iteration1
29
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Why to docker

Why to Docker?Karthik Gaekwad

@iteration1

Page 2: Why to docker

Karthik GaekwadSenior Engineer

Previous

11 years of building software for large and small enterprises

Page 3: Why to docker

Karthik Gaekwad•Lead Organizer Devopsdays Austin•Lead Organizer CloudAustin•Agile Conference 2014/15:

•DevOps track reviewer

Page 4: Why to docker

Objectives•What is Docker•Why is it so popular•How are enterprises using it today•Questions!

Page 5: Why to docker

Quick Note:

Feel free to ask any questions you may have in the question box. If I can’t answer it during

the presentation, I’ll write a blog with answers on stackengine.com

Page 6: Why to docker

What is Docker?

Open source platform for developers and sysadmins to build, ship and run distributed applications anywhere.

Page 7: Why to docker

Docker Ecosystem•Docker Engine

•Runtime and packaging tool•Installed on hosts that run Docker

•Docker Hub•Cloud Service for storing and sharing applications

•Saving images (public/private)

Page 8: Why to docker

Docker Features•Portability•Standardized Environments•Rapid scale-up/scale-down•Ability to build a continuous delivery (CD) pipeline

•Dependency management

Page 9: Why to docker

Portability

Page 10: Why to docker

Portability• Idea of writing once and running anywhere.

•As long as your application is Dockerized, you can run it anywhere that has the Docker Engine installed.

•Easy to change from 1 host to another.•Flexibility to change underlying infrastructure/operating systems etc.

•Change from 1 cloud provider to another.

Page 11: Why to docker

Standardized Environments

Page 12: Why to docker

Standardized Environments• Coding environments can be made consistent from

development ->staging->QA->production.• Per environment configurations are fed in the same

way to each container which reduces configuration issues.

• Time spent debugging environmental issues is reduced drastically.

• Developers understand the production environment better, which leads to better code quality.

Page 13: Why to docker

No more this:

Page 14: Why to docker

Scaling

Page 15: Why to docker

Scaling•Containers take seconds to deploy.•Scale up and down your infrastructure is a lot faster than traditional configuration management tools.

Page 16: Why to docker

Building pipelines

Page 17: Why to docker

Continuous Delivery/Deployment• Docker API’s and Docker Hub make it easy to build a

deployment pipeline.• After successful builds, a CI system can build and push a

Docker image to the Hub/private Docker repo.• Deploy new containers to desired environment on a periodic

basis/trigger webhooks to deploy.• Detailed example later..

Page 18: Why to docker

Dependency Hell

Page 19: Why to docker

Minimize Dependency Hell

•Dependency hell happens when:• 2 running Java or Ruby applications that depend on

different versions of the same library…..•How Docker can help:

• Isolate each application (along with it’s dependencies) so that they can be loaded in their own container.

• 1 container for 1 application or service (micro service architecture)

Page 20: Why to docker

Real World Examples

Page 21: Why to docker

Standardized Environments• Starting point for most organizations to use Docker.• Take existing (or new) applications, containerize them, run

them the same way on dev/stage/production.• Examples on Docker.com: Orbitz, Uber• @StackEngine:

• All our infrastructure run in containers.• Every code push builds a new container for the application.• All environments uses the same command to run the application:• sudo docker run -d -p 7777:7777 -e SE_DB=‘db_val’

stackengine/admin

Page 22: Why to docker

Pipelines• Most common usecase of how people use Docker today.• Examples on Docker.com: Business Insider, Spotify, Yelp• @StackEngine:

• Code is commit to github; triggers a build with CircleCI.• Successful build results in a built container that is deployed to a

private registry.• Successful push to registry triggers a webhook to the StackEngine

product.• StackEngine redeploys new container to production.• 4 minute turnaround from commit->running in production.

Page 23: Why to docker

Multi tenancy applications

•Single Tenant application-> Multi tenant application by launching multiple instances of the same application in different containers.

•http://flux7.com/docker/

Page 24: Why to docker

Other use cases•Running a PaaS

•Running entire datacenters using Docker. •EngineYard/Yandex/Baidu are great examples of this.

•Hosting Legacy Applications•Containerizing hard to run applications is becoming a frequent usecase.

Page 25: Why to docker

Docker in Production?•Great blog post summarizing current challenges: http://sirupsen.com/production-docker/

•Already made huge strides in networking/log management.

•Recommendation:•Start small, learn, adapt, expand.

Page 26: Why to docker

Players in the space

Page 27: Why to docker

How to Docker?

Page 28: Why to docker

Resources for learning Docker:

•Docker 101 (@behemphi): http://stackengine.com/docker-101-01-docker-development-environments/

•Docker Tutorials by John Willis: https://blog.docker.com/author/john-willis/

•The Docker Book- James Turnbull

Page 29: Why to docker

Thank You!

Reach me on @iteration1 for any Docker related questions