SlideShare a Scribd company logo
Streamline Your Development 
Process with Docker 
Trond Marius Øvstetun 
trondmo@mesan.no 
GDG DevFest 2014 
© Mesan AS
Streamline with Docker 
© Mesan AS
About me 
• Trond Marius Øvstetun 
• CTO in Mesan 
• Developer, Architect, Tech-lead 
+++ 
• 10+ years of experience building 
applications 
© Mesan AS
How we build systems 
Modern challenges 
© Mesan AS
© Mesan AS
Challenges 
© Mesan AS 
• One big lump of software 
• Scales as one 
• Deploys as one 
• Updates as one 
• Develops as one
Breaking the Monolith 
© Mesan AS
© Mesan AS
© Mesan AS
A new set of challenges 
• Interdependencies 
• Implicit ones - keys shared across systems 
© Mesan AS
From a developers perspective 
© Mesan AS 
• Dependencies change 
• add more systems 
• systems change 
• different kinds of deps 
• search/messaging/storage/cachin 
g… 
• How do we deal with this? 
• try to run deps locally? 
• export/import data 
• the “shared development 
environment” 
• moar, moar environments
© Mesan AS
What is Docker? 
“Docker is an open platform for developers and sysadmins to 
build, ship, and run distributed applications.” 
• Deploying and shipping software consistently is too hard 
• Dependencies, libraries, configuration 
• Consistency across environments (local, test, QA, production) 
• A new abstraction – introduce the Container 
© Mesan AS
What is a container? 
© Mesan AS
What is a container? 
© Mesan AS 
• Lightweight linux 
environment 
• Hermetically sealed, 
deployable 
• Isolation 
• Portability 
• Raising the level of 
abstraction 
• VMs = Idealized hardware 
• Container = Idealized OS 
(+hardware)
Demos 
© Mesan AS
Basic examples 
• Docker Hello World! 
$ docker run hello-world 
• Interactive running in a container (or two!) 
$ docker run -it ubuntu bash 
• Running basic nginx in a container 
$ docker run -d nginx 
© Mesan AS
Building a container manually 
• Run commands in interactive mode 
• Commit changes 
• Takes time – 
boring, manual & error prone 
• What about reproducability? 
© Mesan AS 
$ docker run -i -t ubuntu bash 
root@171950c2cf9d:/# touch my.conf 
root@171950c2cf9d:/# vi my.conf 
root@171950c2cf9d:/# apt-get install my-package 
Reading package lists... Done 
Building dependency tree 
Reading state information... Done 
$ docker commit 171950c2cf9d ovstetun/my
Dockerfile 
© Mesan AS 
my 
Dockerfile + env 
$ docker build . 
$ docker build -t mynginx .
Exposing ports as Services 
• Expose ports from a container 
in the Dockerfile 
EXPOSE 3000 
• Open ports on the server 
$ docker run -p 4000:3000 mynginx 
© Mesan AS
Linking containers 
• Declare dependency and link 
docker run --link 1bc1:mysql nginx 
• Available as environment variables 
MYSQL_PORT_3306_TCP_ADDR=xxx 
MYSQL_PORT_3306_TCP_PORT=xxx 
© Mesan AS
Sharing containers 
© Mesan AS 
• Docker Hub 
• Official reusable images 
• Your own! 
$ docker push ovstetun/mynginx
Developing using Docker 
Exemplifying a workflow and setup 
© Mesan AS
Example system 
© Mesan AS
Setting up your system for Docker 
• Depend on Services, not Resources or computers 
• Run the same, identical container everywhere 
• Docker links to Services 
• Automate changes 
• Database refactorings 
• Search index updates 
• … 
© Mesan AS
Setting up your system for Docker 
• One process per container 
• Reuse (your own) base images 
• Repeatable builds – use Dockerfiles 
• Automate everything 
© Mesan AS
Workflow 
© Mesan AS
Working with dependencies 
• Do some work in Ingredients module 
• Run dependencies in Docker 
• search + database 
© Mesan AS 
$ docker run -p 3306:3306 --name some-mysql  
-e MYSQL_ROOT_PASSWORD=pwd -d o/ftdb:2 
$ docker run -p 9300:9300 --name elastic  
-d o/ftelastic:2
© Mesan AS 
• Automatic linking 
and management 
• Simple configuration
Demo 
© Mesan AS
Deploying to the Cloud 
© Mesan AS
© Mesan AS
Kubernetes 
• Master & Minions 
• Pods 
• collection of containers, run as a unit 
• ReplicationControllers 
• controllable 
• Services 
• proxy layer and load balancing – “dynamic Docker links” 
© Mesan AS
Kubernetes 
© Mesan AS
The future? 
• The future lies in containers 
• continue to see more examples of use cases 
• Docker is the leader today 
• The momentum is gigantic 
• google, Microsoft, RedHat, Rackspace +++ 
© Mesan AS
Q & A 
© Mesan AS
Thank you 
trondmo@mesan.no 
github.com/ovstetun/jz14 
@ovstetun 
© Mesan AS

More Related Content

PPTX
Containerization - The DevOps Revolution
PPT
Docker and CloudStack
PPT
308 the dark side of containers new
PPTX
Amazon Cloud Overview
PDF
Word press and containers
PDF
A brief introduction to CloudFormation
PDF
Improving Development and Deployment with Docker
PPTX
Why we need container in Software
Containerization - The DevOps Revolution
Docker and CloudStack
308 the dark side of containers new
Amazon Cloud Overview
Word press and containers
A brief introduction to CloudFormation
Improving Development and Deployment with Docker
Why we need container in Software

What's hot (19)

PPTX
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
PDF
Wanting distributed volumes - Experiences with ceph-docker
PPTX
PPTX
Alex Fishman - Virtualizing the Cloud
PDF
Docker Introduction
PDF
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
PDF
Scaling and Embracing Failure: Clustering Docker with Mesos
PDF
Micro services infrastructure with AWS and Ansible
PDF
Stateful Containers: Flocker on CoreOS
PDF
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
KEY
クックパッドのLVSについて
PPTX
Scaling Development Environments with Docker
PDF
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
PDF
Automated Deployment with Capistrano
PPTX
Introducing Docker Swarm - the orchestration tool by Docker
PPT
Sebastien goasguen cloud stack and docker
PDF
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
PDF
Docker on mesos
PDF
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
Wanting distributed volumes - Experiences with ceph-docker
Alex Fishman - Virtualizing the Cloud
Docker Introduction
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
Scaling and Embracing Failure: Clustering Docker with Mesos
Micro services infrastructure with AWS and Ansible
Stateful Containers: Flocker on CoreOS
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
クックパッドのLVSについて
Scaling Development Environments with Docker
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Automated Deployment with Capistrano
Introducing Docker Swarm - the orchestration tool by Docker
Sebastien goasguen cloud stack and docker
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
Docker on mesos
DEPLOYING A DOCKERIZED DISTRIBUTED APPLICATION IN MESOS
Ad

Similar to Gdg using docker to streamline development (20)

PPTX
Docker and Microservice
PPTX
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
PPTX
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
PPTX
ma-formation-en-Docker-jlklk,nknkjn.pptx
PPTX
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
PPTX
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
PPTX
Mesos swam-kubernetes-vds-02062017
PPTX
Containers and Docker
PPTX
Docker & Daily DevOps
PPTX
Docker and-daily-devops
PDF
Cassandra and Docker Lessons Learned
PPTX
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Introduction to Docker
PDF
Docker dev ops for cd meetup 12-14
PPTX
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
PDF
ContainerDayVietnam2016: Dockerize a small business
PPTX
CloudExpo 2018: Docker - Power Your Move to the Cloud
PPTX
Docker - A curtain raiser to the Container world
PDF
Dockers and kubernetes
PDF
An Introduction to Configuring Domino for Docker
Docker and Microservice
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
ma-formation-en-Docker-jlklk,nknkjn.pptx
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Mesos swam-kubernetes-vds-02062017
Containers and Docker
Docker & Daily DevOps
Docker and-daily-devops
Cassandra and Docker Lessons Learned
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Introduction to Docker
Docker dev ops for cd meetup 12-14
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
ContainerDayVietnam2016: Dockerize a small business
CloudExpo 2018: Docker - Power Your Move to the Cloud
Docker - A curtain raiser to the Container world
Dockers and kubernetes
An Introduction to Configuring Domino for Docker
Ad

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation theory and applications.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectroscopy.pptx food analysis technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation theory and applications.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf

Gdg using docker to streamline development

  • 1. Streamline Your Development Process with Docker Trond Marius Øvstetun trondmo@mesan.no GDG DevFest 2014 © Mesan AS
  • 3. About me • Trond Marius Øvstetun • CTO in Mesan • Developer, Architect, Tech-lead +++ • 10+ years of experience building applications © Mesan AS
  • 4. How we build systems Modern challenges © Mesan AS
  • 6. Challenges © Mesan AS • One big lump of software • Scales as one • Deploys as one • Updates as one • Develops as one
  • 7. Breaking the Monolith © Mesan AS
  • 10. A new set of challenges • Interdependencies • Implicit ones - keys shared across systems © Mesan AS
  • 11. From a developers perspective © Mesan AS • Dependencies change • add more systems • systems change • different kinds of deps • search/messaging/storage/cachin g… • How do we deal with this? • try to run deps locally? • export/import data • the “shared development environment” • moar, moar environments
  • 13. What is Docker? “Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.” • Deploying and shipping software consistently is too hard • Dependencies, libraries, configuration • Consistency across environments (local, test, QA, production) • A new abstraction – introduce the Container © Mesan AS
  • 14. What is a container? © Mesan AS
  • 15. What is a container? © Mesan AS • Lightweight linux environment • Hermetically sealed, deployable • Isolation • Portability • Raising the level of abstraction • VMs = Idealized hardware • Container = Idealized OS (+hardware)
  • 17. Basic examples • Docker Hello World! $ docker run hello-world • Interactive running in a container (or two!) $ docker run -it ubuntu bash • Running basic nginx in a container $ docker run -d nginx © Mesan AS
  • 18. Building a container manually • Run commands in interactive mode • Commit changes • Takes time – boring, manual & error prone • What about reproducability? © Mesan AS $ docker run -i -t ubuntu bash root@171950c2cf9d:/# touch my.conf root@171950c2cf9d:/# vi my.conf root@171950c2cf9d:/# apt-get install my-package Reading package lists... Done Building dependency tree Reading state information... Done $ docker commit 171950c2cf9d ovstetun/my
  • 19. Dockerfile © Mesan AS my Dockerfile + env $ docker build . $ docker build -t mynginx .
  • 20. Exposing ports as Services • Expose ports from a container in the Dockerfile EXPOSE 3000 • Open ports on the server $ docker run -p 4000:3000 mynginx © Mesan AS
  • 21. Linking containers • Declare dependency and link docker run --link 1bc1:mysql nginx • Available as environment variables MYSQL_PORT_3306_TCP_ADDR=xxx MYSQL_PORT_3306_TCP_PORT=xxx © Mesan AS
  • 22. Sharing containers © Mesan AS • Docker Hub • Official reusable images • Your own! $ docker push ovstetun/mynginx
  • 23. Developing using Docker Exemplifying a workflow and setup © Mesan AS
  • 24. Example system © Mesan AS
  • 25. Setting up your system for Docker • Depend on Services, not Resources or computers • Run the same, identical container everywhere • Docker links to Services • Automate changes • Database refactorings • Search index updates • … © Mesan AS
  • 26. Setting up your system for Docker • One process per container • Reuse (your own) base images • Repeatable builds – use Dockerfiles • Automate everything © Mesan AS
  • 28. Working with dependencies • Do some work in Ingredients module • Run dependencies in Docker • search + database © Mesan AS $ docker run -p 3306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=pwd -d o/ftdb:2 $ docker run -p 9300:9300 --name elastic -d o/ftelastic:2
  • 29. © Mesan AS • Automatic linking and management • Simple configuration
  • 31. Deploying to the Cloud © Mesan AS
  • 33. Kubernetes • Master & Minions • Pods • collection of containers, run as a unit • ReplicationControllers • controllable • Services • proxy layer and load balancing – “dynamic Docker links” © Mesan AS
  • 35. The future? • The future lies in containers • continue to see more examples of use cases • Docker is the leader today • The momentum is gigantic • google, Microsoft, RedHat, Rackspace +++ © Mesan AS
  • 36. Q & A © Mesan AS
  • 37. Thank you trondmo@mesan.no github.com/ovstetun/jz14 @ovstetun © Mesan AS

Editor's Notes

  • #3: Q&A section at the end - BUT SHOUT OUT DURING THE PRESENTATION The way we build applications Docker Development workflow Deployment (in the Cloud)
  • #5: a BRIEF history How we USED to build systems -> how we build them today…
  • #6: build in hver komponent..
  • #8: Transforming into a Microservice architecture
  • #9: Adding more components + extra stuff needed in the form of messaging, search engines, synchronization-add-ons etc
  • #10: Example
  • #20: What is it, how to define one Building a container committing tagging
  • #24: Setting up your system for containerization Dependencies between containers a deeper dive into an example using a docker instance as (shared) data source and several docker-instances using this data source
  • #29: commandline + demo running in IDEA+postman of course - there is a better opion -> FIG
  • #31: Demo Fix bug in update in scala backend missing indexing Build, tag Run nginx, implement Edit
  • #32: BEEN MISSING: Orchestration & monitoring Changed: the momentum is HUGE and Everyone is doing “something” now Example: using Kubernetes & google compute engine
  • #33: Figure: Kubernetes - Where do the applications go
  • #35: vizualiser
  • #37: 5 mins
  • #38: Reach out to me on the Mesan stand or wherever!