inSync Cloud & Docker
An experiment in Predictability & Scalability
Faisal Puthuparackat <faisal@druva.com>
Objectives
- Run inSync cloud on your laptop
- Accessible on the local network
- Use Docker to streamline and speed deployment
- Address some issues faced by current inSync Cloud deployments
Minimum inSync Cloud
- 2 types of machines: CloudMaster & Nodes
- Needs MySQL or RDS
- Needs DynamoDB or Bynamo
- Needs S3/Object Store/Shared FS
inSync Cloud
Each Cloud Node...
- Runs Ubuntu 10.04 LTS
- Uses tarballs for python, bdb libs and sources
- Config is stored in /etc/inSync* folders
- App logs => syslog-ng => /var/log
- Python scripts (fabric) for deployment/management
- A machine is one functional unit.
Issues with current inSync Cloud deployments
-
Security issues => upgrade packages on machines
-
Rolling upgrade of components not possible
-
Deployments diverge from each other over time
Enter Docker.
Containers for virtualization
Like “chroot” on steroids
Private namespaces
Works using filesystem layers
With COW fs layers on top of that
FS layers repository
Virtual Machine
- One whole copy of OS runs inside each VM.
Docker
- Contains just App and dependencies
- Runs in userspace in host OS
inSync + Docker
- Single VM on Win/Mac
- No VM needed on Linux
- Each entity in it's own container
- DNS resolution using Amazon's Route53
Example Containers
Each container image tagged with release revision number
What about the cloud?
-
Each container = OS Base + Libs + Python + Code
-
Each docker image tagged by version
-
OS/Lib Upgrade handled within container
-
Salt-stack has docker support - so everyone’s happy
Pets vs Sheep
You can never truly achieve scale in the cloud unless you can stop treating your servers as pets and start treating them as sheep.
~ Author unknown
Docker is a step in converting our pets into sheep.
I want it now!!!!
Quickstart guide
1. Checkout trunk
2. Set your cloud name: contrib/vcloud-docker/config.rb
$cloudname = "fcloud"
3. Fire up vagrant. Should complete in 2-4 mins...
$ vagrant up
-------------------------------------------------------------------------------
Your cloud name is set to: fcloud.drtst.org
-------------------------------------------------------------------------------
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'http://devsource/lcloud/boxes/boot2docker-1.2.box'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vcloud-docker_default_1415606582509_8383
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
-------------------------------- snipped --------------------------------------
==> default: Spinning up container: node
==> default: Spinning up container: master
==> default: Spinning up container: haproxy
$
4. Wait a couple minutes for DNS to propagate. You're done!
For more info...
Please check http://genie/wiki/Your+Cloud for detailed usage information and other tips...
Questions ???
VcloudDocker-v2
By faisyl
VcloudDocker-v2
- 478