Running Docker on Windows Azure

Report
Windows Azure
Conference 2014
Windows Azure Conference 2014
Running Docker on
Windows Azure
The Current State of Cloud
•
•
•
•
•
•
•
IaaS has rapidly evolved in the last 3 years
PaaS has matured into enterprise PaaS
VMs are not portable across the IaaS vendors
Every PaaS vendor follows a different deployment format
IaaS needs Ops support
DevOps is picking momentum
There is an opportunity to make deployments more
efficient
Windows Azure Conference 2014
Windows Azure Conference 2014
Windows Azure Conference 2014
Cargo – Pre 1960
Windows Azure Conference 2014
How Shipping Container Solved the Problem
Windows Azure Conference 2014
6
Software deployment is no different
Windows Azure Conference 2014
7
The Matrix from Hell
Windows Azure Conference 2014
8
Container Eliminates the Matrix from Hell
Windows Azure Conference 2014
9
Docker is the Shipping Container for Code
Windows Azure Conference 2014
10
Introducing Docker
• Open source engine to automate the deployment of any
application as a lightweight, portable, self-sufficient container
to run virtually anywhere
• Containers encapsulate any payload and consistently run on
any server
• Common use cases for Docker include:
–
–
–
–
Automating the packaging and deployment of applications
Creation of lightweight, private PAAS environments
Automated testing and continuous integration/deployment
Deploying and scaling web apps, databases and backend services
Windows Azure Conference 2014
Separation of Concerns
Ops worry about what’s
outside the container
• Logging
• Remote Access
• Monitoring
• Network configuration
All containers start, stop,
attach and migrate the same
way
Developers worry about
what’s inside the container
• Code
• Libraries
• Package Manner
• Apps
• Data
All Linux servers look the same
Windows Azure Conference 2014
Installing Docker
sudo apt-get update
sudo apt-get -y install linux-image-generic-lts-raring linux-headers-generic-lts-raring
sudo reboot
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list”
sudo apt-get update
sudo apt-get -y install lxc-docker
Windows Azure Conference 2014
Demo
Installing Docker on Azure VM
Windows Azure Conference 2014
Windows Azure Conference 2014
What’s in it for Developers?
• Build once run anywhere
– Clean, safe, hygienic and portable runtime for your app
– No worries about missing dependencies and packages during
deployment
– Safely isolate applications in their own containers without worrying
about conflicting versions, dependencies and packages
– Automate everything – integration, packaging and deployment
– Eliminate concerns about OS, platform and runtimes
– Deploy in a VM without the overhead of VM
– Instant replay and reset of image snapshots
Windows Azure Conference 2014
What’s in it for DevOps?
• Configure once…run everywhere
– Make the lifecycle more efficient, consistent and repeatable
– Increased the quality of code produced by developers
– Efficiently manage development, test, staging and production
environments
– Separate roles & responsibilities
– Significantly improve the reliability of continuous integration and
continuous delivery
– Simpler than managing VMs in terms of cost, performance, deployment
and portability
Windows Azure Conference 2014
Virtual Machine and Containers
• Virtual Machine
– Allow Multiple Guest OS to run together on a single
machine
– Each Guest OS abstracts Compute, Storage and Network
Components
– Hypervisor itself could run on bare-metal (ESXi) or be part
of an OS (KVM)
– Guest ISA is translated to Host ISA using multiple
techniques like Hardware Virtualization or Binary
Translation
Windows Azure Conference 2014
Virtual Machine and Containers
•
Containers
– Light weight containment system
running
– Runs instructions native to the core
CPU
– Container shares the Kernel and
Process scheduler with the Host OS
– No Binary Translation or VM exits
– Containers can be run either directly on
the Host OS or in a Guest VM
Windows Azure Conference 2014
Container vs. Virtual Machines
Containers are isolated but share OS and, where appropriate, binaries and libraries
Containers offer significantly faster
deployment, lesser overhead, easier
migration and faster restart
Windows Azure Conference 2014
Why are Docker Containers Lightweight?
VMs
Containers
Original App
(No OS to take up
space)
Every app, every copy of an
app and modifications of
the app requires a new
image
Windows Azure Conference 2014
Copy of the App
(No OS. Shares
Bins/Libs)
Modified App
Contains the diff
between original
container
How Docker Works?
Windows Azure Conference 2014
Changes and Updates
Windows Azure Conference 2014
Docker Terminology
• Image
– Read only layer used to build a container
• Container
– Self contained runtime environment that is built using one or more
images
• Index / Registry
– Public or private servers to share images
• Repository
– Group of images located in the Docker registry
Windows Azure Conference 2014
Building your first Docker Image
sudo docker pull ubuntu
sudo docker images
sudo docker run –i –t ubuntu /bin/bash
sudo docker ps
sudo docker commit <id> <repository:tag>
sudo docker push <name>
Windows Azure Conference 2014
Demo
Building an Image
Windows Azure Conference 2014
Windows Azure Conference 2014
Current State of Docker
• Cloud Foundry and Red Hat OpenShift evaluating Docker
• 10+ startups built on Docker
• Official support for AWS, GCE, Rackspace
Windows Azure Conference 2014
Resources
• https://www.docker.io/gettingstarted/
• http://www.slideshare.net/rajdeep/conferencepresentationv3
Windows Azure Conference 2014
Windows Azure Conference 2014
Windows Azure Conference 2014

similar documents