Orchestrating DockerMaking The Whale Dance
James Turnbull@kartar
1
who• CTO at Kickstarter
• Advisor at Docker
• Open source chap
• Funny accent
2
The Docker Book
www.dockerbook.com3
The Art of Monitoringwww.artofmonitoring.com
4
Who are you folks?
5
What's this all about?
6
Container virtualization
8
Build, ship, run
9
Run in many places
11
IsolatedLayeredStandard
Content agnostic12
Docker BasicsImage & Dockerfile
ContainerThe Docker Hub
13
Orchestrating DockerComposeMachineSwarm
Kubernetes and friends
14
Docker ComposeBecause it's not simple to build a
stack
15
Docker Compose• Fast, isolated development environments using Docker.
• Quick and easy to start.
• Manages a collection of containers.
16
Installing Compose$ sudo pip install -U docker-compose$ docker-compose --version
17
Compose basics• Build your apps with Dockerfile's.
• Combine applications and images with a docker-compose.yml file.
18
The DockerfileFROM ubuntu:14.04RUN apt-get -yqq updateRUN apt-get -yqq install nodejs npmRUN ln -s /usr/bin/nodejs /usr/bin/nodeRUN mkdir -p /var/log/nodeappADD nodeapp /opt/nodeapp/WORKDIR /opt/nodeappRUN npm install
19
The docker-compose.yml filedb: image: redis ports: - "6379"web: image: jamtur01/0redevdemo command: nodejs server.js ports: - "3000:3000" links: - db
20
Compose details• Can build images, use existing or pull images
• Can map ports, manage links and create volumes
• Still single host centric.
21
Start Compose$ sudo docker-compose upCreating compose_db_1...Creating compose_web_1.... . .
22
Compose benefits• Build complex local stacks.
• Consistent and shareable.
• No more...
24
Docker MachineBuilds machines
26
Machine benefits• Automatically build Docker servers.
• Manage Docker servers.
• Target local and cloud nodes.
27
DemoBuilding some Swarm nodes...
28
Docker Swarm• Clustering (management) for Docker.
• Manage multiple Docker daemons.
• Distribute workloads.
29
DemoDistributing workloads
30
Service orchestration
31
Kubernetes• Based on Google's container model
• Turns containers into nodes
32
Mesosphere• Workload management & scheduling
• Docker is an option
33