Top Banner
A BEGINNER’S JOURNEY Containers Credits: http://bit.ly/1VKcNoZ and Docker
36

Docker zero

Jan 23, 2017

Download

Software

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Docker zero

A BEGINNER’S JOURNEYContainers

Credits: http://bit.ly/1VKcNoZ

and Docker

Page 2: Docker zero

Manuel de la Peña

Software Engineer @ Liferay Inc

Interested in: SW Engineering, Coding, Testing, DevOps

Credits:http://bit.ly/1V8Hpzx

Page 3: Docker zero

The VM model

The Container model

Docker, Inc.

The High Level Picture

Credits: http://bit.ly/24xaXwK

Page 4: Docker zero

Credits: http://bit.ly/1SP5iHw

It’s all about…applications

Page 5: Docker zero

APPLICATION INFRASTRUCTURE

Credits: http://bit.ly/1OetMIn

• Dedicated Server

• Purchase order

• O.S. installs & licenses

• Rack positions

• Redundant power & network

Page 6: Docker zero

VIRTUALISATIONTO THE RESCUE

Credits: http://bit.ly/1WOfjJU

• KVM, VMWare, Xen

• Hypervisor with multiple virtual machines

• VM’s looks, feels and tastes as a physical machines

Page 7: Docker zero

THIS MODELIS UGLY…

Credits: http://bit.ly/23pCASq

Page 8: Docker zero

UGLY BECAUSE OF THE O.S.

• The model is one app per VM and each VM requires one O.S.

• O.S. only exists to facilitate the application

• Footprint (CPU, RAM, disk space)

• Licensing if needed

• More O.S. is not adding more Business Value

Credits: http://bit.ly/23pCASq

Page 9: Docker zero

Secure, isolated environmentMinimal O.S. serviceSome service controls

Credits: http://bit.ly/1SP5iHw

It’s all aboutapplications

Page 10: Docker zero

CONTAINERSTO THE RESCUE

Credits: http://bit.ly/23pIymw

• Run on Linux machines*

• An application runs in the USER SPACE

• User Space: memory area where application and some drivers execute.

Page 11: Docker zero

CONTAINER (OS-LEVEL)VIRTUALISATION

• Container model tries to run multiple applications creating multiple user spaces.

• Only one O.S. installed

• Share same instance of the Linux kernel in the host.

Credits: http://bit.ly/23pIymw

Page 12: Docker zero

MORE LIGHTWEIGHTTHAN VM’S

Credits: http://bit.ly/23pIymw

Resources used beforewe install the app

Faster and more portable

Page 13: Docker zero

A single containershould run a single app

or a single process.

Once the processof the container exitsso does the container.

Credits: http://bit.ly/23xrJWD

Page 14: Docker zero
Page 15: Docker zero

• Company under the technology/platform. Previously DotCloud, a PaaS company.

• Docker&Containers = RedHat/Ubuntu&Linux Kernel.

• It’s a package you can get support for.

Page 16: Docker zero

• They provide a very uniform standard container runtime.

• Developers can code their applications in a local docker environment and move them to AWS, Azure, On-Premise.

• Think of Android Apps that run on tablet and phones.

Page 17: Docker zero

• Internal project by Solomon Hykes, written in Go.

• Evolving to a platform:• Image format• Container Runtime (Docker Engine)• Registry (Docker Hub)• Clustering (Swarm)• Service Discovery (Compose)• Networking (libchan), etc.

Page 18: Docker zero

FUTURE OF DOCKER

• Windows Containers

• Cannot create Windows containers on Linux kernel, and viceversa.

• Containers enforces microservices architecture. (single process inside single container approach)

Page 19: Docker zero

HIGH LEVEL PICTURE

Page 20: Docker zero

Took days or weeks to load

Broken or rooted Goods

Global Trade was high Cost and Risk

THE IMPORT/EXPORT NIGHTMARE

Page 21: Docker zero

Development

Staging

Test Environment

Works on my Laptop!

APPLICATIONDELIVERY

Production

Page 22: Docker zero

Malcolm P. MacLean, 1956Inventor of containers

Saved 25% cost insecurity and transport

Credits: http://bit.ly/1VQaocx

Page 23: Docker zero

CONTAINERS ANDSHIPPING YARDS

ARE EFFICIENT AND SAFE

STANDARD

Page 24: Docker zero
Page 25: Docker zero
Page 26: Docker zero

THE SHIPPING YARD ANALOGY

• Shipping Yard —> Docker Engine (Daemon or Runtime)

• Manifests —> Docker Images

• Containers —> Docker Containers

Page 27: Docker zero

Engine, Imagesand Containersmake applicationdelivery happen

Credits: http://bit.ly/1UEiX8Z

Page 28: Docker zero

DOCKER ENGINE(SHIPPING YARD)

• Application infrastructure and runtime dependencies standardised.

• Completely the same runtime environments from docker-host to docker-host.

• De-facto industry standard for containers.

Page 29: Docker zero

DOCKER IMAGES(MANIFEST)

• Instructions on how to build containers (static definition with data and metadata), like VM templates.

• Its required to instantiate a container.

• Images can be categorised with tags, being latest the default.

• Maintainers tend to have the images as small as possible with minimum packages installed, just the needed to provide a functional runtime.

Page 30: Docker zero

DOCKER CONTAINERS

• Running instances of images.

• Runtime.

• Linux machines*

• Container ID & Name

Page 31: Docker zero

Run unchanged containers in your local machine or in production

Time to production decreased

Credits: http://bit.ly/1UEiX8Z

Page 32: Docker zero

OK, Docker engine, docker images, and docker containers, but…

Credits: http://bit.ly/1Zuy3Nv

Where do I get the images?

Page 33: Docker zero

DOCKER REGISTRIES• Images are inside repositories, categorised with tags.

• Repositories live inside a registry.

• Docker Hub is the default public registry of Docker.

• There are official (trusted) repos: Redis, Fedora, Ubuntu, MongoDB…

• And non-official repos, from members of the docker community.

• Private registries.

Page 34: Docker zero

https://hub.docker.com/r/mdelapenya/liferay-portal/tags/

Page 35: Docker zero

Security concern

Trust the containers you use, it can contain malicious code

Credits: http://bit.ly/1UEiX8Z

Page 36: Docker zero

CONTAINERS ARE GOING TO DESTROY VIRTUAL MACHINES

Credits: http://bit.ly/1rxYtmS