introduction to docker by adrian mouat

29
INTRODUCTION TO DOCKER ADRIAN MOUAT

Upload: container-solutions

Post on 26-Jul-2015

350 views

Category:

Technology


1 download

TRANSCRIPT

INTRODUCTION TODOCKER

ADRIAN MOUAT

SO WHAT IS DOCKER?

SIMILAR TO A LIGHTWEIGHTVM

Both provide isolated environments

Docker is much more efficient

64-bit Linux only (currently)

CONTAINERIZATIONA Docker container is a portable store for a single component

and its dependencies

THE SHIPPING METAPHORTraditionally, cargo was shipped as "bulk" and "break bulk"

Think sacks of coffee beans, barrels of oil etc.

Lots of manual work

MEET THE INTERMODALCONTAINER

Holds goods of different shapes and sizes

Shipping company doesn't care as long as it comes in astandard container

Cranes, ships, forklifts, lorries all support standardcontainers

Huge gain in efficiency

THE SOFTWARE SITUATIONModern applications have lots of components

database, webserver, loadbalancer..

And lots of enivronments

developer's laptop, testing VM, staging server, cloud

Problems moving between them

MEET THE DOCKERCONTAINER

Put anything you like in a container

Database, Web server, proxy etc

Ship it anywhere

Use the same container in development, testing andproduction

Provides sandboxing

Isolates dependencies

VMS VS CONTAINERS

ENOUGH THEORY!

DEMO TIME!

CONTAINERIZATIONA Docker image is a portable store for a single component and

its dependencies

DOCKER IMAGESLike a stopped VMBuilt from DockerfilesList of repeatable stepsMongo Dockerfile

BUT DOCKER IS MORE THANTHIS

Aims to be an "open platform"Key to this is the Docker Hub

USE CASES

CONTINUOUS DELIVERYFast deployment pipelineAutomatic testing and integrationSoftware is always production readyCan deploy new version at "push of a button"

WHERE DOCKER COMES INReduces difference between dev and productionDevops tool

Developers define dependenciesOperations concentrate on hosting containers

Faster system tests

MICROSERVICESApplication made up of many small independent servicesAs opposed to monolithic applicationsCan easily scale and replace servicesProblems

Deciding where to separate servicesLarger system (more VMs)

PREREQUISITESRapid ProvisioningBasic MonitoringRapid Application DeploymentDevops Culture

http://martinfowler.com/bliki/MicroservicePrerequisites.html

WHERE DOCKER COMES INRapid Provisioning

Good cloud supportboth private and public

Greater efficiency means less hardwareRapid Application Deployment

Much faster to spin up containersDesigned to be part of a pipeline

Devops CultureDocker is a DevOps tool!

WRAPPING APPLICATIONSPutting applications in containerExisting desktop appsGUI and command-lineFor normal end users

WHY?Easy InstallSafePortableHub for Distribution

EXAMPLES

DEVELOPMENTENVIRONMENTS

Share pre-configured set-upPlug-ins, source repositories, coding standardsAlso Vagrant

ERR, THIS?Fit of rage at PowerpointDecided to try reveal.jsHard to install

Node, NPM, Grunt...

CONCLUSIONContainers are the future!Likely to be ubiquitousWide range of use cases

Some we haven't seen yet

Chief Scientist @ Container Solutions

Writing "Using Docker" for O'Reilly

@adrianmouat

http://www.container-solutions.com