Windows Azure Conference 2014
Windows Azure Conference 2014
Janakiram MSVHead – Cloud ServicesAditi Technologies@janakiramm
Running Docker on Windows Azure
Windows Azure Conference 2014
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
2
Windows Azure Conference 2014
If it’s head…
Windows Azure Conference 2014
If it’s head…
…we will switch DNS
Windows Azure Conference 2014
Cargo – Pre 1960
5
Windows Azure Conference 2014
How Shipping Container Solved the Problem
6
Windows Azure Conference 2014
Software deployment is no different
7
Windows Azure Conference 2014
The Matrix from Hell
8
Windows Azure Conference 2014 9
Container Eliminates the Matrix from Hell
Windows Azure Conference 2014
Docker is the Shipping Container for Code
10
Windows Azure Conference 2014
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
11
Windows Azure Conference 2014
Separation of Concerns
12
Developers worry about what’s inside the container• Code• Libraries• Package Manner• Apps• DataAll Linux servers look the same
Ops worry about what’s outside the container• Logging• Remote Access• Monitoring• Network configurationAll containers start, stop, attach and migrate the same way
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 2014Windows Azure Conference 2014
DemoInstalling Docker on Azure VM
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
15
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
16
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
17
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
18
Windows Azure Conference 2014
Container vs. Virtual Machines
19
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?
20
VMs
Every app, every copy of an app and modifications of the app requires a new image
Original App(No OS to take up space)
Copy of the App(No OS. Shares Bins/Libs)
Modified AppContains the diff between original container
Containers
Windows Azure Conference 2014
How Docker Works?
21
Windows Azure Conference 2014
Changes and Updates
22
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
23
Windows Azure Conference 2014
Building your first Docker Imagesudo 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 2014Windows Azure Conference 2014
DemoBuilding an Image
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
26
Windows Azure Conference 2014
Resources
• https://www.docker.io/gettingstarted/ • http://www.slideshare.net/rajdeep/conference-pres
entationv3
27
Windows Azure Conference 2014Windows Azure Conference 2014
© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.