Slide 1

Slide 1 text

Docker From basics to orchestration

Slide 2

Slide 2 text

About me

Slide 3

Slide 3 text

Overview

Slide 4

Slide 4 text

Overview ● Environment issues ● Virtualization ● "Containerization" ● Docker ○ Install ○ Run ○ Build ○ Host ● Docker Machine ● Docker Compose ● Questions

Slide 5

Slide 5 text

Environment Issues

Slide 6

Slide 6 text

If you do this, you don't receive your: Environment Issues

Slide 7

Slide 7 text

Examples: ● substr vs mb_substr functions Environment Issues

Slide 8

Slide 8 text

Environment Issues Examples: ● substr vs mb_substr functions ● short open tag

Slide 9

Slide 9 text

Environment Issues Examples: ● substr vs mb_substr functions ● short open tag

Slide 10

Slide 10 text

Environment Issues Examples: ● substr vs mb_substr functions ● short open tag

Slide 11

Slide 11 text

Virtualization

Slide 12

Slide 12 text

● 1960 - cpu time sharing (inspiration) Virtualization - History

Slide 13

Slide 13 text

Virtualization - History ● 1960 - cpu time sharing (inspiration) ● IBM 370 - Designed for virtualization via software (CP/CMS).

Slide 14

Slide 14 text

Virtualization - History ● 1960 - cpu time sharing (inspiration) ● IBM 370 - Designed for virtualization via software (CP/CMS). ● IBM z/VM - first success case (via hardware)

Slide 15

Slide 15 text

Virtualization - History ● 1960 - cpu time sharing (inspiration) ● IBM 370 - Designed for virtualization via software (CP/CMS). ● IBM z/VM - first success case (via hardware) ● 1990+ - Hypervisors: VMWare, Xen, KVM, VirtualBox, etc...

Slide 16

Slide 16 text

Virtualization - Hypervisors

Slide 17

Slide 17 text

Virtualization - Stack

Slide 18

Slide 18 text

Virtualization ● Standard environments

Slide 19

Slide 19 text

Virtualization ● Standard environments ● Improve resources usage

Slide 20

Slide 20 text

Virtualization ● Standard environments ● Improve resources usage ● Data recovery

Slide 21

Slide 21 text

Virtualization ● If host hardware fails every VMs fail ● Standard environments ● Improve resources usage ● Data recovery

Slide 22

Slide 22 text

Virtualization ● If host hardware fails every VMs fail ● Difficult troubleshooting ● Standard environments ● Improve resources usage ● Data recovery

Slide 23

Slide 23 text

Virtualization ● If host hardware fails every VMs fail ● Difficult troubleshooting ● New layer = Some Overhead ● Standard environments ● Improve resources usage ● Data recovery

Slide 24

Slide 24 text

Containers - LXC ● Since Jul/2008 - Kernel 2.6.26+

Slide 25

Slide 25 text

● Since Jul/2008 - Kernel 2.6.26+ ● lxc-create, lxc- start, lxc-stop Containers - LXC

Slide 26

Slide 26 text

Containers - LXC ● Since Jul/2008 - Kernel 2.6.26+ ● lxc-create, lxc- start, lxc-stop ● Shares kernel libs and binaries with host

Slide 27

Slide 27 text

● Process isolation - 1 Linux PID (chroot) Containers - LXC

Slide 28

Slide 28 text

Containers - LXC ● Process isolation - 1 Linux PID (chroot) ● Network isolation

Slide 29

Slide 29 text

Containers - LXC ● Process isolation - 1 Linux PID (chroot) ● Network isolation ● Define memory limitation

Slide 30

Slide 30 text

Containers - LXC ● Process isolation - 1 Linux PID (chroot) ● Network isolation ● Define memory limitation ● IO overhead - difficult to share host volumes with guests

Slide 31

Slide 31 text

Docker

Slide 32

Slide 32 text

Docker

Slide 33

Slide 33 text

Docker

Slide 34

Slide 34 text

● Copy on write (AUFS) Docker

Slide 35

Slide 35 text

● Copy on write (AUFS) ● Logging (stdout, stderr, stdin) Docker

Slide 36

Slide 36 text

● Copy on write (AUFS) ● Logging (stdout, stderr, stdin) ● Change management (imgs) Docker

Slide 37

Slide 37 text

● Copy on write (AUFS) ● Logging (stdout, stderr, stdin) ● Change management (imgs) ● Automatic build (Dockerfile) Docker

Slide 38

Slide 38 text

● Copy on write (AUFS) ● Logging (stdout, stderr, stdin) ● Change management (imgs) ● Automatic build (Dockerfile) ● Reusable (FROM: imagename) Docker

Slide 39

Slide 39 text

● Copy on write (AUFS) ● Logging (stdout, stderr, stdin) ● Change management (imgs) ● Automatic build (Dockerfile) ● Reusable (FROM: imagename) ● Easy to share (registry - docker hub) Docker

Slide 40

Slide 40 text

Docker ● Copy on write (AUFS) ● Logging (stdout, stderr, stdin) ● Change management (imgs) ● Automatic build (Dockerfile) ● Reusable (FROM: imagename) ● Easy to share (registry - docker hub) ● Private and public registry

Slide 41

Slide 41 text

● API layer (REST) Docker

Slide 42

Slide 42 text

Docker ● API layer (REST) ● Fast innovations (compose, machine, swarm, network)

Slide 43

Slide 43 text

Docker Awesome

Slide 44

Slide 44 text

Docker - Comparison

Slide 45

Slide 45 text

Docker - Comparison ● Start realy fast

Slide 46

Slide 46 text

Docker - Comparison ● Start realy fast ● Smaller images

Slide 47

Slide 47 text

Docker - Comparison ● Start realy fast ● Smaller images ● Easy replication

Slide 48

Slide 48 text

Docker - Comparison ● Start realy fast ● Smaller images ● Easy replication ● Better resources utilization

Slide 49

Slide 49 text

Docker - Comparison ● Start realy fast ● Smaller images ● Easy replication ● Better resources utilization ● IO overhead

Slide 50

Slide 50 text

Docker - Comparison ● Start realy fast ● Smaller images ● Easy replication ● Better resources utilization ● IO overhead ● Not too isolated

Slide 51

Slide 51 text

Docker - Comparison ● Start realy fast ● Smaller images ● Easy replication ● Better resources utilization ● IO overhead ● Not too isolated ● Linux ONLY

Slide 52

Slide 52 text

Docker - Quick Tips ● It's Container not a VM

Slide 53

Slide 53 text

Docker - Quick Tips ● It's Container not a VM ● Why container - because it solves cargo transport matrix

Slide 54

Slide 54 text

Docker - Quick Tips ● It's Container not a VM ● Why container - because it solves cargo transport matrix ● Why docker, because of docks

Slide 55

Slide 55 text

Docker - Quick Tips ● It's Container not a VM ● Why container - because it solves cargo transport matrix ● Why docker, because of docks ● Images are states, Containers runs it

Slide 56

Slide 56 text

● Go http://docs.docker.com/installation Docker - Install

Slide 57

Slide 57 text

● Go http://docs.docker.com/installation ● Find you host OS Docker - Install

Slide 58

Slide 58 text

● Go http://docs.docker.com/installation ● Find you host OS ● Follow the instructions Docker - Install

Slide 59

Slide 59 text

● Go http://docs.docker.com/installation ● Find you host OS ● Follow the instructions ● FreeBSD hosts will be supported soon Docker - Install

Slide 60

Slide 60 text

● Go http://docs.docker.com/installation ● Find you host OS ● Follow the instructions ● FreeBSD hosts will be supported soon ● MacOS and Windows needs a VM to act as a Host - boot2docker sugested Docker - Install

Slide 61

Slide 61 text

Docker - Basics "Talk is cheap, show me the code." Linus Torvalds

Slide 62

Slide 62 text

● Volume sharing ● Port expose/mapping ● Links between containers Docker - Medium

Slide 63

Slide 63 text

Docker Machine Creates virtual machines ready to run docker locally or on the cloud.

Slide 64

Slide 64 text

● Docker Compose (Old FIG) https://docs. docker.com/compose/install/ ● Crane - http://getcrane.com ● AZK - http://azk.io Orchestration

Slide 65

Slide 65 text

Docker Compose

Slide 66

Slide 66 text

Docker Compose

Slide 67

Slide 67 text

● Docker Swarm Docker - Other Cool Stuff

Slide 68

Slide 68 text

● Docker Swarm ● Docker Network Docker - Other Cool Stuff

Slide 69

Slide 69 text

● Docker Swarm ● Docker Network ● OpenContainers - Linux Foundation Docker - Other Cool Stuff

Slide 70

Slide 70 text

Slides Questions Evaluation