“A Cloudy History of Time”
& Data Processing Industry
Peer to peer systems
The first datacenters!
Clouds and datacenters
• Utility computing
• Elasticity of the infrastructure
• Pay as you go
• Programmable access
• Let’s assume this is solved.
• What is not solved:
• - Application deployment
• - Application scalability
• - Application portability
• - Application composability
• Linux container (LXC +)
• Application deployment
• Image sharing via
• Ease of packaging
Building docker images
Fair use from http://blog.octo.com/en/docker-registry-first-steps/
• Apache Mesos is a resource manager and provides a
datacenter view of a cluster of machines.
• Works in a Master/Slave architecture.
• Master schedules job on slaves which is executed by an
• Masters are connected to service registry such as Zookeeper
for leader election and HA.
• Offers resources to any framework connected on top of it.
• Marathon is a scheduler/framework providing orchestration
Assigns jobs to slaves and make resource offers to framework
Runs Mesos agents. Executes tasks and provides resource
capacity to master
Leader election of Masters
Selects and schedules tasks via resource offers. Deploys
executors on agents to execute scheduled tasks
Docker Swarm Architecture
docker swarm init <<options>>
docker swarm join <<options>>
• Directly available within Docker engine from docker 1.12.
• Enable cluster setup in swarm mode with simple commands
• Create services instead of containers.
• Managers talk to workers to schedule tasks on the worker.
• Managers use Raft algorithm for leader election.
• Worker nodes communicate through gossip protocol.
• In built support for Service Registry and discovery.
• No need for external services like consul, etcd.
• In built Load balancing.
• Multi host container networking via Overlay networks
• Secured by default via TLS.
• Automatic reconciliation to desired state of cluster.
Schedules tasks on slaves and exposes service commands.
Internal Key Value Store
Inbuilt key values store for master leader election using Raft
• Linux distribution
• Rolling upgrades
• Minimal OS
• Docker support
• etcd and fleet tools
to manage distributed
applications based on
• Cloud-init support
• Systemd units
• Experiment with a dedicated cluster for container based applications.
• Or use a public cloud one:
• Docker application
• Google GCE, rackspace,
• Deployable on CoreOS
• Container replication
• HA services
K8s provides container-centric infrastructure
Once specific containers are no longer bound to specific machines/VMs,
host-centric infrastructure no longer works
• Scheduling: Decide where my containers should run
• Lifecycle and health: Keep my containers running despite failures
• Scaling: Make sets of containers bigger or smaller
• Naming and discovery: Find where my containers are now
• Load balancing: Distribute traffic across a set of containers
• Storage volumes: Provide data to containers
• Logging and monitoring: Track what’s happening with my containers
• Debugging and introspection: Enter or attach to containers
• Identity and authorization: Control who can do things to my containers
K8s API Objects
● API Objects:
○ Abstraction of system state
○ Spec: desired state
○ Status: current state
○ Basic Objects:
○ Pod, Volume, Service, Namespace
○ High-level abstractions (controllers):
○ ReplicationSet, StatefulSet, DaemonSet, etc.
● Control Plane:
○ Make cluster’s current state match the desired state
- address: 10.128.0.2
- address: 22.214.171.124
- lastHeartbeatTime: 2017-06-07T02:38:14Z
message: RouteController created a route
API Object Example: Node
Cloud (e.g CloudStack based = exoscale, openstack based = cern
coreOS coreOS coreOS
K* K* K*
API calls to
• EXAMPLE using