SlideShare a Scribd company logo
Building Infrastructure with
Containers
Pradeep Padala, Co-Founder/CTO
Presented at SJSU Operating Systems Class in Dec 2015
Operating System Level Virtualization
©ContainerX, http://containerx.io, @ContainerXInc
Containers
©ContainerX, http://containerx.io, @ContainerXInc
How to contain?
darth
(user: root)
(pid: 1)
luke
(user: root)
(pid: 2)
©ContainerX, http://containerx.io, @ContainerXInc
©ContainerX, http://containerx.io, @ContainerXInc
How to contain?
darth
(user: root)
(pid: 1)
luke
(user: root)
(pid: 2)
# pkill -9 luke
©ContainerX, http://containerx.io, @ContainerXInc
What If Darth can’t see Luke?
darth
(user: root)
(pid: 1)
luke
(user: root)
(pid: 2)
# pkill -9 luke
process not found
©ContainerX, http://containerx.io, @ContainerXInc
How to contain?
1. PID isolation
©ContainerX, http://containerx.io, @ContainerXInc
But, Darth can still see Luke 
darth
(user: root)
(pid: 1)
luke
(user: root)
(pid: 2)
# pkill -9 luke
process not found
# cd /home/luke
# rm –rf *
©ContainerX, http://containerx.io, @ContainerXInc
How to contain?
Namespaces
1. PID
2. File system (or mount)
3. UTS – isolate hostname, nodename
4. IPC – mq and other IPC objects
5. Network – sockets, IP address, network stack
6. …
©ContainerX, http://containerx.io, @ContainerXInc
Darth can’t see Luke!
darth
(user: root)
(pid: 1)
luke
(user: root)
(pid: 2)
# pkill -9 luke
process not found
# cd /home/luke
no such directory
©ContainerX, http://containerx.io, @ContainerXInc
But, resources are shared
darth
(user: root)
(pid: 1)
luke
(user: root)
(pid: 2)
# cat /dev/zero > /dev/null
©ContainerX, http://containerx.io, @ContainerXInc
Use cgroups to limit resources
group limitcpu {
cpu { cpu.shares = 400; }
}
group limitmem {
memory { memory.limit_in_bytes = 512m; }
}
©ContainerX, http://containerx.io, @ContainerXInc
How to contain?
1. Namespaces
2. Cgroups
©ContainerX, http://containerx.io, @ContainerXInc
We are not done yet
darth
(user: nonroot)
(pid: 1)
luke
(user: root)
(pid: 2)
$ bindto 22
©ContainerX, http://containerx.io, @ContainerXInc
Capabilities
Two modes
1. Run as root, deny all, grant selected capabilities
2. Run as non-root, grant selected capabilities
a) grant net_bind_service
©ContainerX, http://containerx.io, @ContainerXInc
How to contain?
1. Namespaces
2. Cgroups
3. Capabilities
©ContainerX, http://containerx.io, @ContainerXInc
Container Stack
Linux kernel with lxc
lxc user-space tools cgroups
Docker
©ContainerX, http://containerx.io, @ContainerXInc
Docker is a wrapper around lxc
simplifies container creation
©ContainerX, http://containerx.io, @ContainerXInc
Docker Images
Source: https://docs.docker.com/terms/layer/
©ContainerX, http://containerx.io, @ContainerXInc
Build layers using Dockerfile
FROM ubuntu
RUN apt-get install -y apache2
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
©ContainerX, http://containerx.io, @ContainerXInc
Build, Run and Inspect a container
• Setup a Docker host using docker-machine
• Write a Dockerfile
• Build
• Run
• Inspect
©ContainerX, http://containerx.io, @ContainerXInc
Demo
©ContainerX, http://containerx.io, @ContainerXInc
How to manage multiple hosts and
containers?
• It’s easy to setup a Docker hos and run a container
• It’s “super hard” to manage many of them, why?
1. Scale
2. Allocating resources (compute, storage and network)
3. Day-to-day management
4. Running infrastructure efficiently
©ContainerX, http://containerx.io, @ContainerXInc
The Container Platform for Enterprise IT
©ContainerX, http://containerx.io, @ContainerXInc
kernel
lxc cg
Docker
kernel
lxc cg
Docker
kernel
lxc cg
Docker
kernel
lxc cg
Docker
kernel
lxc cg
Docker
On-Premise Cloud
©ContainerX, http://containerx.io, @ContainerXInc
Host and Container Management
• Cluster concept – aggregation
• Elasticity
• Addition and deletion of hosts
• Automatically in cloud environments
• Horizontal scaling
• Storage
• Network
©ContainerX, http://containerx.io, @ContainerXInc
Resource Management
0%
Green Container Pool
CPU Limit: 30%
Mem Limit: 30%
Priority: Medium
20% 0%
Yellow Container Pool
CPU Limit: 60%
Mem Limit: 70%
Priority: High
60%0%
Blue Container Pool
CPU Limit: 30%
Mem Limit: 20%
Priority: Low
20%
30%30% 40%
©ContainerX, http://containerx.io, @ContainerXInc
Resource Management Trade-offs
Utilization
vs
Isolation
©ContainerX, http://containerx.io, @ContainerXInc
Many Scheduling Algorithms
What works?
• Feedback based algorithms
• Simple heuristics
• Extensive simulation to understand corner cases
Real-world robustness is most important!
©ContainerX, http://containerx.io, @ContainerXInc
Cluster scheduling – feedback loop
Monitor
Control
Action
Stats
Performance goals
Control parameters
Model
Model can model
applications, containers,
and underlying resources
Change allocation
©ContainerX, http://containerx.io, @ContainerXInc
Summary
• What are containers?
• OS virtualization
• Namespaces + CGroups + Capabilities
• Docker
• Wrapper around lxc
• User-friendly containers
• Container management – hard!
• Aggregation, Elastiticy, Multi-tenancy …
• Feedback loop for cluster scheduling
©ContainerX, http://containerx.io, @ContainerXInc

More Related Content

What's hot

Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker, Inc.
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
Lalatendu Mohanty
 
Карманный PaaS с Dokku (Александр Белецкий)
Карманный PaaS с Dokku (Александр Белецкий)Карманный PaaS с Dokku (Александр Белецкий)
Карманный PaaS с Dokku (Александр Белецкий)
GeeksLab Odessa
 
Vagrant
VagrantVagrant
Vagrant
Denys Kurets
 
Docker 1.11
Docker 1.11Docker 1.11
Docker 1.11
Maciej Lasyk
 
Building Reusable Development Environments with Docker
Building Reusable Development Environments with DockerBuilding Reusable Development Environments with Docker
Building Reusable Development Environments with Docker
Revelation Technologies
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
Johan Janssen
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
Walid Shaari
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and Ansible
Patrick Galbraith
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
Massimiliano Dessì
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
Ajeet Singh Raina
 
Puppeteerのお話
Puppeteerのお話Puppeteerのお話
Puppeteerのお話
Shinji Kobayashi
 
dkr_django_slides
dkr_django_slidesdkr_django_slides
dkr_django_slides
Gladson Manuel
 
Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1
dotCloud
 
RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)
Maciej Lasyk
 
Docker - 15 great Tutorials
Docker - 15 great TutorialsDocker - 15 great Tutorials
Docker - 15 great Tutorials
Julien Barbier
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
msyukor
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
Ranjit Avasarala
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
Towfiqul Islam
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
Massimiliano Dessì
 

What's hot (20)

Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Карманный PaaS с Dokku (Александр Белецкий)
Карманный PaaS с Dokku (Александр Белецкий)Карманный PaaS с Dokku (Александр Белецкий)
Карманный PaaS с Dokku (Александр Белецкий)
 
Vagrant
VagrantVagrant
Vagrant
 
Docker 1.11
Docker 1.11Docker 1.11
Docker 1.11
 
Building Reusable Development Environments with Docker
Building Reusable Development Environments with DockerBuilding Reusable Development Environments with Docker
Building Reusable Development Environments with Docker
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and Ansible
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
 
Puppeteerのお話
Puppeteerのお話Puppeteerのお話
Puppeteerのお話
 
dkr_django_slides
dkr_django_slidesdkr_django_slides
dkr_django_slides
 
Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1
 
RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)
 
Docker - 15 great Tutorials
Docker - 15 great TutorialsDocker - 15 great Tutorials
Docker - 15 great Tutorials
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 

Similar to Building Infrastructure with Containers (SJSU Talk)

Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
Araf Karsh Hamid
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
Ambassador Labs
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
BalaBit
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
Andrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
Andrey Hristov
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
Thomas Tong, FRM, PMP
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
PROIDEA
 
Docker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdfDocker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdf
RifqiMultazamOfficia
 
2015 05-06-elias weingaertner-docker-intro
2015 05-06-elias weingaertner-docker-intro2015 05-06-elias weingaertner-docker-intro
2015 05-06-elias weingaertner-docker-intro
Haufe-Lexware GmbH & Co KG
 
Docker and the Container Revolution
Docker and the Container RevolutionDocker and the Container Revolution
Docker and the Container Revolution
Romain Dorgueil
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshop
vty
 
HPC Cloud Burst Using Docker
HPC Cloud Burst Using DockerHPC Cloud Burst Using Docker
HPC Cloud Burst Using Docker
IRJET Journal
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Patrick Chanezon
 
Containers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the EnterpriseContainers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the Enterprise
Honza Horák
 
Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech Talk
Red Hat Developers
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
Naukri.com
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
Ben Hall
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
JasonStraughan1
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
InfluxData
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Van Phuc
 

Similar to Building Infrastructure with Containers (SJSU Talk) (20)

Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
 
Docker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdfDocker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdf
 
2015 05-06-elias weingaertner-docker-intro
2015 05-06-elias weingaertner-docker-intro2015 05-06-elias weingaertner-docker-intro
2015 05-06-elias weingaertner-docker-intro
 
Docker and the Container Revolution
Docker and the Container RevolutionDocker and the Container Revolution
Docker and the Container Revolution
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshop
 
HPC Cloud Burst Using Docker
HPC Cloud Burst Using DockerHPC Cloud Burst Using Docker
HPC Cloud Burst Using Docker
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
 
Containers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the EnterpriseContainers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the Enterprise
 
Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech Talk
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 

Building Infrastructure with Containers (SJSU Talk)

  • 1. Building Infrastructure with Containers Pradeep Padala, Co-Founder/CTO Presented at SJSU Operating Systems Class in Dec 2015
  • 2. Operating System Level Virtualization ©ContainerX, http://containerx.io, @ContainerXInc
  • 4. How to contain? darth (user: root) (pid: 1) luke (user: root) (pid: 2) ©ContainerX, http://containerx.io, @ContainerXInc
  • 6. How to contain? darth (user: root) (pid: 1) luke (user: root) (pid: 2) # pkill -9 luke ©ContainerX, http://containerx.io, @ContainerXInc
  • 7. What If Darth can’t see Luke? darth (user: root) (pid: 1) luke (user: root) (pid: 2) # pkill -9 luke process not found ©ContainerX, http://containerx.io, @ContainerXInc
  • 8. How to contain? 1. PID isolation ©ContainerX, http://containerx.io, @ContainerXInc
  • 9. But, Darth can still see Luke  darth (user: root) (pid: 1) luke (user: root) (pid: 2) # pkill -9 luke process not found # cd /home/luke # rm –rf * ©ContainerX, http://containerx.io, @ContainerXInc
  • 10. How to contain? Namespaces 1. PID 2. File system (or mount) 3. UTS – isolate hostname, nodename 4. IPC – mq and other IPC objects 5. Network – sockets, IP address, network stack 6. … ©ContainerX, http://containerx.io, @ContainerXInc
  • 11. Darth can’t see Luke! darth (user: root) (pid: 1) luke (user: root) (pid: 2) # pkill -9 luke process not found # cd /home/luke no such directory ©ContainerX, http://containerx.io, @ContainerXInc
  • 12. But, resources are shared darth (user: root) (pid: 1) luke (user: root) (pid: 2) # cat /dev/zero > /dev/null ©ContainerX, http://containerx.io, @ContainerXInc
  • 13. Use cgroups to limit resources group limitcpu { cpu { cpu.shares = 400; } } group limitmem { memory { memory.limit_in_bytes = 512m; } } ©ContainerX, http://containerx.io, @ContainerXInc
  • 14. How to contain? 1. Namespaces 2. Cgroups ©ContainerX, http://containerx.io, @ContainerXInc
  • 15. We are not done yet darth (user: nonroot) (pid: 1) luke (user: root) (pid: 2) $ bindto 22 ©ContainerX, http://containerx.io, @ContainerXInc
  • 16. Capabilities Two modes 1. Run as root, deny all, grant selected capabilities 2. Run as non-root, grant selected capabilities a) grant net_bind_service ©ContainerX, http://containerx.io, @ContainerXInc
  • 17. How to contain? 1. Namespaces 2. Cgroups 3. Capabilities ©ContainerX, http://containerx.io, @ContainerXInc
  • 18. Container Stack Linux kernel with lxc lxc user-space tools cgroups Docker ©ContainerX, http://containerx.io, @ContainerXInc
  • 19. Docker is a wrapper around lxc simplifies container creation ©ContainerX, http://containerx.io, @ContainerXInc
  • 21. Build layers using Dockerfile FROM ubuntu RUN apt-get install -y apache2 CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] ©ContainerX, http://containerx.io, @ContainerXInc
  • 22. Build, Run and Inspect a container • Setup a Docker host using docker-machine • Write a Dockerfile • Build • Run • Inspect ©ContainerX, http://containerx.io, @ContainerXInc
  • 24. How to manage multiple hosts and containers? • It’s easy to setup a Docker hos and run a container • It’s “super hard” to manage many of them, why? 1. Scale 2. Allocating resources (compute, storage and network) 3. Day-to-day management 4. Running infrastructure efficiently ©ContainerX, http://containerx.io, @ContainerXInc
  • 25. The Container Platform for Enterprise IT ©ContainerX, http://containerx.io, @ContainerXInc
  • 26. kernel lxc cg Docker kernel lxc cg Docker kernel lxc cg Docker kernel lxc cg Docker kernel lxc cg Docker On-Premise Cloud ©ContainerX, http://containerx.io, @ContainerXInc
  • 27. Host and Container Management • Cluster concept – aggregation • Elasticity • Addition and deletion of hosts • Automatically in cloud environments • Horizontal scaling • Storage • Network ©ContainerX, http://containerx.io, @ContainerXInc
  • 28. Resource Management 0% Green Container Pool CPU Limit: 30% Mem Limit: 30% Priority: Medium 20% 0% Yellow Container Pool CPU Limit: 60% Mem Limit: 70% Priority: High 60%0% Blue Container Pool CPU Limit: 30% Mem Limit: 20% Priority: Low 20% 30%30% 40% ©ContainerX, http://containerx.io, @ContainerXInc
  • 30. Many Scheduling Algorithms What works? • Feedback based algorithms • Simple heuristics • Extensive simulation to understand corner cases Real-world robustness is most important! ©ContainerX, http://containerx.io, @ContainerXInc
  • 31. Cluster scheduling – feedback loop Monitor Control Action Stats Performance goals Control parameters Model Model can model applications, containers, and underlying resources Change allocation ©ContainerX, http://containerx.io, @ContainerXInc
  • 32. Summary • What are containers? • OS virtualization • Namespaces + CGroups + Capabilities • Docker • Wrapper around lxc • User-friendly containers • Container management – hard! • Aggregation, Elastiticy, Multi-tenancy … • Feedback loop for cluster scheduling ©ContainerX, http://containerx.io, @ContainerXInc