Slide 1

Slide 1 text

Introduction to Kunal Kushwaha

Slide 2

Slide 2 text

whoami? - Kunal Kushwaha ๏ NTT Labs ๏ Contributor - Docker & related projects. ๏ Docker Tokyo Meetup Co Organizer. @kunalkushwaha

Slide 3

Slide 3 text

Linux Containers • A container is a group of isolated processes – cgroups – namespace • Isolated processes run straight on the host – native CPU performance – minimal memory overhead – minimal network performance overhead

Slide 4

Slide 4 text

Cgroups

Slide 5

Slide 5 text

Cgroups (control groups) • Linux kernel feature • Resource limitations • Accounting • Groups of processes • May be nested

Slide 6

Slide 6 text

Cgroups submodules • memory • CPU • network IO • disk IO

Slide 7

Slide 7 text

Namespaces

Slide 8

Slide 8 text

namespaces • Linux kernel feature • wrap particular global system resource in an abstracted & isolated instance • May be nested

Slide 9

Slide 9 text

Different kinds of namespaces • Currently 6 namespaces supported by Linux Kernel • mnt (mount points, filesystems) • pid (processess) • net (network stack) • ipc (System V IPC) • uts (hostname) • user (UIDs)

Slide 10

Slide 10 text

Implementations

Slide 11

Slide 11 text

VM vs Containers

Slide 12

Slide 12 text

12 VMs

Slide 13

Slide 13 text

13 Containers

Slide 14

Slide 14 text

Containers vs VM App A Hypervisor (Type 2) Host OS Server Guest OS Bins/ Libs App A’ Guest OS Bins/ Libs App B Guest OS Bins/ Libs App A’ Docker Host OS Server Bins/Libs App A Bins/Libs App B App B’ App B’ App B’ VM Container Containers are isolated, but share OS Kernel and, where appropriate, bins/ libraries Guest OS Guest OS … result is significantly faster deployment, much less overhead, easier migration, faster restart. isolation is achieved with OS components like cgroups, namespaces, secomp, SELinux, apparmor etc.

Slide 15

Slide 15 text

Startup Time

Slide 16

Slide 16 text

Pros & Cons • Startup time reduced to few seconds from minutes. • lightweight • No hypervisor overhead • Can run 100 to 1000 containers instead of 10-20 VM’s. • Less secure

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Loosely Coupled Services Many Small Servers ~2000 Today Monolithic Big Servers Slow changing Rapidly updated Application are changing

Slide 19

Slide 19 text

•Many different stacks. •Many different targets. Deployment becomes very complex

Slide 20

Slide 20 text

Virtual machines Server Public Cloud Disaster Recovery Developer Laptop Server Cluster Data Center Static Website Web Front End Background Workers User DB Analytics DB Queue API Endpoint Development Test & QA Production Scale Out The deployment challenge

Slide 21

Slide 21 text

The Matrix from Hell

Slide 22

Slide 22 text

Cargo Transport pre-1960 Multiplicity of Goods Multipilicity of methods for transporting/ storing Do I worry about how goods interact (e.g. coffee beans next to spices) Can I transport quickly and smoothly (e.g. from boat to train to truck)

Slide 23

Slide 23 text

Also an NxN Matrix ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

Slide 24

Slide 24 text

Solution: Intermodal Shipping Container Multiplicity of Goods Multiplicity of methods for transporting/storing Do I worry about how goods interact (e.g. coffee beans next to spices) Can I transport quickly and smoothly (e.g. from boat to train to truck) …in between, can be loaded and unloaded, stacked, transported efficiently over long distances, and transferred from one mode of transport to another A standard container that is loaded with virtually any goods, and stays sealed until it reaches final delivery.

Slide 25

Slide 25 text

This eliminated NxN Problem… ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

Slide 26

Slide 26 text

…and Spawned an Intermodal Shipping Container Ecosystem • 90% of all cargo now shipped in a standard container • Order of magnitude reduction in cost and time to load and unload ships • Massive reduction in losses due to theft or damage • Huge reduction in freight cost as percent of final goods (from >25% to <3%) • massive globalizations • 5000 ships deliver 200M containers per year

Slide 27

Slide 27 text

Docker is Shipping Container system for Code Static website Web frontend User DB Queue Analytics DB Development VM QA server Public Cloud Contributor’s laptop Multiplicity of Stacks Multiplicity of hardware environments Production Cluster Customer Data Center Do services and apps interact appropriately? Can I migrate smoothly and quickly …that can be manipulated using standard operations and run consistently on virtually any hardware platform An engine that enables any payload to be encapsulated as a lightweight, portable, self-sufficient container…

Slide 28

Slide 28 text

Or… put more simply Static website Web frontend User DB Queue Analytics DB Development VM QA server Public Cloud Contributor’s laptop Multiplicity of Stacks Multiplicity of hardware environments Production Cluster Customer Data Center Do services and apps interact appropriately? Can I migrate smoothly and quickly Operator: Configure Once, Run Anything Developer: Build Once, Run Anywhere (Finally)

Slide 29

Slide 29 text

Eliminate the Matrix from Hell

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Docker • Package • Docker provides the ability to package and run an application in a loosely isolated environment called a container. • Encapsulate your applications (and supporting components) into Docker containers • Run • The isolation and security allow you to run many containers simultaneously on a given host. • Because of the lightweight nature of containers, which run without the extra load of a hypervisor, you can run more containers on a given hardware combination than if you were using virtual machines. • Docker provides tooling and a platform to manage the lifecycle of your containers: • Ship • Distribute and ship containers to your teams for further development and testing • Deploy applications to your production environment, whether it is in a local data center or the Cloud

Slide 32

Slide 32 text

Build on Giants

Slide 33

Slide 33 text

Container Revolution • Started by making Linux containers usable. • Whole ecosystem was built. • Now moving towards standards • OCI (Open Container Initiative) • Runtime Specs • Image Specs • Docker libcontainer and image specs are donated for both. • No lock-in.

Slide 34

Slide 34 text

Docker for Windows/Mac •Currently in public beta •Easy to install: Get up and running on Docker in minutes •Leverages Hyper-V (Windows) or xhyv (Mac)
 −Docker for Windows requires Windows Pro 10, Enterprise, or Education •Full API / CLI compatibility •OS integration for increased stability and speed

Slide 35

Slide 35 text

•Native Windows containers powered by Docker Engine •Windows kernel engineered with new primitives to support containers •Deep integration with 2+ years of engineering collaboration in Docker Engine and Windows Server •Microsoft is top 5 Docker open source project contributor and a Docker maintainer Infrastructure Windows Server 2016 Bins/Libs App Docker Engine Bins/Libs App Bins/Libs App Docker + Windows Server = Windows Containers

Slide 36

Slide 36 text

Docker ecosystem Dev Tools Official Repositories Operating Systems Big Data Service Discovery Build / Continuous Integration Configuration Management Consulting &Training Management Storage Clustering & Scheduling Networking Infrastructure & Service Providers Security Monitoring & Logging

Slide 37

Slide 37 text

QA