orchestrating docker - making the whale dance

34
Orchestrating Docker Making The Whale Dance James Turnbull @kartar 1

Upload: james-turnbull

Post on 14-Apr-2017

2.313 views

Category:

Software


1 download

TRANSCRIPT

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

What is Docker?

7

Container virtualization

8

Build, ship, run

9

Build once

10

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

Demo

23

Compose benefits• Build complex local stacks.

• Consistent and shareable.

• No more...

24

25

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

Questions?

34