Understanding LXC & Docker

21
Understanding LXC & Docker www.comprinno.net 1 By Prasad Puranik (@pspuranik)

description

The goal of LXC is to create an environment as close as possible as a standard Linux installation but without the need for a separate kernel.

Transcript of Understanding LXC & Docker

Page 1: Understanding LXC & Docker

Understanding LXC & Docker

www.comprinno.net 1

By Prasad Puranik (@pspuranik)

Page 2: Understanding LXC & Docker

www.comprinno.net 2

DISCUSSION FLOW

Page 3: Understanding LXC & Docker

www.comprinno.net 3

UNDERSTANDING LXC

LXC (LinuX Containers) is

an operating system–level

virtualization method for

running multiple isolated

Linux systems (containers)

on a single control host.

Server

Host OS

Bins/Libs

APP

Bins/Libs

App

LX

C

ISOLATED

Page 4: Understanding LXC & Docker

www.comprinno.net 4

UNDERSTANDING LXC

Kernel

uts

mount

pid

network

user

ipc

LXC (LinuX Containers) is

an operating system–level

virtualization method for

running multiple isolated

Linux systems (containers)

on a single control host. This

is accomplished through

kernel level isolation.

Page 5: Understanding LXC & Docker

www.comprinno.net 5

UNDERSTANDING LXC

LXC uses many kernel

features to contain

processes.

Kernel Namespaces

AppArmor & SELinux Profiles

Seccomp policies

chroot

cgroups

Page 6: Understanding LXC & Docker

www.comprinno.net 6

UNDERSTANDING LXC

The goal of LXC is to create an environment

as close as possible as a standard Linux

installation but without the need for a separate

kernel.

Page 7: Understanding LXC & Docker

www.comprinno.net 7

DOCKER as a LXC MANAGER

Server

Host OS

Bins/Libs

APP

Bins/Libs

App

Where does Docker fits

here?

Page 8: Understanding LXC & Docker

www.comprinno.net 8

DOCKER as a LXC MANAGER

Server

Host OS

Docker

Bins/Libs

APP

Bins/Libs

App On top of this low-level

foundation of kernel features,

Docker offers a high-level

tool with several powerful

functionalities

Page 9: Understanding LXC & Docker

www.comprinno.net 9

DOCKER as a LXC MANAGER

Server

Host OS

Docker

Bins/Libs

APP

Bins/Libs

App

Page 10: Understanding LXC & Docker

www.comprinno.net 10

DOCKER as a LXC MANAGER

Portable deployment across machines

Application-centric

Automatic build

Versioning

Component re-use

Tool ecosystem

Page 11: Understanding LXC & Docker

www.comprinno.net 11

LXC vs VM

Server

Host OS

Docker

Bins/Libs

AP`P

Bins/Libs

App

Server

Host OS

Hypervisor

Guest OS

Bins/Libs

APP

Bins/Libs

App

Guest OS

Bins/Libs

APP

Bins/Libs

App

LX

C

VM

Page 12: Understanding LXC & Docker

www.comprinno.net 12

LXC vs VM

Server

Host OS

Docker

Bins/Libs

AP`P

Bins/Libs

App

LX

C Lightweight & Resource

Friendly

Comprehensive process and resource isolation

Rapid & Easy Deployment

Page 13: Understanding LXC & Docker

www.comprinno.net 13

LXC vs VM

Lightweight & Resource Friendly

Comprehensive process and resource isolation

Rapid & Easy Deployment

Who all are choosing LXC over VM?

Page 14: Understanding LXC & Docker

www.comprinno.net 14

WHY DOCKER(LXC)?

QUICK AND EASY MULTI-TENANCY

LOW COSTS ENV ISOLATION

FASTER MIGRATION TO SaaS MODEL

Page 15: Understanding LXC & Docker

www.comprinno.net 15

DOCKER FOR QUICK AND EASY MULTI-TENANCY :

Host OS

Docker

Bins/Libs

APP

Bins/Libs

App

Bins/Libs

App

Bins/Libs

App

Bins/Libs

App

Page 16: Understanding LXC & Docker

www.comprinno.net 16

DOCKER FOR QUICK AND EASY MULTI-TENANCY :

Host OS

Docker

Bins/Libs

APP

Tenant1

Bins/Libs

App

Tenant2

Bins/Libs

App

Tenant3

Bins/Libs

App

Tenant4

Bins/Libs

App

Tenant5

Page 17: Understanding LXC & Docker

www.comprinno.net 17

DOCKER FOR LOW COST ENV ISOLATION

:

Host OS

Docker

Bins/Libs

APP

Tenant1

Bins/Libs

App

Tenant2

Bins/Libs

App

Tenant3

Bins/Libs

App

Tenant4

Bins/Libs

App

Tenant5

Isolation using chroot,

cgroup, namespaces,

SELinux, AppArmor,

netfilter (iptables)

Page 18: Understanding LXC & Docker

www.comprinno.net 18

DOCKER FOR FASTER MIGRATION TO SaaS MODEL

:

Host OS

Docker

Bins/Libs

APP

Tenant1

Bins/Libs

App

Tenant2

Bins/Libs

App

Tenant3

Bins/Libs

App

Tenant4

Bins/Libs

App

Tenant5

Page 19: Understanding LXC & Docker

www.comprinno.net 19

CONCLUDING REMARKS :

“If you can run your application on

Linux host, you can run it in LXC too.

You don’t need separate VM for that. ”

Page 20: Understanding LXC & Docker

www.comprinno.net 20

About COMPRINNO

We are Cloud Solution Provisioning &

Management Experts.

We help enterprises devising, implementing

and managing cloud based IT infrastructure

and services.

We work in the domains of Cloud Computing,

Big Data, DevOps, Storage and Security.

Founded in 2013, we are a Bangalore based

company.

Our ability to deal with

complex technologies

with the ease

Our approach towards

our customers, partners,

employees &

shareholders

Our commitment for

continues improvement in

our services, products

and processes

COMPRINNO stands for

Page 21: Understanding LXC & Docker

www.comprinno.net 21

Connect With Us

blogs.comprinno.net @ComprinnoTech /ComprinnoTechnologies

[email protected] +91-80-2257-9047 +91-98863-01605