docker: herding your cattle from dev to ops
TRANSCRIPT
“”
It’s pretty much the best thing for cloud computing
since the movement from bare metalto virtual machines
Ho Ming Li (DockerCon 2014 attendant)
“”
Docker aims to reduce the cycle time between
code being writtenand code being tested, deployed, and
used.
James Turnbull (author of The Docker Book)
“”
Docker is one of those technologies that, without any great fuss and without anyone
noticing, is now everywhere. […]I wouldn’t call Docker a “Swiss Army Knife”— it has so many more uses than that.
Dr Mike Norman (Cloud Services Architect @ JP Morgan)
#whoami
• DevOps engineer
• Linux, middleware & cloudtechnologies
• 18+ yrs IT experience
• Docker trainer @ Amazic
DevOps means giving a shit about your job enough
to want to learn all the parts and not just your little world.
John E. Vincent (blog.lusis.org)
“”
The real value of Docker is not technology, it’s getting people to agree on something.
Solomon Hykes (Founder of Docker)
“”
What is Container Virtualisation?
• Alternative to “traditional” virtualisation on Hypervisors such as VMWare
• No guest operating system (or booting) required for containers
• Virtualisation layer runs as an application inside the host OS
• Sandboxed execution environment
• Lightweight, high performance (especially on bare metal hardware)
Where does Docker fit in?
• Built on top of Linux container technology (LXC, AUFS)
• Provides tools to build, run, share and version “images”
• Handles communication between running “containers” (network, fs)
• Docker containers run practically everywhere
• Extremely reproducible; you could start from scratch every time!
Images versus Containers
• Docker images consist of one or more read-only layered file-systems
• The bottom layer is called the base image (Linux kernel, e.g. Red Hat)
• A Dockerfile is the equivalent of a build file to create an image
• Docker containers are the running, stateful instances of images
• Modified containers can also be committed back to images
FROM jboss/wildfly
MAINTAINER Bastiaan Schaap <http://github.com/siteminds>
RUN /opt/jboss/wildfly/bin/add-user.sh --silent admin admin
ADD sample.war /opt/jboss/wildfly/standalone/deployments/
EXPOSE 8080EXPOSE 9990
Sample Dockerfile
Pros
• Standardized way of getting code from development to production
• Easy to use DevOps workflow
• Fast container startup
• Isolation of processes and their configuration
Cons
• Very easy to do, can be very hard to do right
• Networking can be difficult
• Ecosystem evolving (rapidly)
• Which orchestration tools/platforms/frameworks to use