Вы находитесь на странице: 1из 28

Docker + MongoDB

Alvin Richards, Enterprise Products Lead


Wifi: heavbitguest
Pw: guestbit

Part One What is Docker?

The Docker Mission


Build

Ship
Distributed Applica4ons

Anywhere

Run

Docker Mission Make the Internet Programmable


Solu4ons
Docker
Trusted
Registry

Build

Project
"Orca"

Run

Ship

Swarm
Machine

Pla=orm

Compose
Distribution

RunC

Engine

Plumbing
Notary

Open Standards
Container run-time spec
4

Image spec

Open Container Project (OCP)


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 (Docker, Red Hat, Google
h"p://www.opencontainers.org/

Docker Platform

Networking
Plugins
Orchestra9on
6

Networking
Transform Networking as Docker Transformed Compute
Distributed application portability
For Devs: SDN for Docker containers
Re-architected network stack with libnetwork
Consistent dev experience with Docker CLI
Multi-container networking

For Ops: Operator defined and managed network infrastructure


Multi-host networking
Plug in support from range of providers
7

Networking
Before

A=er

Inflexible
Single host
Limited to one network

Container SDN
Distributed networking
Portable across networks
Plug ins to broad ecosystem

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
Docker client

Docker Engine

Plug ins

> docker
Networking

Volumes

Orchestration Across the App Lifecycle

Docker Machine
Docker Swarm
Docker Compose
10

Docker Compose and Swarm

Consistent developer experience with flexible Swarm backends


Integrated with Docker Networking
Mesos backend beta available
Amazon ECS backend collaboration WIP
Docker client

docker

11

Coming Soon!

Running Docker in Production

Three Key Use Cases


Produc9on Requirements
Commercial Availability
12

Continuous Integration and Delivery


1. Development

2. Test

3. Stage / Produc9on

Version
control

Sysadmin

Video from DockerCon

Developer
QA / QE
13

Containers as a Service
Developer

Sysadmin
DevOps

Tomcat
MongoDB

Deployment

Jenkins

Video from DockerCon

Data Processing Pipelines


Data Scientist

$ docker

SysAdmins
DBAs

Data Nodes

Video from DockerCon

Docker Enterprise Solutions


Commercial Subscruption
Server or Cloud Hosted Registry
or
Docker Trusted
Registry

Stable

16

Docker Hub

Docker Engine

Secure

Responsive

Get it here!

Part Two Build an App with


Docker & MongoDB

18

Lets build an App!

web

mongodb

Development
19

python / flask

Lets roll the App to Production behind HA Proxy


HA Proxy

web

web1

mongodb

mongodb

Development
20

Production

Lets scale the web tier


HA Proxy

web

web1

mongodb

mongodb

Development
21

Production

web2

web3

web4

webN

Lets deploy a sharded cluster


HA Proxy

web

mongodb

Development
22

web1

mongodb

Production

web2

web3

web4

webN
cfg3
cfg2
cfg1

mongos
rs1a

rs2a

rs1b

rs2b

rs1c

rs2c

Lets move the endpoint to the new cluster


HA Proxy

web

web1

web2

web3

web4

X
mongodb

Development
23

mongodb

Production

webN
cfg3
cfg2
cfg1

mongos
rs1a

rs2a

rs1b

rs2b

rs1c

rs2c

Lets move the endpoint to the new cluster


HA Proxy

web

mongodb

Development
24

web1

mongodb

Production

web2

web3

web4

webN
cfg3
cfg2
cfg1

mongos
rs1a

rs2a

rs1b

rs2b

rs1c

rs2c

Demo!

25

Summary
One solu9on from Dev -> Produc9on
Dene Container, their contents and how they work together once
Deploy the same images in Dev, Pre-Prod and Produc9on across
PlaYorms
Running Docker & MongoDB in Produc9on
Ops dene the whitelisted images, security policies etc.
Dev use approved images to build upon
Eliminate the complexity (and cost) of deployment
26

Thanks and Q&A


Code
https://github.com/alvinr/docker-demo/tree/master/dockercon15demo

alvin@docker.com
@jonnyeight

27

MongoDB Days 2015


October 6, 2015
October 20, 2015
November 5, 2015
December 2, 2015

France
Germany
UK
Silicon Valley

Вам также может понравиться