SlideShare a Scribd company logo
For Multi-Cloud Apps
Docker
Adrian Otto
•Principal Architect, Rackspace
•Chair of OpenStack Containers Team
•PTL of Magnum (Containers-as-a-Service for OpenStack)
•PTL of Solum (CI/CD for OpenStack)
•Co-Chair of OASIS CAMP TC (Cloud Standards)
Containers for Multi-Cloud Apps
3www.rackspace.com
21
App
Yes, Cloud Portability
App 2
No, Don’t Straddle Clouds
1
Writing Portable Cloud Apps
•Fog (Ruby)
•Apache Libcloud (Python)
•Apache Jclouds (Java)
•Gophercloud (Go)
•…
Handling Existing Apps - Overview
• Containerize
– Use a Dockerfile to create a container image
– Store the image in a repository
• Run Docker on your cloud servers
• Back up your data to storage in the target cloud
• Load your app image from the repo to run it
• Load your data from your backup
8www.rackspace.com
Yeah, but what if…
I have a *lot* of
cloud servers
I have a *lot* of
data!
My app needs a
separate database
server
What’s Docker?
What’s an image
repository?
What’s a
Dockerfile?
Docker for Multi-Cloud Apps
What’s Docker?
• Allows for simplified management of containers
– CLI, API
– Example: docker run -p 80:80 web:latest
• Docker container is an amalgam
Cgroups Namespaces Image
Docker
Container
What’s a Dockerfile?
FROM centos
MAINTAINER aotto@aotto.com
RUN yum -y install httpd
EXPOSE 80
ADD start.sh /start.sh
CMD /start.sh
What’s an image repository?
• A place to store Docker container images
• Works just like a Git repository
– docker pull <name>
– docker push <name>[:<tag>]
I have a *lot* of cloud servers
•You need a utility with a resource scheduler
–Nova, Magnum, Kubernetes, Mesos, Swarm, etc.
•Treat application servers like cattle
–Create them from container images using automation
My app needs a separate database server
• Your database is also an app
• Bind mount your data volume from the host
–Example:
•docker run -v /data/my_app:/my_app –p 3306:3306 mysql:latest
• All prevailing orchestration systems allow you to define prerequisites.
• Using Heat
–Output of one resource can be the input to another.
Example HOT File with Dependency
resources:
server1:
type: OS::Nova::Server
depends_on: database_server
database_server:
type: OS::Trove::Instance
properties: …
I have a *lot* of data
•Don’t put “data” in containers
•Replicate your data in each target cloud
•Use prevailing techniques for incrementally streaming
changes to your replicas
•Bind mount your data volume(s) to your container(s)
Swarm - https://github.com/docker/swarm
• Exposes a cluster of Docker hosts as one virtual host
• Provides a Docker API
• Includes Resource Scheduling
– Filters: Constraint, Affinity, Port, Health
– Strategies: Bin Packing, Random
• A swarm agent runs on each Docker host
Swarm == Cool.
• Combined view of multiple cloud hosts
• Ability to selectively run containers on any of them
CLI Swarmd 2
1
N
Best Practice: Clouds want cattle, not pets.
How do I make cattle?
• Have a Dockerfile for each app
• Create Docker Images
• Deploy applications in containers
• Use scripted orchestration for app deployment
– Heat, Ansible, Chef, Puppet, etc.
• Use a centralized log scheme
– Logstash, Greylog, Kibana, etc.
Best Practice: Immutable Infrastructure
•Run the same artifacts everywhere
–Test
–Staging
–Production
•Rationale
–Less chance of environmental drift
–Helps you to bridge the gap from pets to cattle
23
Docker Topologies
www.rackspace.com
Hardware Hardware
VM
Kernel
Docker
Hypervisor
VM
Kernel Kernel
Docker Docker
C C
C C C C
C = Container
Bare Metal – Single Tenant Virtualized – Multi-Tenant
•Do it by hand
•Use a VM image with a docker daemon in it
•docker-machine - https://github.com/docker/machine
– Start machines on Cloud Servers
•AWS, Azure, Digital Ocean, GCE, Hyper V, Softlayer, Rackspace, OpenStack,
VMWare vCloud Air, VMWare vSphere, Microsoft Windows (+caveat)
– Start machines on bare metal (OnMetal Flavors from Rackspace)
•But wait… there’s MORE!!!
24
Where do babies come from?
www.rackspace.com
$ export OS_REGION_NAME=IAD
$ export OS_USERNAME=jdoe
$ export OS_API_KEY=735590eaa1646e3ae79e6babbb7fd29f
$ docker-machine create -d rackspace demo
…
$ $(docker-machine env demo)
$ docker run -d centos:centos7 sleep 1d
…
873f3fa9e2924a4ef1de114628491af4026837f6cc2be8813f9515e532ad2c74
$
25
Use docker-machine to create VMs with Docker
www.rackspace.com
$ docker-machine create -d virtualbox foo
$ $(docker-machine env foo)
$ docker run --rm swarm create
ca6d7ef5272e0237b538cd685c26740d
$ docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://ca6d7ef5272e0237b538cd685c26740d
swarm-master
$ $(docker-machine env --swarm swarm-master)
$ docker-machine create -d virtualbox --swarm --swarm-discovery token://ca6d7ef5272e0237b538cd685c26740d swarm-node-00
$ docker-machine create -d virtualbox --swarm --swarm-discovery token://ca6d7ef5272e0237b538cd685c26740d swarm-node-01
26
Use docker-machine to create swarms
www.rackspace.com
THANK YOU
RACKSPACE® | 1 FANATICAL PLACE, CITY OF WINDCREST | SAN ANTONIO, TX 78218
US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM
© RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED S TATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM

More Related Content

PDF
Using Docker with OpenStack - Hands On!
PDF
Magnum first-class-resource
PDF
OpenStack Magnum
PDF
OpenStack Magnum 2016-08-04
PDF
Kubernetes 101 and Fun
PDF
What's really the difference between a VM and a Container?
PDF
Orchestrating Docker with OpenStack
PPTX
Docker and kubernetes
Using Docker with OpenStack - Hands On!
Magnum first-class-resource
OpenStack Magnum
OpenStack Magnum 2016-08-04
Kubernetes 101 and Fun
What's really the difference between a VM and a Container?
Orchestrating Docker with OpenStack
Docker and kubernetes

What's hot (20)

PDF
Webinar container management in OpenStack
PPTX
Openstack Magnum: Container-as-a-Service
PPTX
Scaling Docker Containers using Kubernetes and Azure Container Service
PPTX
Introduction kubernetes 2017_12_24
PPTX
Docker & Kubernetes intro
PDF
Scaling Microservices with Kubernetes
PDF
Bug smash day magnum
PDF
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
PDF
Kubernetes 101
PPTX
Kubernetes 101
PDF
Kubernetes
PDF
Docker and Kubernetes 101 workshop
PDF
Rex gke-clustree
PDF
DevOps in AWS with Kubernetes
PDF
kubernetes for beginners
PDF
Nebulaworks Docker Overview 09-22-2015
PDF
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
PDF
Kubernetes Hands-On Guide
PDF
Kubernetes automation in production
PPTX
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Webinar container management in OpenStack
Openstack Magnum: Container-as-a-Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Introduction kubernetes 2017_12_24
Docker & Kubernetes intro
Scaling Microservices with Kubernetes
Bug smash day magnum
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Kubernetes 101
Kubernetes 101
Kubernetes
Docker and Kubernetes 101 workshop
Rex gke-clustree
DevOps in AWS with Kubernetes
kubernetes for beginners
Nebulaworks Docker Overview 09-22-2015
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Hands-On Guide
Kubernetes automation in production
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Ad

Similar to Docker for Multi-Cloud Apps (20)

PPTX
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
PDF
Introduction to Docker and Monitoring with InfluxData
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
PPTX
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
PPTX
OpenStack Summit
PPTX
Docker In Brief
PDF
Containers, Docker, and Microservices: the Terrific Trio
PDF
Docker and OpenStack Boston Meetup
PDF
Docker slides
PPTX
OpenStack Boston
PPTX
Container on azure
PPTX
Docker open stack boston
PPTX
Docker introduction
PPTX
Containerization using docker and its applications
PPTX
Containerization using docker and its applications
PDF
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
PDF
Application Deployment on Openstack
PPTX
You, and Me, and Docker Makes Three
PPTX
Docker Ecosystem on Azure
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Introduction to Docker and Monitoring with InfluxData
Docker 0.11 at MaxCDN meetup in Los Angeles
"Deploying Multi-OS Applications with Docker Swarm" with Docker's David Yu
OpenStack Summit
Docker In Brief
Containers, Docker, and Microservices: the Terrific Trio
Docker and OpenStack Boston Meetup
Docker slides
OpenStack Boston
Container on azure
Docker open stack boston
Docker introduction
Containerization using docker and its applications
Containerization using docker and its applications
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Application Deployment on Openstack
You, and Me, and Docker Makes Three
Docker Ecosystem on Azure
Ad

More from Adrian Otto (6)

PDF
What's really the difference between a VM and a Container?
PDF
Build Your Own Open Source Cloud
PDF
Docker 101 2015-05-28
PDF
7 Habits of Highly Effective Contirbutors
PDF
Docker 102 - Immutable Infrastructure
PDF
Docker 101 - Intro to Docker
What's really the difference between a VM and a Container?
Build Your Own Open Source Cloud
Docker 101 2015-05-28
7 Habits of Highly Effective Contirbutors
Docker 102 - Immutable Infrastructure
Docker 101 - Intro to Docker

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Machine learning based COVID-19 study performance prediction
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Modernizing your data center with Dell and AMD
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The Rise and Fall of 3GPP – Time for a Sabbatical?
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
GamePlan Trading System Review: Professional Trader's Honest Take
Unlocking AI with Model Context Protocol (MCP)
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Modernizing your data center with Dell and AMD
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced Soft Computing BINUS July 2025.pdf
Cloud computing and distributed systems.

Docker for Multi-Cloud Apps

  • 2. Adrian Otto •Principal Architect, Rackspace •Chair of OpenStack Containers Team •PTL of Magnum (Containers-as-a-Service for OpenStack) •PTL of Solum (CI/CD for OpenStack) •Co-Chair of OASIS CAMP TC (Cloud Standards)
  • 3. Containers for Multi-Cloud Apps 3www.rackspace.com
  • 5. App 2 No, Don’t Straddle Clouds 1
  • 6. Writing Portable Cloud Apps •Fog (Ruby) •Apache Libcloud (Python) •Apache Jclouds (Java) •Gophercloud (Go) •…
  • 7. Handling Existing Apps - Overview • Containerize – Use a Dockerfile to create a container image – Store the image in a repository • Run Docker on your cloud servers • Back up your data to storage in the target cloud • Load your app image from the repo to run it • Load your data from your backup
  • 9. I have a *lot* of cloud servers I have a *lot* of data! My app needs a separate database server What’s Docker? What’s an image repository? What’s a Dockerfile?
  • 11. What’s Docker? • Allows for simplified management of containers – CLI, API – Example: docker run -p 80:80 web:latest • Docker container is an amalgam Cgroups Namespaces Image Docker Container
  • 12. What’s a Dockerfile? FROM centos MAINTAINER aotto@aotto.com RUN yum -y install httpd EXPOSE 80 ADD start.sh /start.sh CMD /start.sh
  • 13. What’s an image repository? • A place to store Docker container images • Works just like a Git repository – docker pull <name> – docker push <name>[:<tag>]
  • 14. I have a *lot* of cloud servers •You need a utility with a resource scheduler –Nova, Magnum, Kubernetes, Mesos, Swarm, etc. •Treat application servers like cattle –Create them from container images using automation
  • 15. My app needs a separate database server • Your database is also an app • Bind mount your data volume from the host –Example: •docker run -v /data/my_app:/my_app –p 3306:3306 mysql:latest • All prevailing orchestration systems allow you to define prerequisites. • Using Heat –Output of one resource can be the input to another.
  • 16. Example HOT File with Dependency resources: server1: type: OS::Nova::Server depends_on: database_server database_server: type: OS::Trove::Instance properties: …
  • 17. I have a *lot* of data •Don’t put “data” in containers •Replicate your data in each target cloud •Use prevailing techniques for incrementally streaming changes to your replicas •Bind mount your data volume(s) to your container(s)
  • 18. Swarm - https://github.com/docker/swarm • Exposes a cluster of Docker hosts as one virtual host • Provides a Docker API • Includes Resource Scheduling – Filters: Constraint, Affinity, Port, Health – Strategies: Bin Packing, Random • A swarm agent runs on each Docker host
  • 19. Swarm == Cool. • Combined view of multiple cloud hosts • Ability to selectively run containers on any of them CLI Swarmd 2 1 N
  • 20. Best Practice: Clouds want cattle, not pets.
  • 21. How do I make cattle? • Have a Dockerfile for each app • Create Docker Images • Deploy applications in containers • Use scripted orchestration for app deployment – Heat, Ansible, Chef, Puppet, etc. • Use a centralized log scheme – Logstash, Greylog, Kibana, etc.
  • 22. Best Practice: Immutable Infrastructure •Run the same artifacts everywhere –Test –Staging –Production •Rationale –Less chance of environmental drift –Helps you to bridge the gap from pets to cattle
  • 23. 23 Docker Topologies www.rackspace.com Hardware Hardware VM Kernel Docker Hypervisor VM Kernel Kernel Docker Docker C C C C C C C = Container Bare Metal – Single Tenant Virtualized – Multi-Tenant
  • 24. •Do it by hand •Use a VM image with a docker daemon in it •docker-machine - https://github.com/docker/machine – Start machines on Cloud Servers •AWS, Azure, Digital Ocean, GCE, Hyper V, Softlayer, Rackspace, OpenStack, VMWare vCloud Air, VMWare vSphere, Microsoft Windows (+caveat) – Start machines on bare metal (OnMetal Flavors from Rackspace) •But wait… there’s MORE!!! 24 Where do babies come from? www.rackspace.com
  • 25. $ export OS_REGION_NAME=IAD $ export OS_USERNAME=jdoe $ export OS_API_KEY=735590eaa1646e3ae79e6babbb7fd29f $ docker-machine create -d rackspace demo … $ $(docker-machine env demo) $ docker run -d centos:centos7 sleep 1d … 873f3fa9e2924a4ef1de114628491af4026837f6cc2be8813f9515e532ad2c74 $ 25 Use docker-machine to create VMs with Docker www.rackspace.com
  • 26. $ docker-machine create -d virtualbox foo $ $(docker-machine env foo) $ docker run --rm swarm create ca6d7ef5272e0237b538cd685c26740d $ docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://ca6d7ef5272e0237b538cd685c26740d swarm-master $ $(docker-machine env --swarm swarm-master) $ docker-machine create -d virtualbox --swarm --swarm-discovery token://ca6d7ef5272e0237b538cd685c26740d swarm-node-00 $ docker-machine create -d virtualbox --swarm --swarm-discovery token://ca6d7ef5272e0237b538cd685c26740d swarm-node-01 26 Use docker-machine to create swarms www.rackspace.com
  • 27. THANK YOU RACKSPACE® | 1 FANATICAL PLACE, CITY OF WINDCREST | SAN ANTONIO, TX 78218 US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM © RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED S TATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM

Editor's Notes

  • #17: You can also do this with fig, kubernetes, and a variety of popular orchestration tools.