Upload
yeshwanth-kumar
View
76
Download
3
Embed Size (px)
Citation preview
Orchestration of docker containers at scale
Yeshwanth KumarPlatform EngineerMegam Systems
Agenda
1. what is docker?2. Docker clustering with
swarm3. Deployment methods4. Some code5. Demo
What is docker?!?
Docker is an open platform for building, shipping and running distributed applications. It gives programmers, development teams and operations engineers the common toolbox they need to take advantage of the distributed and networked nature of modern applications.
Note:
● build, ship and run distributed applications
● common toolbox for all - dev, test, prod
Container vs VM
VM Containers
Why use docker?!?
- Development environment is same as prod environment
- Develop with docker - No dependency hell
- Deployment is a breeze
- Lightweight
- High portability
- Microservices
Swarm - Introduction
● Native clustering service
● container scheduling made easy
● scales well
● Works with all existing Docker Tools
Clustering with swarm
1. Swarm Master● Create cluster● Start swarm master● Join nodes
2. Swarm Node(s)● Run docker engine
in daemon mode● Make sure all nodes
are joined
$swarm create$swarm manage $swarm join
$docker -H <nodeIP>:2375 -d $docker -H <nodeIP>:2375 -d
SwarmMaster
Node Node
Clustering with swarm
megam cloud
platform
Host 1
Host 2
Host 3
service discovery
docker API
Op
en
VS
witch
logs & monitoring
Registries(docker hub or quay)
megam PaaS engine
Docker Provisioner Baremetal
DockerBox (containers inside a VM)
//docker remote API works with swarm
client, _ := docker.NewClient(endpoint)
container, conerr := client.CreateContainer(copts)if conerr != nil {
log.Error("Container creation failed : %s", conerr)return &global.Container{}, conerr
}
Docker Remote API
Demo time
Questions?Yeshwanth Kumar
Platform EngineerMegam Systems(www.megam.io)
Twitter: @morpheyeshEmail: [email protected]
Docs: docs.megam.ioDevcenter: devcenter.megam.io