Sunteți pe pagina 1din 43

Who Am I?

The DevOps
Challenge
Next-Gen Cloud Computing and DevOps with
Beyond VMs Docker Containers
The How of
Docker

Docker 101
Hamilton Turner
Docker
Examples hamiltont@gmail.com
Docker Limits

Hadoop Demo

Conclusions
March 12, 2014

March 2014 1 / 43
Who am I?

Who Am I? Who am I?
The DevOps • Ph.D. Candidate at Virginia Tech
Challenge
• Defending in Fall 2014
Beyond VMs

The How of
• Member of Magnum Research Group
Docker (http://www.magnum.io/)
Docker 101 • We focus on mobile and cloud applications
Docker
Examples How do I use Docker?
Docker Limits • Stress test 100+ web apps, without installing natively
Hadoop Demo
• Manage computer cluster for research group
Conclusions
• Personal playground for learning new technologies

March 2014 2 / 43
DevOps Challenges: The Matrix From Hell

django web frontend ? ? ? ? ? ?


node.js async API ? ? ? ? ? ?
background worker tasks ? ? ? ? ? ?
SQL Database ? ? ? ? ? ?
Who Am I? distributed DB, big data tools ? ? ? ? ? ?
message queue ? ? ? ? ? ?
The DevOps my laptop your laptop QA system staging production on Cloud VM production on bare metal
Challenge

Beyond VMs • Each environment looks different


The How of • Different developer needs
Docker

Docker 101 • Different operations environments


Docker
Examples The ‘Big Question’
Docker Limits • How do we make all these environments identical?!
Hadoop Demo

Conclusions

Credit: Jérôme Petazzoni at http://www.slideshare.net/jpetazzo/


introduction-docker-linux-containers-lxc

March 2014 3 / 43
Review of Virtual Machines

Virtual Machines are one current solution

Who Am I?

The DevOps • An ‘entire computer’ is


Challenge

Beyond VMs
executed as a program
The How of • No developer’s local
Docker
system has to be modified
Docker 101

Docker
• The entire VM disk image
Examples
can be shared
Docker Limits
• No more differences
Hadoop Demo

Conclusions
between dev and
production environments!
• This is great! ....Right?

March 2014 4 / 43
Comparison of Docker Containers And VMs

Who Am I?

The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101 Credit: quay.io - A Secure Hosting Solution For Private Docker Repositories
Docker
Examples
Docker Container Virtual Machine
Docker Limits
Avg Host Resources Consumed Low High
Hadoop Demo Clean Startup Time seconds minutes/hours
Conclusions Environment (FS) Sharing Small (Union filesystem) Large (Entire Snapshot)
Environment Reproducibility High Moderate (AWS image)
Software Modifications Needed? Perhaps (one process) Unlikely
Attack Surface Untested Small
System Monitoring Use Linux Tools Custom systems

March 2014 5 / 43
The How of Docker

Docker shares the kernel with the host, uses Linux


Who Am I? namespaces+cgroups+union filesystems to isolate
The DevOps
Challenge • process trees (PIDs)
Beyond VMs
• hostnames (utc)
• mounts (mnt)
The How of • memory
Docker • network (net)
Docker 101
• CPU
• inter-process
Docker • Disk access (blkio)
Examples communication (ipc)
• Device access (devices)
Docker Limits
• user accounts (user)
Hadoop Demo

Conclusions

Summary: Docker combines and standardizes a number of


existing Linux components (kernel 3.8+)

March 2014 6 / 43
The How of Docker, Union Filesystem Version

• Each layer of the FS is mounted


Who Am I?
on top of prior layers
The DevOps
Challenge • The first layer is the base image
Beyond VMs
• Current base images include
The How of
Docker debian, ubuntu, busybox, fedora,
Docker 101 cent os, etc
Docker
Examples • Each read-only layer is called an
Docker Limits image (A layer is just a
Hadoop Demo collection of files and folders!)
Conclusions
• The top layer is the only
modifiable layer - it’s termed the
container

March 2014 7 / 43
Docker 101: Run Interactive Container

$ su do d o c k e r r u n − i −t ubuntu / b i n / b a s h

Who Am I?
• sudo : Docker has to be run as root!
The DevOps • run : we are running a container
• -i -t : we want a terminal (stdin and stdout), and we
Challenge

Beyond VMs
want to be connected to those so we can interact with
The How of
Docker the continer
Docker 101 • ubuntu : The base image for this container
Docker
Examples
• /bin/bash : Let’s run bash
Docker Limits $ su do d o c k e r r u n − i −t ubuntu / b i n / b a s h
Hadoop Demo r o o t @ 0 3 7 1 1 5 5 9 d 5 7 d : / # cat / etc /* release *
Conclusions DISTRIB ID=Ubuntu
DISTRIB RELEASE =12.04
DISTRIB CODENAME=p r e c i s e
DISTRIB DESCRIPTION=” Ubuntu 1 2 . 0 4 LTS”
r o o t @ 0 3 7 1 1 5 5 9 d 5 7 d : / # exit
March 2014 8 / 43
Docker 101: Run Non-Interactive Container

Flags -i and -t are good for interacting with a container, but


for scripting or long-running tasks, you’ll want to use detached
Who Am I? (-d) mode
The DevOps
Challenge $ su do d o c k e r r u n −d ubuntu / b i n / b a s h −c ” e c h o h i ”
Beyond VMs 94490365 f 4 6 4 b a b 1 f 0 0 9 e c 0 9 7 1 e 1 6 9 1 2 1 3 b 4 5 6 2 d b a e b 0 4 b 2 e 3 3 a d
The How of
$
Docker

Docker 101
Odd things:
Docker • There was no ‘hi’
Examples

Docker Limits • You were given this long string


Hadoop Demo • You are back at your original shell, even though you ran
Conclusions bash
In detached mode, docker immediately returns a container ID.
This ID can be used to fetch container stdout, check container
status, stop the container, etc
March 2014 9 / 43
Docker 101: Run Non-Interactive Container, Part
Two

Ok, let’s see what’s happening using our container ID


Who Am I?

The DevOps
$ su do d o c k e r r u n −d ubuntu / b i n / b a s h −c ” e c h o h i ”
Challenge d2026870efedf09e29dbea146d399e60493e9dd0ebbf6124347d6
Beyond VMs $ su do d o c k e r l o g s d 2 0 2 6 8 7 0 e f e d f 0 9 e 2 9 d b e a 1 4 6 d 3 9 9 e 6 0 4 9
The How of hi
Docker

Docker 101 Container ID’s can be referenced by unique prefix too


Docker $ su do d o c k e r l o g s d202
Examples
hi
Docker Limits

Hadoop Demo docker ps shows you what containers are running


Conclusions $ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
d2026870ef ubuntu : 1 2 . 0 4 / b i n / b a s h −c w h i l e t 1 m i n u t e ago Up 1 min

March 2014 10 / 43
More on Container IDs

Typically, you will want to store the ID


$ MY ECHO=$ ( s u d o d o c k e r r u n −d ubuntu / b i n / b a s h
−c ” e c h o h i ” )
$ s u d o d o c k e r l o g s $MY ECHO
Who Am I? hi
The DevOps • Detached Mode (e.g. docker run -d)
Challenge
• Docker run response is the container ID
Beyond VMs
• To capure the output, we use $(...)
The How of
Docker • This output is stored into variable MY ECHO,
Docker 101 and later retrieved with $MY ECHO
• Interactive Mode (e.g. docker run -i -t)
Docker
Examples • Run container, modify, then exit. Container is now stopped
Docker Limits • Use docker ps -a to show all containers, incl. stopped
Hadoop Demo ones
Conclusions • Or use docker ps -l -q to show the last container ID
$ s u d o d o c k e r p s −a
CONTAINER ID IMAGE COMMAND CREATED STATUS
d2026870ef ubuntu : 1 2 . 0 4 / b i n / b a s h −c w h i l e t 1 m i n u t e ago Exit 0
$ s u d o d o c k e r p s −q −l
d2026870ef

Note: Docker now supports container names


March 2014 11 / 43
Storing A Container For Reuse
(a.k.a. Building an Image)

• Recall: the container filesystem is the


Who Am I? final union with a stack of images
The DevOps • docker commit converts this container
Challenge

Beyond VMs
filesystem into an image
The How of
• The image can then be used to run
Docker
other containers
Docker 101
$ APP=$ ( su do d o c k e r r u n −d ubuntu / b i n / b a s h −c
Docker
Examples
‘ ‘ e c h o h i > c o n f i g . out ’ ’ )
$ su do d o c k e r commit $APP h a m i l t o n t /myapp
Docker Limits
$ su do d o c k e r r u n − i −t h a m i l t o n t /myapp / b i n / b a s h
Hadoop Demo
r o o t @ 3 a 1 f 0 c 2 8 b 8 2 2 : / # cat config . out
Conclusions hi

If you could share this image...then others could build new


containers based on this image!

March 2014 12 / 43
Sharing An Image For Reuse

• Images can be shared using a registry


• docker push and docker pull
Who Am I?

The DevOps • There is a public registry available, or your company can


Challenge
host it’s own private registry Check out quay.io
Beyond VMs

The How of
• If docker run does not find the image locally, it will
Docker automatically search known registries
Docker 101

Docker $ su do d o c k e r push h a m i l t o n t /myapp


Examples
$ su do d o c k e r p u l l h a m i l t o n t / myotherapp
Docker Limits

Hadoop Demo • The images subcommand can be used to list local images
Conclusions
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
h a m i l t o n t /myapp latest d100b411c51e 2 m i n u t e s ago 2 0 4 . 4 MB
h a m i l t o n t / myotherapp latest 7 cb2d9010d39 11 d a y s ago 4 1 0 . 6 MB
ubuntu 12.04 9 cd978db300e 5 weeks ago 2 0 4 . 4 MB
ubuntu latest 9 cd978db300e 5 weeks ago 2 0 4 . 4 MB

March 2014 13 / 43
Benefits of Using Union Filesystems For Images

• Hypothetical:
Who Am I? • I run a ubuntu container, make changes, and exit
The DevOps • I commit my changes to an image and run docker push
Challenge
• My colleage wants to docker pull my image
Beyond VMs
• What do they need to download?
The How of
Docker • Answer:
Docker 101 • Just your changes!
Docker • They have probably already downloaded the ubuntu base
Examples
image
Docker Limits

Hadoop Demo
• No inherent need for multi-GB images
Conclusions • Download only files, not arbitrary filesystem junk
• While YMMV,
80% of images are ≤ 50MB, 95% are ≤ 500MB

March 2014 14 / 43
Linking Host/Container Filesystems

A nice seperation of concerns would place application inside the


container, logs outside the container.
Who Am I?
The -v flag can mount a host volume to the container
The DevOps $ su do m k d i r / a p p l o g s
Challenge $ su do d o c k e r r u n − i −t −v / a p p l o g s : / l o g s ubuntu
Beyond VMs / b i n / bash
The How of r o o t @ 8 4 2 f a 9 6 9 9 3 5 3 : / # cd / logs /
Docker r o o t @ 8 4 2 f a 9 6 9 9 3 5 3 : / l o g s # echo " My application log "
Docker 101 > l o g . out
Docker r o o t @ 8 4 2 f a 9 6 9 9 3 5 3 : / l o g s # exit
Examples
$ cat / a p p l o g s / l o g . out
Docker Limits My a p p l i c a t i o n l o g
Hadoop Demo
-v can also be used to access configuration on the host
Conclusions
$ su do m k d i r / a p p c o n f
$ su do d o c k e r r u n − i −t −v / a p p c o n f : / e t c / app ubuntu
/ b i n / bash
r o o t @ 8 4 2 f a 9 6 9 9 3 5 3 : / # my_app -- conf / etc / app

March 2014 15 / 43
Exposing Container Network Ports

Docker container ports are not published unless requested.


The -p flag can be used to publish a port
Who Am I?
$ SERVER=$ ( d o c k e r r u n −d −p 8000 ubuntu / b i n / b a s h
The DevOps
Challenge −c ‘ w h i l e t r u e ; do s l e e p 5 ; done ’ )
Beyond VMs
$ su do d o c k e r p o r t $SERVER 8000
0.0.0.0:49158
The How of
Docker
Breakdown:
Docker 101

Docker • Run a bash process inside the container, looping


Examples
indefinitely
Docker Limits

Hadoop Demo
• -p 8000 caused Docker to find an unused host port and
Conclusions
link it with the container-internal port 8000
• We used the port subcommand to find this public port
• There is nothing listening on port 8000 in the container,
so this is kind of boring
March 2014 16 / 43
Exposing Container Network Ports, Part Two

So let’s run an actual webserver!


Method 1: Build my own webserver image
Who Am I? Method 2: Reuse someone else’s pre-built image
The DevOps
Challenge $ WEB SERVER=$ ( sudo d o c k e r r u n −t −d
Beyond VMs −p 8000 h a m i l t o n t / python−s i m p l e h t t p s e r v e r )
The How of
$ su do d o c k e r l o g s $WEB SERVER
Docker S e r v i n g HTTP on 0 . 0 . 0 . 0 p o r t 8000 . . .
Docker 101 $ su do d o c k e r p o r t $WEB SERVER 8000
Docker
0.0.0.0:49186
Examples

Docker Limits
Note:
Hadoop Demo • I chose to reuse hamiltont/python-simplehttpserver
Conclusions
• Navigating to http://localhost:49186 will now
connect me to the webserver
• The container knew what command to run! More on this
next...
March 2014 17 / 43
Building Images with Dockerfiles

• We know how to run a container, modify it, and commit it


as an image
Who Am I?
• A Dockerfile lists the steps needed to build an images
The DevOps
Challenge • Similar to a Makefile
Beyond VMs • docker build is used to run a Dockerfile
The How of
Docker
• Can define default command for docker run, ports to
Docker 101 expose, etc
Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 18 / 43
Locating Community Images

Who Am I?

The DevOps
Challenge

Beyond VMs
• There are hundreds of community-contributed and/or
The How of
Docker official images online at http://index.docker.io
Docker 101
• This is the official registry, you can also host your own
Docker
Examples • You can also use the docker search subcommand to
Docker Limits interact with index.docker.io
Hadoop Demo
$ sudo docker s e a r c h w o r d p r e s s
Conclusions NAME DESCRIPTION STARS TRUSTED
c t l c / wordpress 4 [OK]
j b f i n k / d o c k e r−wor Same a s j b f i n k / w o r d p r e s s , j u s t a t r u s t e d b 2 [OK]
skxskx / wordpress W o r d p r e s s & SSH i n a c o n t a i n e r . 2
eugeneware / docker 1 [OK]
tutum / w o r d p r e s s W o r d p r e s s Docker image − l i s t e n s i n p o r t 80 1 [OK]
j b f i n k / wordpress Wordpress 3.8 1

March 2014 19 / 43
Docker 101 Review: Topics Covered

Who Am I? • Running Docker Containers In Interactive or Detached


The DevOps
Challenge
Mode
Beyond VMs • Container IDs (and names)
The How of
Docker
• Viewing output of detached container (docker logs)
Docker 101 • Committing containers to create images
Docker
Examples • Sharing images via push/pull
Docker Limits • Mounting Filesystems From Host inside container
• Exposing container network ports
Hadoop Demo

Conclusions
• Basic concept of Dockerfiles

March 2014 20 / 43
Docker 101: Things We Didn’t Cover

• Detach from running container, then re-attaching


Who Am I? • Diff’ing filesystems
The DevOps
Challenge • Storing container/image as tar file
Beyond VMs • Using docker kill to stop a running container
The How of
Docker • Deleting unused containers/images
Docker 101
• Examining processes inside container from the host
Docker
Examples • Linking containers together (via filesystem or network)
Docker Limits
• Trusted builds
Hadoop Demo

Conclusions
• Limiting container memory and CPU consumption

Any questions at this point?


March 2014 21 / 43
A (small) selection of Dockerized Projects

Data Storage Redis, MySQL, MongoDB,


Who Am I? memcached
The DevOps
Challenge Server Stacks Nginx, Apache+PHP, SSH
Beyond VMs Development Python, Go, Ruby, Java,
The How of Environments Chef/Puppet, node.js,
Docker
X11+SSH Desktop
Docker 101

Docker
Blogging / CMS Wordpress, Ghost
Examples Single-use tool usage Redis CLI, Latex, subuser
Docker Limits
Continuous Integration Jenkins, Drone
Hadoop Demo
Proxy Software Hipache, Nginx/Apache/noje.js
Conclusions
PaaS Cocaine (from Yandex), Deis,
Flynn, Bowery, Dokku

March 2014 22 / 43
Example: Wordpress

# WP =$( docker run -d -p 80 tutum / wordpress )


# docker port $WP 80
Who Am I? 0.0.0.0:49159
The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 23 / 43
Example: Redis Commander Web GUI

# RD = $ ( docker run -d -p 8081 elsdoerfer / redis - commander )


# docker port $RD 8081
0.0.0.0:49159

Who Am I?

The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 24 / 43
Example: Sandboxed Dev Environment

# docker run -t -i -p 22 magglass1 / docker - browser - over - ssh


IP a d d r e s s : 172.17.0.4
Who Am I?
P a s s w o r d : N24DjBM86gPubuEE
The DevOps Firefox : s s h −X webuser@172 . 1 7 . 0 . 4 f i r e f o x
Challenge G o o g l e Chrome : s s h −X webuser@172 . 1 7 . 0 . 4 g o o g l e−chrome −−no−s a n d b o x

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 25 / 43
Example: SSH Server

# SSH =$( docker run -d -p 22 dhrp / sshd )


Who Am I?
# docker port $SSH 22
The DevOps
Challenge
0.0.0.0:49160
Beyond VMs
Ok, SSH is running. Now to connect!
The How of
Docker $ s s h −p 49161 r o o t @ 1 0 . 0 . 0 . 2
root@10 . 0 . 0 . 2 ’ s password :
Docker 101 Welcome t o Ubuntu 1 2 . 0 4 LTS (GNU/ L i n u x 3.11.0 −18 − g e n e r i c x 8 6 6 4 )

Docker ∗ Documentation : h t t p s : / / h e l p . ubuntu . com/


Examples
The p r o g r a m s i n c l u d e d w i t h t h e Ubuntu s y s t e m a r e f r e e s o f t w a r e ;
Docker Limits t h e e x a c t d i s t r i b u t i o n t e r m s f o r e a c h program a r e d e s c r i b e d i n t h e
i n d i v i d u a l f i l e s i n / u s r / s h a r e / doc /∗/ c o p y r i g h t .
Hadoop Demo

Conclusions Ubuntu comes w i t h ABSOLUTELY NO WARRANTY, t o t h e e x t e n t p e r m i t t e d by


a p p l i c a b l e law .

root@7d45b427eca1 : ˜ #

March 2014 26 / 43
Example: Continuous Integration

# JEN = $ ( $docker run -d -p 8080 -- cpu - shares =20 lzhang / jenkins )


# docker port $JEN 8080
0.0.0.0:49160

Who Am I?
Note: I’ve limited the CPU shares allowed
The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 27 / 43
Example: Quick Web Server

# WEB = $ ( docker run -d -v / Programming :/ www -p 8000 hamiltont / python - simplehtt


# docker port $WEB 8000
0.0.0.0:49160

Who Am I?
Note: I’ve mounted my /Programming folder to /www
The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 28 / 43
Example: Using Redis CLI Without Installing It

Who Am I? # docker run -i -t crosbymichael / redis - cli -h


The DevOps r e d i s . myhost . com ‘KEYS ∗ ’
Challenge 1) ” f o u r ”
Beyond VMs 2 ) ” one ”
The How of 3 ) ” two ”
Docker

Docker 101
• Redis is not installed on the host
Docker
Examples • I can use complex (and stateful!) commands without
Docker Limits modifying the host machine
Hadoop Demo
• I could even pull my dotfiles onto a production machine
Conclusions
• No noticable run delay

March 2014 29 / 43
Example: Preexisting Automation Tools

• Docker doesn’t exclude existing tools like Chef, Puppet,


Who Am I?
etc
The DevOps
Challenge • Current base systems are limited to (mostly) Debian
Beyond VMs
• Most current automation systems can be used seamlessly
The How of
Docker • But...you no longer have to worry as much about OS
Docker 101
updates as the Docker image is static ;-)
Docker
Examples CentOS+Chef:
Docker Limits
# docker run -i -t raybeam / chef / bin / bash
Hadoop Demo
bash −4.1 # knife
Conclusions
ERROR : You need t o p a s s a sub−command
( e . g . , k n i f e SUB−COMMAND)
. . . <s n i p >

March 2014 30 / 43
Docker Is Not a Panacea: Considerations

Who Am I?

The DevOps
• No Shared Libraries
Challenge • The price of process isolation
• ADD-only filesystem
Beyond VMs

The How of
Docker • Scenario: Run a huge build and then rm /tmp/*
Docker 101 • Result: All of /tmp will be downloaded, and
Docker then masked with an empty directory
Examples
• Root access required for simple operations!
Docker Limits
• Progress is being made on this front
Hadoop Demo

Conclusions • Orchestration of Containers is limited...more on this next

March 2014 31 / 43
Docker Service Orchestration and Service Discovery

If my application has 10 containers, how do I organize them all?


No clear winner here, but many solutions in progress:
Who Am I? • Raw Docker
The DevOps • docker run -v can be used to call out interesting volumes
Challenge

Beyond VMs
within contianers
• volumes from can be used to share these volumnes with
The How of
Docker other containers
Docker 101 • Containers can be linked to share their network
Docker • Fig: Uses simple config to start/link containers
Examples

Docker Limits • Serf: General service discovery solution


Hadoop Demo • Shipyard: Web-based system for managing docker-driven
Conclusions applications
• CoreOS: OS designed for running cloud apps such as
Docker
• SkyDock: DNS-based Docker service discovery
March 2014 32 / 43
Rough Test of Docker Overhead

• Launch and sleep tiny containers (busybox, 125Kb)


Who Am I?
• Docker overhead hopefully trumps this
The DevOps
Challenge • Using 4GB, 4-core system
Beyond VMs

The How of # while true


Docker > do
Docker 101 > d o c k e r r u n −d b u s y b o x / b i n / a s h −c
Docker ” w h i l e t r u e ; do e c h o a l i v e ; s l e e p 6 0 0 0 0 ; done ”
Examples > d o c k e r p s | wc − l
Docker Limits > done
Hadoop Demo

Conclusions
Fast Fail Results:
• 250 containers launched before “Too many open files”
• <2GB memory used, load of 3 (all sleeping)

March 2014 33 / 43
Recap: Docker and Virtual Machines

Q: Are Docker Container just ‘Better Virtual Machines’ ?


Who Am I?
• Docker monitors one process, VMs have system daemons
The DevOps
running (cron, syslog, upstart, etc)
Challenge • You could run/monitor a process manager (e.g.
Beyond VMs supervisord)
The How of
Docker • Let’s consider separation of concerns
Docker 101 • Given: Containers are light, VMs are heavy
Docker • It’s unlikely you allocate two VMs and communicate - you
Examples
shove your entire ecosystem into a single VM
Docker Limits • This jumbles concerns together and reduces
Hadoop Demo maintainability, predictability, and security
Conclusions
• Containers emulate processes, VM’s emulate machines
• Often ‘Dev’ means you work inside the container, and
‘Ops’ means you work outside the container

March 2014 34 / 43
Docker and Hadoop

Who Am I?
What do I need?
The DevOps • Development Environment
Challenge
• With full source code / docs
Beyond VMs
• Good base image for configuring IDE
The How of
• Production Environment
Ubuntu:12.04
Docker

Docker 101 • Minimal Hadoop footprint Java


Docker • All dependencies
Examples
• Native 64-bit libraries Hadoop Hadoop
Docker Limits
• Commonalities?
Development Production

Hadoop Demo

Conclusions
• Yes, Java
• Ok, so three images: Java, Dev,
Production

March 2014 35 / 43
Developing Oracle Java7 Image

Who Am I?

The DevOps
Challenge

Beyond VMs • Need to base our image on a stable parent


The How of
Docker • Need to carefully record our steps
Docker 101
• Want to share this with all developers
Docker
Examples • Use Dockerfile!
Docker Limits

Hadoop Demo

Conclusions

March 2014 36 / 43
Who Am I?

The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 37 / 43
Developing Hadoop-Dev Image

Who Am I?

The DevOps
Challenge • Build on top of Java7 image
Beyond VMs
• Install build tools
The How of
Docker • Install hadoop build dependencies
Docker 101
• Run build process
Docker
Examples
• Of Note: This image is huge! > 1GB due to all the build
Docker Limits
dependencies downloaded by maven
Hadoop Demo

Conclusions

March 2014 38 / 43
Developing Hadoop Docker

Who Am I?

The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 39 / 43
Developing Hadoop Image

Who Am I? • Use docker cp to extract the tar from hadoop-dev


The DevOps
Challenge • Add that to hadoop, extract tar file
Beyond VMs • Update environment PATH
The How of
Docker • Install SSH server
Docker 101 • Pull in configuration files
Docker
Examples • Automatically start SSH, hadoop processes
Docker Limits
Final product is online at
Hadoop Demo

Conclusions
github.com/hamiltont/hadoop-docker

March 2014 40 / 43
Developing Hadoop Docker

Who Am I?

The DevOps
Challenge

Beyond VMs

The How of
Docker

Docker 101

Docker
Examples

Docker Limits

Hadoop Demo

Conclusions

March 2014 41 / 43
Conclusions: Who and What is Docker

Officially, Docker is...


Who Am I?
• Open Source, 200+ contributors
The DevOps
Challenge • Corporate parent named Docker as well ;-)
Beyond VMs
• Very active IRC + mailing lists
The How of
Docker • A project to combine and standardize existing features of
Docker 101
Linux
Docker
Examples Unofficially, Docker is...
Docker Limits
• The forefront in Linux Containers
Hadoop Demo
• A huge step beyond current VM’s w.r.t. machine
Conclusions
utilization and DevOps workflow
• A pragmatic improvement that is here to stay

March 2014 42 / 43
Thank You For Your Time

Who Am I?

The DevOps
Challenge
Questions?
Beyond VMs

The How of
Docker

Docker 101 Please feel free to reuse/modify presentation if you wish, just
Docker
Examples
remember to leave my name in there somewhere. It’s online at
Docker Limits https://github.com/hamiltont/intro-to-docker
Hadoop Demo

Conclusions

March 2014 43 / 43

S-ar putea să vă placă și