Docker-Hanoi @DKT , Presentation about Docker Ecosystem
-
Upload
van-phuc -
Category
Technology
-
view
376 -
download
3
Transcript of Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker Platform and Ecosystem
VĂN ĐÌNH PHÚC - Docker HaNoi Mentor
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
Agenda
◼Docker Introduction◼Ecosystem◼Docker – Use Case◼Q&A
Docker Introduction
Where did you hear about Docker ?
https://medium.com/aws-activate-startup-blog/using-containers-to-build-a-microservices-architecture-6e1b8bacb7d1#.8i6rqwmf3
Where did you hear about Docker ? (Cont.)
– R. Callon, RFC 1925 - The Twelve Networking Truths
“One size never fits all.”
Docker StorySource: dotcloud.com
The Challenge
Source: dotcloud.com
The Matrix From Hell
Source: dotcloud.com
Cargo Transport Pre-1960
Source: dotcloud.com
Also a matrix from hell
Source: dotcloud.com
Solution: Intermodal Shipping Container
Source: dotcloud.com
Docker is a shipping container system for code
Source: dotcloud.com
Docker eliminates the matrix from Hell
Source: dotcloud.com
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
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
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
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
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
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
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/
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
Docker Profolio
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
Docker Engine
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.
What are the basics of the Docker system?
Changes and Updates
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
Docker Swarm
Docker Compose
Developers
docker-compose up
Cloud or Private Infrastructure
Plugins: Network and Volumes
Operations
Deploy
What is the native orchestration tool of Docker?
Docker ToolBox
What’s in the Toolbox◼Docker Engine◼Compose◼Machine◼Kitematic
OS supported: Window & MacOS
Docker Cloud
A hosted service for Docker container management and deployment.
Docker Universal Control Plane
Docker Universal Control Plane (cont.)
Docker Ecosystem
Docker – Ecosystem support
https://www.mindmeister.com/656846411#slideshow
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
Docker – Use Case
Building a Continuous Integration Pipeline with Docker
https://sreeninet.wordpress.com/2016/01/23/ci-cd-with-docker-jenkins-and-tutum/
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/
Thanks you !