http://clusterup.io@clusterupio
Host: Chhavi UpadhyayCo-founder at [email protected]
Presenter: Ranjan Parthasarathy Co-founder at [email protected]
http://clusterup.io@clusterupio
ClusterUP is a private cloud solution for DevOps build on containers❖ Find more about us at http://clusterup.io
❖ You can try our product at http://cloud.clusterup.io
❖ For updates, pl. follow us on twitter at http://twitter.com/clusterupio / @clusterupio
http://clusterup.io@clusterupio
Agenda for Meetup 5/28● Short intro about ClusterUP
● Beginners introduction to containers, Docker
● Understand the Docker tool chain
● Go through simple use cases for creating single, multi container
applications and considerations for real world use
● Q&A and Discuss use cases for next/future meetups
http://clusterup.io@clusterupio
● Containers are an operating system-level virtualization technology that allows a
physical server to run multiple isolated operating system instances, called
containers
● No device emulation like in hypervisors - think of chroot on steroids with much
better isolation & resource control
● Unlike VM’s, separate kernel per instance is not required
● Several implementations have existed historically, not a new technology by any
means
○ Linux - LXC, OpenVZ, libcontainer
○ BSD jails, Solaris containers
Containers, a bit of history
http://clusterup.io@clusterupio
Re-using a slide from a Nov 2013 Docker presentation
http://clusterup.io@clusterupio
What’s with Docker & ContainersDocker is an open platform for developers and sysadmins to build, ship, and
run distributed applications.
➢ It works with LXC and has it’s own Go implementation for container
creation: libcontainers
Docker also solved several keys pain points above the container layer
1. Package application and its dependencies with a layered approach2. Allow for easy distribution of the image through a central repository3. docker daemon and CLI to run instances of the image in a container
http://clusterup.io@clusterupio
Four official tools for general use
➢ docker cli and daemon - download and run an application in a
container (v1.6)
➢ compose - run multiple containers (v1.2)
➢ swarm - connect to multiple dockers on multiple hosts (v0.3-rc1)
➢ machine - create docker ready hosts (v0.2)
http://clusterup.io@clusterupio
Create a memcached container using docker
http://clusterup.io@clusterupio
docker downloads the memcached image: binary, and it’s root file system with dependencies from the public registry and runs it
memcached isnow running
http://clusterup.io@clusterupio
Looking at container details
http://clusterup.io@clusterupio
● pause● unpause● stop● restart● rm● kill
http://clusterup.io@clusterupio
Create a multi container application using Docker compose e.g. Wordpress
http://clusterup.io@clusterupio
Before compose….
docker run --name db -e MYSQL_ROOT_PASSWORD=dbpassword -e MYSQL_USER=dbuser -e MYSQL_PASSWORD=dbpassword -r MYSQL_DATABASE=wordpress -d mysql
docker run --name db -e WORDPRESS_DB_PASSWORD=dbpassword -e WORDPRESS_DB_USER=dbuser -e WORDPRESS_DB_NAME=wordpress --link db:mysql -p 0.0.0.0:9000:80 -d wordpress
1
2
Creating a wordpress service with a web tier and a database backend
http://clusterup.io@clusterupio
Then Docker acquired fig ( compose )[root@localhost ~]# cat docker-compose.yml
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD : dbpassword
MYSQL_USER : dbuser
MYSQL_PASSWORD : dbpassword
MYSQL_DATABASE : wordpress
wordpress:
image: wordpress
environment:
WORDPRESS_DB_PASSWORD : dbpassword
WORDPRESS_DB_USER : dbuser
WORDPRESS_DB_NAME : wordpress
links:
- db:mysql
ports:
- "0.0.0.0:9000:80"
Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment
http://clusterup.io@clusterupio
➢ Users need ability to launch on multiple servers vs do it one at a time
on each server
○ Typical USE CASE e.g. - update test automation suite on multiple test servers
○ Servers could be on-premise, public cloud providers➢ Multiple users could be creating and maintaining scripts
○ Version control system will be needed to manage workflow➢ Configuration mgmt - Dev vs QA vs UAT vs Production
➢ Gathering and reporting of status, logs for all containers
http://clusterup.io@clusterupio
Configuration mgmt and versioning
Run on multiple hosts
http://clusterup.io@clusterupio
Clustering is a natural extension● Running docker on 1 server, now want to run on more
● How to manage all of them together
Docker’s answer is swarm and currently in beta
ClusterUP has a GUI + CLI approach to build and manage clusters● Like swarm, talks directly to the docker API
● Manage servers across clouds
● Compatible with CLI tools, performs autodiscovery e.g. docker / compose can be used from
the CLI, ClusterUP will auto detect and show in GUI
http://clusterup.io@clusterupio
Dockerfile, Compose file overview
Building Images
Getting container logs
User management
Security
Looking at running processes inside a container
Docker machine, swarm
Private registries
Advanced orchestration - multi step, multi-host
Managing storage
Monitoring
Continuous integration
● Jenkins● ClusterUP
Creating a private cloud
● Load Balancing with ClusterUP● Kubernetes
http://clusterup.io@clusterupio
Find us - http://clusterup.io
E-mail us with agenda topics and/or use cases to research at [email protected]