![Page 1: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/1.jpg)
Docker + MongoDB Alvin Richards, Enterprise Products Lead [email protected] @jonnyeight
![Page 2: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/2.jpg)
Part One – What is Docker?
![Page 3: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/3.jpg)
Docker Mission – Make the Internet Programmable
3
Build Ship Run
Open Standards
Plumbing
Pla6orm
Solu8ons
Engine Machine Compose Swarm
Distribution
Image spec Container run-time spec
RunC
Notary
Docker Trusted Registry
Project "Orca"
![Page 4: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/4.jpg)
Open Container Ini-a-ve
RunC
notary 4
Open Standards & Plumbing
![Page 5: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/5.jpg)
Open Container Initiative (OCI)
Coalition of industry leaders join forces to eliminate fragmentation • Form a vendor-neutral, open source governance model under the Linux
Foundation • Establish common standards for container format and runtime • Docker donated its container format, runtime and associated specifications • Appoint maintainers for the libcontainer project
5
h3p://www.opencontainers.org/
![Page 6: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/6.jpg)
Networking
Plugins
Orchestra-on 6
Docker Platform
![Page 7: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/7.jpg)
Networking
8
Before
• Inflexible • Single host • Limited to one network
X
• Container SDN • Distributed networking • Portable across networks • Plug ins to broad ecosystem
ABer
![Page 8: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/8.jpg)
Plugins Pluggable Architecture to extend Docker functionality • Introducing Networking and Volume plugins • For Users: Portability and choice for developers and ops • For Partners: Easily integrate and access Docker users • Collaboration with Cluster HQ, Glider Labs, Weave
9
Networking
Volumes
Docker Engine Plug ins
> docker
Docker client
![Page 9: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/9.jpg)
Orchestration Across the App Lifecycle
Docker Machine
Docker Swarm
Docker Compose 10
![Page 10: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/10.jpg)
Docker Compose and Swarm • Consistent developer experience with flexible Swarm backends • Integrated with Docker Networking • Mesos backend beta available • Amazon ECS backend collaboration WIP
11
docker
Docker client
Coming Soon!
![Page 11: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/11.jpg)
Running Docker in Production
Three Key Use Cases
Produc-on Requirements
Commercial Availability 12
![Page 12: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/12.jpg)
Continuous Integration and Delivery
13
Developer
Version control
1. Development 2. Test 3. Stage / Produc-on
QA / QE
Sysadmin
Video from DockerCon
![Page 13: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/13.jpg)
Containers as a Service Developer Sysadmin
DevOps
Tomcat
Jenkins
MongoDB Deployment
Video from DockerCon
![Page 14: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/14.jpg)
SysAdmins DBAs
Data Processing Pipelines
Data Scientist
$ docker
Data Nodes
Video from DockerCon
![Page 15: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/15.jpg)
Docker Enterprise Solutions
16
Server or Cloud Hosted Registry
Docker Engine
Stable Secure Responsive
Docker Trusted Registry
Docker Hub
or
Commercial Subscruption
![Page 16: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/16.jpg)
Get it here!
![Page 17: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/17.jpg)
Part Two: Development through to Production • Build & Run an App in Development
– Python + MongoDB • Deploy to a Swarm cluster in Production
– Scale Web services • Deploy new MongoDB Cluster in Production
![Page 18: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/18.jpg)
Lets build an App!
19
web
mongodb
Development
python / flask
![Page 19: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/19.jpg)
Scale in Production
20
web2 web3 web4 webN
mongos cfg3 cfg2 cfg1
web web1
mongodb
Development
…
Production
HA Proxy
rs1a
rs1b
rs1c
rs2a
rs2b
rs2c
![Page 20: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/20.jpg)
Demo 1 : Build an App
21
![Page 21: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/21.jpg)
Roll the App to Production behind HA Proxy
22
web web1
Development Production
mongodb
HA Proxy
mongodb
![Page 22: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/22.jpg)
Scale the web tier
23
web2 web3 web4 webN web web1
mongodb
Development
…
Production
mongodb
HA Proxy
![Page 23: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/23.jpg)
Demo 2 : Scale the Web Tier
24
![Page 24: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/24.jpg)
Deploy a sharded cluster
25
web2 web3 web4 webN
mongos cfg3 cfg2 cfg1
web web1
mongodb
Development
…
Production
mongodb
HA Proxy
rs1a
rs1b
rs1c
rs2a
rs2b
rs2c
![Page 25: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/25.jpg)
Migrate to the new cluster
27
web2 web3 web4 webN
mongos cfg3 cfg2 cfg1
web web1
mongodb
Development
…
Production
mongodb
HA Proxy
rs1a
rs1b
rs1c
rs2a
rs2b
rs2c
![Page 26: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/26.jpg)
Demo 3 : Scale the Database
28
![Page 27: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/27.jpg)
Storage: Inside or outside the container?
Inside • Encapsulation of Concerns
29
Host
daemon
container
Host
daemon
container e.g. SSD
e.g. EBS
Outside • Separation of concerns • Storage Features (e.g. snapshots)
/data/db /mnt/xx:/data/db
![Page 28: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/28.jpg)
Summary
• Define Container, their contents and how they work together once • Deploy the same images in Dev, Pre-‐Prod and Produc-on across PlaZorms
One solu-on from Dev -‐> Produc-on
• Ops define the whitelisted images, security policies etc. • Dev use approved images to build upon • Eliminate the complexity (and cost) of deployment
Running Docker & MongoDB in Produc-on
30
![Page 29: Webinar: From Development to Production with Docker and MongoDB](https://reader031.vdocument.in/reader031/viewer/2022021918/588921361a28ab77528b54fb/html5/thumbnails/29.jpg)
Thanks and Q&A • Code
– https://github.com/alvinr/docker-demo/tree/master/dockercon15demo
• [email protected] • @jonnyeight
31