meetup docker : from zero to hero

Post on 20-Jan-2017

216 Views

Category:

Internet

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Les Meetups Veille Techno’

Meetup Veille Techno’

Docker : From Zero to Hero

Les Meetups Veille Techno’

Principles• Open to all : everybody’s welcome !– Speakers– Attendees

• Based on BBL– A cutting edge technology– A concept introduced in a customer

• There’s a groupe on Yammer !

Les Meetups Veille Techno’

What is Docker ?

Les Meetups Veille Techno’

• Docker is an ecosystem• Based on 7 projects– Engine– Registry– Kitematic– Machine– Swarm– Compose– Networking

Les Meetups Veille Techno’

Why Docker ?

Les Meetups Veille Techno’

The challenge

Les Meetups Veille Techno’

The matrix from hell

Les Meetups Veille Techno’

Cargo transport pre-1960

Les Meetups Veille Techno’

Also a matrix from hell

Les Meetups Veille Techno’

Solution : intermodal shipping container

Les Meetups Veille Techno’

Docker is a container system for code

Les Meetups Veille Techno’

Docker eliminates the matrix from hell

Les Meetups Veille Techno’

Why developers care• Build once... (finally) run anywhere

– A clean, safe, hygienic, 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.

Les Meetups Veille Techno’

Why administrators care ?• 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.

Les Meetups Veille Techno’

How does it work ?

Les Meetups Veille Techno’

VMs vs containers

Les Meetups Veille Techno’

Basics of a Docker system

Les Meetups Veille Techno’

Changes and updates

Les Meetups Veille Techno’

Docker projects

Les Meetups Veille Techno’

DOCKER ENGINE

Les Meetups Veille Techno’

• Namespaces– User (To be implemented)– Pid– Net– Ipc– Mnt– Uts

Les Meetups Veille Techno’

• Cgroups– Memory– IO– Cpu

Les Meetups Veille Techno’

• Security– AppArmor– SELinux

Les Meetups Veille Techno’

• Filesystems– Aufs– Btrfs– Overlayfs– Vfs– Unionfs– DeviceMapper

Les Meetups Veille Techno’

Les Meetups Veille Techno’

• Dockerfile– It’s like a makefile, but for your image– File to build your image– Plenty of keywords

• FROM• RUN• EXPOSE• CMD• …

Les Meetups Veille Techno’

• Builds– You have to build you container before running it– Each command of your Dockerfile create a new

layer in you image

Les Meetups Veille Techno’

• Variables– You can pass environment variables to your runing

container

Les Meetups Veille Techno’

• Ports– You can expose ports from you container– Without a port, a container cannot be reached

from the outside world

Les Meetups Veille Techno’

• Links– You an link docker containers together without

exposing ports– Environement variables are predictable

Les Meetups Veille Techno’

• Data containers– Datas are not persisted in a container– Datas sontainers can act like filesystem for

container– They can be linked to containers

Les Meetups Veille Techno’

• Volumes– You can pass « anything » you want to a container– Everything is file in a Linux system

Les Meetups Veille Techno’

Demo

Les Meetups Veille Techno’

DOCKER COMPOSE

Les Meetups Veille Techno’

• Docker-compose is orchestration for Docker• Based on yaml syntax• TOSCA-like description

Les Meetups Veille Techno’

Demo

Les Meetups Veille Techno’

DOCKER SWARM

Les Meetups Veille Techno’

• Docker swarm is native cluster system for Docker

• One master, several slaves• You can decide on which daemon you run

your apps– Affinity– Contraint

Les Meetups Veille Techno’

Integration with Mesos

Les Meetups Veille Techno’

DOCKER MACHINE

Les Meetups Veille Techno’

• Used to provide Docker on fresh servers• Lots of backend– GCE– AWS– Virtualbox…

• Define environment variables easily• Can create easy swarm cluster

Les Meetups Veille Techno’

KITEMATIC

Les Meetups Veille Techno’

• Kitematic is easy Docker on Mac• Soon on Windows !

Les Meetups Veille Techno’

REGISTRY

Les Meetups Veille Techno’

• Docker image to provide stateless, highly scalable server side application that stores and lets you distribute Docker images

• Docker hub is public registry• Great for CI/CD system

Les Meetups Veille Techno’

• You can pull images from a private registry– docker pull registry-1.docker.io/library/ubuntu

Les Meetups Veille Techno’

• There is also managed registry from Docker (not free) and licenced trusted registry

Les Meetups Veille Techno’

LIBNETWORK

Les Meetups Veille Techno’

• Native network in Docker– Bridge– SDN– …

• Pluggable• Isolated

Les Meetups Veille Techno’

ORCHESTRATION

Les Meetups Veille Techno’

Orchestration• CoreOS• Mesos• Tutum• Helios (Spotify)• Kubernetes (Google)

Les Meetups Veille Techno’

Les Meetups Veille Techno’

Les Meetups Veille Techno’

Les Meetups Veille Techno’

Les Meetups Veille Techno’

ECOSYSTEM

Les Meetups Veille Techno’

Ecosystem• Plennnnnnnty of projects– Mini-PaaS– Service discovery– Orchestrator– Launcher

• Everyone wants to be part of it !

Les Meetups Veille Techno’

Les Meetups Veille Techno’

• Some really nice projects– CoreOS– Deis/Flynn– Mesos– Project Atomic– Tutum– Joyent Triton

Les Meetups Veille Techno’

USECASES

Les Meetups Veille Techno’

Les Meetups Veille Techno’

Les Meetups Veille Techno’

Les Meetups Veille Techno’

Les Meetups Veille Techno’

WHAT’S NEW ?Dockercon June

Les Meetups Veille Techno’

• OpenContainer project– runc– appc

• Docker on Windows native• Pluggable addon

Les Meetups Veille Techno’

SUJETARTICLE DU MONDE

CONTENU ARTICLE

THEME

Les Meetups Veille Techno’

top related