docker-hanoi @dkt , presentation about docker ecosystem

44
Docker Platform and Ecosystem VĂN ĐÌNH PHÚC - Docker HaNoi Mentor

Upload: van-phuc

Post on 10-Feb-2017

372 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Platform and Ecosystem

VĂN ĐÌNH PHÚC - Docker HaNoi Mentor

Page 2: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

About Me

Van Dinh Phuc (Philip Van)Personal email: [email protected] : @phucvdbTechnology Domain: ◼Virtualization & Cloud Technologies focus on infrastructure (VDI, EUC, IaaS,

PaaS)◼Linux Container◼Innovation Technologies

My current job: Cloud Solution Architect – FPT Software

Page 3: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Agenda

◼Docker Introduction◼Ecosystem◼Docker – Use Case◼Q&A

Page 4: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Introduction

Page 5: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Where did you hear about Docker ?

https://medium.com/aws-activate-startup-blog/using-containers-to-build-a-microservices-architecture-6e1b8bacb7d1#.8i6rqwmf3

Page 6: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Where did you hear about Docker ? (Cont.)

Page 7: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

– R. Callon, RFC 1925 - The Twelve Networking Truths

“One size never fits all.”

Page 8: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker StorySource: dotcloud.com

Page 9: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

The Challenge

Source: dotcloud.com

Page 10: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

The Matrix From Hell

Source: dotcloud.com

Page 11: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Cargo Transport Pre-1960

Source: dotcloud.com

Page 12: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Also a matrix from hell

Source: dotcloud.com

Page 13: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Solution: Intermodal Shipping Container

Source: dotcloud.com

Page 14: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker is a shipping container system for code

Source: dotcloud.com

Page 15: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker eliminates the matrix from Hell

Source: dotcloud.com

Page 16: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

WHAT IS DOCKER ?

Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server

Page 17: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Why Developers Care◼ Build once…(finally) run anywhere*◼ A clean, safe, hygienic and portable runtime environment for your app.◼ No worries about missing dependencies, packages and other pain points during

subsequent deployments.◼ Run each app in its own isolated container, so you can run various versions of libraries

and other dependencies for each app without worrying◼ Automate testing, integration, packaging…anything you can script ◼ Reduce/eliminate concerns about compatibility on different platforms, either your own

or your customers. ◼ Cheap, zero-penalty containers to deploy services? A VM without the overhead of a VM?

Instant replay and reset of image snapshots? That’s the power of Docker

Source: dotcloud.com

Page 18: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Why Devops Cares?◼Configure once…run anything◼Make the entire lifecycle more efficient, consistent, and repeatable◼Increase the quality of code produced by developers. ◼Eliminate inconsistencies between development, test, production, and customer

environments◼Support segregation of duties◼Significantly improves the speed and reliability of continuous deployment and

continuous integration systems◼Because the containers are so lightweight, address significant performance, costs,

deployment, and portability issues normally associated with VMs

Source: dotcloud.com

Page 19: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Why it works—separation of concerns

◼Dan the Developer◼Worries about what’s “inside”

the container◼ His code◼ His Libraries◼ His Package Manager◼ His Apps◼ His Data

◼ All Linux servers look the same

• Oscar the Ops Guy• Worries about what’s “outside”

the container• Logging• Remote access• Monitoring• Network config

• All containers start, stop, copy, attach, migrate, etc. the same way

Page 20: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

More technical explanation

◼High Level—It’s a lightweight VM◼Own process space◼Own network interface◼Can run stuff as root◼Can have its own /sbin/init (different

from host)◼<<machine container>>

• Low Level—It’s chroot on steroids

• Can also not have its own /sbin/init

• Container=isolated processes• Share kernel with host• No device emulation (neither

HVM nor PV) from host)• <<application container>>

• Run everywhere• Regardless of kernel version

(2.6.32+)• Regardless of host distro• Physical or virtual, cloud or

not• Container and host

architecture must match* • Run anything

• If it can run on the host, it can run in the container

• i.e. if it can run on a Linux kernel, it can run

WHY WHAT

Page 21: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Containers vs. VMs App

A

Hypervisor (Type 2)

Host OS

Server

GuestOS

Bins/Libs

AppA’

GuestOS

Bins/Libs

AppB

GuestOS

Bins/Libs

App A’

Docker

Host OS

Server

Bins/Libs

App ABins/Libs

App B

App B’

App B’

App B’

VM

Container

Containers are isolated,but share OS and, whereappropriate, bins/libraries

GuestOS

GuestOS

…result is significantly faster deployment, much less overhead, easier migration, faster restart

Page 22: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

What is a container?

In 4 bullet points:◼Containers share the host kernel◼Containers use the kernel ability to group processes for resource

control◼Containers ensure isolation through namespaces◼Containers feel like lightweight VMs (lower footprint, faster), but

are not Virtual Machines!

Source: http://docker-saigon.github.io/post/Docker-Internals/

Page 23: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Why are Docker containers lightweight?

Bins/Libs

AppA

Original App(No OS to takeup space, resources,or require restart)

App Δ

Bins/

AppA

Bins/Libs

AppA’

GuestOS

Bins/Libs

Modified AppCopy on write capabilities allowus to only save the diffsBetween container A and containerA’

VMsEvery app, every copy of an app, and every slight modification of the app requires a new virtual server

AppA

GuestOS

Bins/Libs

Copy ofApp

No OS. CanShare bins/libs

AppA

GuestOS

GuestOS

VMs Containers

Page 24: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Profolio

Page 25: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Engine

◼Core of the Docker platform◼Runs on Linux to create the

operating environment for your distributed applications◼in-host daemon

communicates with the Docker client to execute commands to build, ship and run containers

Page 26: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Engine

Page 27: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker RegistryThere are 3 choices for use of a Registry:◼A Public Cloud-hosted registry. The 

Docker Hub is the default registry used by the docker client and source of Officially maintained Docker images◼An On-premise registry, through the

commercially offered Trusted Docker Registry◼A Self-hosted registry based on the

official Open Source Docker Registry. 

Page 28: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

What are the basics of the Docker system?

Page 29: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Changes and Updates

Page 30: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Machine

You can use Docker Machine to:◼Install and run Docker on Mac or Windows◼Provision and manage multiple remote Docker hosts◼Provision Swarm clusters

Page 31: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Swarm

Page 32: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Compose

Developers

docker-compose up

Cloud or Private Infrastructure

Plugins: Network and Volumes

Operations

Deploy

Page 33: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

What is the native orchestration tool of Docker?

Page 34: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker ToolBox

What’s in the Toolbox◼Docker Engine◼Compose◼Machine◼Kitematic

OS supported: Window & MacOS

Page 35: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Cloud

A hosted service for Docker container management and deployment.

Page 36: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Universal Control Plane

Page 37: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Universal Control Plane (cont.)

Page 38: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Ecosystem

Page 39: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker – Ecosystem support

https://www.mindmeister.com/656846411#slideshow

Page 40: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker Community @Viet Nam

Official meetup site: http://meetup.com/Docker-Saigon/http://www.meetup.com/Docker-Hanoi/

Twitter:https://twitter.com/docker_saigon

Github:https://github.com/docker-saigonhttps://github.com/dockerhanoi

Youtube:https://www.youtube.com/channel/UC1t_GbTJudAAK9Wqkg6-uLwhttps://www.youtube.com/channel/UCa1ieffjEYlfRgZTNl4Cg1A

Facebook:https://www.facebook.com/DockerSaigon

Slideshare:http://www.slideshare.net/Docker-Hanoi

Slack:https://dockersaigon.slack.comhttp://docker-hanoi.slack.com

Our interests:https://docs.google.com/document/d/1lhwK0YIC_KZ4F6o1rrh4wXfJTqdyplm3TZSIZN0X_UE/edit

https://trello.com/b/KE000r5s/research

Page 41: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Docker – Use Case

Page 42: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Building a Continuous Integration Pipeline with Docker

https://sreeninet.wordpress.com/2016/01/23/ci-cd-with-docker-jenkins-and-tutum/

Page 43: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Build a micro service with Docker

A Docker –Hanoi’s Scenario:◼At the beginning, Service #1 only runs in Node 2. ◼After that Service #1 scales to Node 2◼Via Docker API, Registrator will know the appearance of

Service #1 on Node 2.◼Registrator will register Service #1 with Consul. ◼In the meanwhile, Consul-Template in listening Consul. So

Consul-Template will know the new service is up in Node 2. Finally, Consul-Template will trigger a reload command to Nginx add the new service into load balancer.

https://www.facebook.com/events/986704731366039/

Page 44: Docker-Hanoi @DKT , Presentation about Docker Ecosystem

Thanks you !