MESOS & CONTAINERS
Overview of Mesos containerization and upcoming filesystem isolation support (a.k.a the docker like thing)
Yan Xu xujyan
MESOS & CONTAINERS Overview of Mesos containerization and - - PowerPoint PPT Presentation
MESOS & CONTAINERS Overview of Mesos containerization and upcoming filesystem isolation support (a.k.a the docker like thing) Yan Xu xujyan WHAT IS A CONTAINER Loosely defined: a lightweight VM / OS-level virtualization /
Overview of Mesos containerization and upcoming filesystem isolation support (a.k.a the docker like thing)
Yan Xu xujyan
Can’t allocate resources without enforcement!
Credit: http://cdn.diginomica.com/wp-content/uploads/2014/07/Fotolia-Oleksiy-Mark-50048132_Sub_M.jpg
Mesos Containerizer Docker Containerizer Agent Docker Isolators Isolators Isolators Custom executor Docker executor
enforcement with persistent volumes; IP per container, etc.
isolation, visibility isolation and metering.
and configured independently.
filesystem isolation.
such as are added and configured independently.
handles cases without a new rootfs.
CPU Isolator Mem Isolator DiskQuota Isolator Network Isolator PID Isolator PerfEvent Isolator Containerizer Filesystem Isolator … Isolator
tolerance.
container as needed.
lifecycle.
recover() launch() update() usage() wait() destroy() Containerizer
isolation feature. e.g., create cgroups.
e.g., write control files.
report violation.
recover() prepare() isolate() watch() update() usage() cleanup() Isolator
What’s in it
How to run it
infrastructure flexibility.
not jailed but it can isolate its end-user logic inside a container rootfs.
Copy Backend Backend Bind Backend Overlay Backend Store Appc Store Docker Store OCF Store Provisioner Filesystem Isolator
{ "type" : "MESOS", "mesos" : { "image" : { "type" : "APPC", "appc" : { "name" : "acme.biz/appc/ubuntu1510", "labels" : { "labels": [{"key" : "version", "value" : "0.0.1"}] } } } }, "volumes": [ {"container_path" : "/tmp", "host_path" : "tmp", "mode" : "RW"}, {"container_path" : "/root", "host_path" : "/root", "mode" : "RW"}, {"container_path" : "/etc", "host_path" : "/etc", "mode" : "RO"}, {"container_path" : "/var/run", "host_path" : "/var/run", "mode" : "RW"}, {"container_path" : "/var/tmp", "host_path" : "/var/tmp", "mode" : "RW"} ] }
work_dir slaves provisioner … container_id containers/ container_id backends/ backend rootfses/ rootfs_id store docker appc images/ image_id manifest rootfs
registry acme.biz appc mysql57-0.0.1-linux-amd64.aci ubuntu1510-0.0.1-linux-amd64.aci store docker appc images/ image_id manifest rootfs fetch, decrypt, decompress, untar, etc.
work_dir slaves provisioner … container_id containers/ container_id backends/ backend rootfses/ rootfs_id store docker appc images/ image_id manifest rootfs /mnt/mesos/sandbox /
/var/tmp work_dir slaves provisioner … container_id containers/ container_id backends/ backend rootfses/ rootfs_id store docker appc images/ image_id manifest rootfs /mnt/mesos/sandbox / volumes roles/role persistence_id /mnt/mesos/sandbox/vol /var/tmp sand /mnt/mesos/sandbox/sand
23
Credit: http://www.seanews.com.tr/news/127373/forwarders-freight/
environment: fat images.
make tasks self-sufficient.
mount from the host as a compromise.
in host config?
read-only rootfs with sandbox mounted in.
sandbox.
persistent volumes.
Contributors of the native filesystem isolation feature: Lily Chen, Tim Chen, Ian Downes, Jojy Varghese, Mei Wan, Yan Xu, Jie Yu, Chi Zhang.
33
34