2. Let’s do this
• What are they?
• And I can use them for?
• How do they work?
• OpenVZ
• LXC
• Container Management
• Docker
3. Containers – What are
they?
“Is an operating system–level virtualization method for
running multiple isolated Linux systems (containers) on
a single control host.” … Wikipedia
“Chroot with steroids” … Interwebs
“OS-level Virtualization” … Interwebs
It has been around for almost over a decade.
5. And can I use them for?
• Running multiple versions of software (centos 5 and
centos 6 or ubuntu 10 and ubuntu 12)
• Running many copies of applications configurations
on the same host
• Create sandbox environments for development
and testing
• Provide user environments whose resources are
tightly controlled.
• VPS and PaaS
6. How do they work?
• OS Virtualization (Linux over Linux only… Sorry MS)
• Share the same hardware (No HW virtualization)
• Container has its own isolated namespaces
• Network over bridge/NAT/tunnel
7. OpenVZ
• Kernel features
o Namespaces: virtualization and isolation
o Cgroups: resource management
o Checkpoint/restart: freeze and unfreeze
• Tools
o Vzctl - Containers control utility
• Templates
o Precreatedimages for fast provisioning
• Each container has its own
o Files (chroot)
o Process tree (PID)
o Network (net namespace)
o Devices
o IPC
• Kernel 2.6 support
• Production ready
• Supported by
CentOS, RHEL,
Ubuntu, Debian
• Used in many VPS
• Biggest contributors
to LXC
8. LXC
• Kernel > 2.6.30
• Namespaces
o Utsname
o IPC
o PID
o User
o Network
o Devices
• Control Groups
o Namespace
o Devices
o Scheduler
o CPU and memory
• Most distros will support
it but if not you can
download it from
https://github.com/lxc/l
xc
• Network available
through bridge, NAT or
vpn tunnel
10. Docker for LXC
• Open Source engine
which allows you to
deploy multiple
containers over LXC
• Created by dotCloud
• Popular between devs
that run ubuntu
• Not production ready
• Downside is that
requires AUFS/LXC (bad
luck RHEL/CentOS)