SlideShare a Scribd company logo
And cloudStack
Sebastien Goasguen
Seattle, August 20th
@sebgoa
Background
• Citrix Open Source
Architect
• VP of Apache
CloudStack
• PMC of Apache libcloud
• ASF member
• O’Reilly author of the
Docker cookbook
Stop the press
•Docker is super cool
•It’s changing the way we design and manage
applications
•It may change the way we build infrastructure
systems
• Docker engine
• Docker compose
• Docker machine
• Docker Swarm
• Docker Toolbox
• Docker Network
• A VM orchestrator
• Same as Opennebula/OpenStack/Eucalyptus
• Made to build a public or private cloud
• Hypervisor agnostic
• Multi-tenancy
• Network and Storage plugins
• API
Integration points
• Docker in CloudStack guests
• Package CloudStack as a set of containers
• Docker orchestrators
• Docker as plumbing
Docker in cloudstack VM
Where do you run Docker ?
• On VMs
• In a Public cloud
• Guests with Docker engine
• “Docker templates”
Offer those in your cloud
Machine
• One binary to create a remote Docker host
and setup the TLS communication with your
local docker client.
• Automates the TLS setup and the
configuration of the local environment
• Can manage multiple machines in different
clouds at the same time
CloudStack and Machine
• Many drivers (i.e exoscale )
• Generic CloudStack driver needs love
$ ./docker-machine create -d exoscale foobar
INFO[0000] Creating SSH key...
INFO[0001] Creating exoscale...
INFO[0005] Waiting for SSH...
INFO[0072] Configuring Machine...
Cloudstack in docker containers
CloudStack installation
• Docker is great to package distributed
applications
• Why not package CloudStack in Docker.
• Running CloudStack would be just about
running a few containers.
Docker to Package CloudStack
cloudstack/simulator
cloudstack/management_centos6
cloudstack/cloudmonkey
cloudstack/marvin
cloudstack/ec2stack
Dockerfiles
• All CloudStack repositories now have
Dockerfiles
• Automated builds setup on Jenkins and
Docker hub
• Need to work on bootstrap process
• Decoupling DB
• …
Docker Compose
• One binary to start/manage multiple
containers and volumes on a single Docker
host
• Move your lengthy docker run
commands to a YAML file
e.G YAML description
wordpress:
image: wordpress
links:
- mysql
ports:
- "80:80"
environment:
- WORDPRESS_DB_NAME=wordpress
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpresspwd
mysql:
image: mysql
volumes:
- /home/docker/mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=wordpressdocker
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpresspwd
CloudStack ?
cloudstack:
image: cloudstack/management
links:
- mysql
ports:
- "8080:8080”
mysql:
image: mysql
volumes:
- /home/docker/mysql:/var/lib/mysql
…
ec2:
image: cloudstack/ec2stack
ports:
- “5000:5000”
The Agent
• In the case of KVM, we need to run a KVM
agent
• Need to run the agent in a container, and use
it to spawn KVM processes in the host
• Easy integration with CloudStack, there are
more involved scenarios.
Docker orchestrators
Docker orchestrators
• How to manage docker containers on multi-
host ?
• Docker swarm, Lattice, kubernetes, Rancher
• Should CloudStack orchestrates containers ?
How about Swarm ?
• You can create a swarm
cluster with docker-
machine
• Hence, it’s easy to
create a Swarm in
CloudStack
How to deploy apps in clouds
• Configuration mgt
• Terraform
• Recipes to deploy Kubernetes, Rancher and
Lattice
• Terraform plans to deploy Lattice and
Kubernetes on CloudStack
Philosophy
• CloudStack manages VM
• Let’s do it well
• Let something else manage containers
• Can’t keep up with the velocity of Kubernetes
• If AWS builds ECS on top of EC2 why should
we do it differently
Docker plumbing
Not only containers
• Docker is also becoming a great tool for
plumbing infra
• Docker network
– Allows you to create VXLAN overlays
– Plugins, including OVS plugin
• Use Docker network as a new network
provider in cloudstack
Letting loose a bit …
What if ?
• CloudStack is a distributed app
• CloudStack components all run in containers
• We use docker network to isolate users’s VM
• Why not run the VMs in containers as well
(i.e KVM process in a namespace and
cgroups)
• What manages CloudStack then ? A container
application
Rancher on Mesos
CloudStack 5.0
• CloudStack as a Mesos framework is totally
doable (e.g KVM executor )
• Kubernetes has the same lineage as Mesos (i.e
Borg)
• How about CloudStack in Kubernetes ?
– Why not. GCE is a Kubernetes app
What gives ?
• Docker on cloudstack ?
• Cloudstack on docker ?
• Boils down to the unit of scheduling in your
data center
• Do you prefer to schedule VMs or
containers ?
Conclusions
• Docker is super cool
• We already have integration points in CloudStack
• Room for more and room for your help
• What the future is made of…we will see soon
enough !

More Related Content

Docker and CloudStack

  • 2. Background • Citrix Open Source Architect • VP of Apache CloudStack • PMC of Apache libcloud • ASF member • O’Reilly author of the Docker cookbook
  • 3. Stop the press •Docker is super cool •It’s changing the way we design and manage applications •It may change the way we build infrastructure systems
  • 4. • Docker engine • Docker compose • Docker machine • Docker Swarm • Docker Toolbox • Docker Network
  • 5. • A VM orchestrator • Same as Opennebula/OpenStack/Eucalyptus • Made to build a public or private cloud • Hypervisor agnostic • Multi-tenancy • Network and Storage plugins • API
  • 6. Integration points • Docker in CloudStack guests • Package CloudStack as a set of containers • Docker orchestrators • Docker as plumbing
  • 8. Where do you run Docker ?
  • 9. • On VMs • In a Public cloud • Guests with Docker engine • “Docker templates”
  • 10. Offer those in your cloud
  • 11. Machine • One binary to create a remote Docker host and setup the TLS communication with your local docker client. • Automates the TLS setup and the configuration of the local environment • Can manage multiple machines in different clouds at the same time
  • 12. CloudStack and Machine • Many drivers (i.e exoscale ) • Generic CloudStack driver needs love $ ./docker-machine create -d exoscale foobar INFO[0000] Creating SSH key... INFO[0001] Creating exoscale... INFO[0005] Waiting for SSH... INFO[0072] Configuring Machine...
  • 13. Cloudstack in docker containers
  • 14. CloudStack installation • Docker is great to package distributed applications • Why not package CloudStack in Docker. • Running CloudStack would be just about running a few containers.
  • 15. Docker to Package CloudStack cloudstack/simulator cloudstack/management_centos6 cloudstack/cloudmonkey cloudstack/marvin cloudstack/ec2stack
  • 16. Dockerfiles • All CloudStack repositories now have Dockerfiles • Automated builds setup on Jenkins and Docker hub • Need to work on bootstrap process • Decoupling DB • …
  • 17. Docker Compose • One binary to start/manage multiple containers and volumes on a single Docker host • Move your lengthy docker run commands to a YAML file
  • 18. e.G YAML description wordpress: image: wordpress links: - mysql ports: - "80:80" environment: - WORDPRESS_DB_NAME=wordpress - WORDPRESS_DB_USER=wordpress - WORDPRESS_DB_PASSWORD=wordpresspwd mysql: image: mysql volumes: - /home/docker/mysql:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=wordpressdocker - MYSQL_DATABASE=wordpress - MYSQL_USER=wordpress - MYSQL_PASSWORD=wordpresspwd
  • 19. CloudStack ? cloudstack: image: cloudstack/management links: - mysql ports: - "8080:8080” mysql: image: mysql volumes: - /home/docker/mysql:/var/lib/mysql … ec2: image: cloudstack/ec2stack ports: - “5000:5000”
  • 20. The Agent • In the case of KVM, we need to run a KVM agent • Need to run the agent in a container, and use it to spawn KVM processes in the host • Easy integration with CloudStack, there are more involved scenarios.
  • 22. Docker orchestrators • How to manage docker containers on multi- host ? • Docker swarm, Lattice, kubernetes, Rancher • Should CloudStack orchestrates containers ?
  • 23. How about Swarm ? • You can create a swarm cluster with docker- machine • Hence, it’s easy to create a Swarm in CloudStack
  • 24. How to deploy apps in clouds • Configuration mgt • Terraform • Recipes to deploy Kubernetes, Rancher and Lattice • Terraform plans to deploy Lattice and Kubernetes on CloudStack
  • 25. Philosophy • CloudStack manages VM • Let’s do it well • Let something else manage containers • Can’t keep up with the velocity of Kubernetes • If AWS builds ECS on top of EC2 why should we do it differently
  • 27. Not only containers • Docker is also becoming a great tool for plumbing infra • Docker network – Allows you to create VXLAN overlays – Plugins, including OVS plugin • Use Docker network as a new network provider in cloudstack
  • 28. Letting loose a bit …
  • 29. What if ? • CloudStack is a distributed app • CloudStack components all run in containers • We use docker network to isolate users’s VM • Why not run the VMs in containers as well (i.e KVM process in a namespace and cgroups) • What manages CloudStack then ? A container application
  • 31. CloudStack 5.0 • CloudStack as a Mesos framework is totally doable (e.g KVM executor ) • Kubernetes has the same lineage as Mesos (i.e Borg) • How about CloudStack in Kubernetes ? – Why not. GCE is a Kubernetes app
  • 32. What gives ? • Docker on cloudstack ? • Cloudstack on docker ? • Boils down to the unit of scheduling in your data center • Do you prefer to schedule VMs or containers ?
  • 33. Conclusions • Docker is super cool • We already have integration points in CloudStack • Room for more and room for your help • What the future is made of…we will see soon enough !