Container - Cseweb.ucsd.edu

2y ago
27 Views
2 Downloads
4.40 MB
41 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Kaydence Vann
Transcription

ContainerYiying Zhang

Outline Motivation and overview Linux container techniques Docker Security of containersAcknowledgment: some slides from “Introduction to Docker” (Docker Inc.)

Lec1: Summary of Virtualization History Invented by IBM in 1960s for sharing expensive mainframes Popular research ideas in 1960s and 1970s Interest died as the adoption of cheap PCs and multi-user OSes surged in 1980s A (somewhat accidental) research idea got transferred to VMware Real adoption happened with the growth of cloud computing New forms of virtualization: container and serverless, in the modern cloud era

Are VMs Fit for (All) Today’s (Cloud) Usages? Performance overhead of indirections (guest OS and hypervisor) Large memory footprint Slow startup time License and maintenance cost of guest OS Do we really need to virtualize hardware and a full OS? What about DevOps?

The Challenge

The Matrix from Hell

Cargo Transportation Pre-1960

Also a Matrix from Hell

Solution: Shipping Container

Docker: Container for Code

Why Does It Work? Separation of Concerns

Why Developers Care? Build once. (finally) run anywhere* A clean, portable runtime environment for your app Automate testing, integration, packaging.anything you can script Deploy services like VM, but without the overhead of a VMNo worries about missing dependencies, packages, etc. during deploymentsRun each app in its own isolated container, so you can run various versionsof libraries and other dependencies for each app without worryingReduce/eliminate concerns about compatibility on different platforms, eitheryour own or your customers* "anywhere" means an x86 server running a modern Linux kernel (3.2 generally or 2.6.32 for RHEL 6.5 , Fedora, & related)

Why Administrators Care? Configure once. run anything Make the entire lifecycle more efficient, consistent, and repeatable Support segregation of duties Address significant performance, costs, deployment, and portabilityissues normally associated with VMsEliminate inconsistencies between development, test, production, andcustomer environmentsSignificantly improves the speed and reliability of continuousdeployment and continuous integration systems

Linux Containers Run everywhere Regardless of kernel versionRegardless of host distroPhysical or virtual, cloud or notContainer and host architecture must match.Run anything If it can run on the host, it can run in the containerIf it can on a Linux kernel, it can run

At High-Level: It Looks Like a VM Own process space Own network interface Can run stuff as root Can have its own /sbin/init (different from the host)

At Low-Level: OS-Level Virtualization Containers run on a host OS directly (and share the OS) Run as processes OS provides resource isolation and namespace isolation

VM vs Container

Using Namespaces to Separate “Views” of Users Namespace: naming domain for various resources User IDs (UIDs) Process IDs (PIDs) File paths (mnt) Network sockets Pipe names

Namespaces Isolated by KernelContainer1Container2setuid()getpid()open() Linux KernelNamespace for container1UIDs: 1, 2, 3, PIDs: 1, 2, 3, Paths: /, /usr, /home, Namespace for container2UIDs: 1, 2, 3, PIDs: 1, 2, 3, Paths: /, /usr, /home,

Isolating Resources with cgroups Linux Control Groups (cgroups): collection of Linux processes Limits resource usages at group level (e.g., memory, CPU, device) Fair sharing of resources Track resource utilization (e.g., could be used for billing/management) Control processes (e.g., pause/resume, checkpoint/restore)

Efficiency: almost no overhead Processes are isolated, but run straight on the host CPU performance native performance Memory performance a few % shaved off for (optional) accounting Network performance small overhead; can be optimized to zerooverhead

Docker Docker Inc Founded as dotCloud, Inc. in 2010 by Solomon Hykes (renamed to Docker Inc. in2013) Estimated to be valued at over 1 billion (101-250 employees) Docker the software A container engine written in Go (based on Linux container) Docker community Now 1851 contributors, 16.2K forks of docker engine on GitHub (called Moby)

Why are Docker Containers Lightweight?

Docker Architecture

Docker Engine daemon: Rest API (receiving instructions) and other featurescontainerd: Execution logic (e.g., start, stop, pause, unpause, delete containers)runc: A lightweight runtime CLISource: N. Poulton, "Docker Deep Dive,"Oct 2017, ISBN: 9781521822807

Docker Images not a VHD, not a file system uses a Union File System a read-only Layer do not have state Basically a tar file Has hierarchy (arbitrary depth)

Docker Image Registry Registry containing docker images Local registry on the same host Docker Hub Registry: Globally shared Private registry on docker.com

What are the Basics of a Docker System?

Changes and Updates

Docker Swarm Docker Swarm: A group of nodes collaborating over a network Two modes for Docker hosts Single Engine Mode: Not participating in a swarm Swarm Mode: Participating in a SwarmEach swarm has a few managers (one being leader) that dispatch tasks toworkers. Managers are also workers (i.e., execute tasks)

Security Implications of ContainersSource: S. Sultan et al.: Container Security: Issues,Challenges, and the Road Ahead

Threats of Containers Unlike VMs whose interface is hardware instructions, containers’ interfaceis OS system calls More difficult to protect syscalls Involve large amount of code in the OS And there are many syscalls

Threats of Container Images Difficult to understand the source/provenance of imagesSource: B. Tak et al.: Understanding Security Implications of Using Containers in the Cloud

Docker Docker Inc Founded as dotCloud, Inc. in 2010 by Solomon Hykes (renamed to Docker Inc. in 2013) Estimated to be valued at over 1 billion (101-250 employees) Docker the software A container engine written in Go (based on Linux container) Docker community Now 1851 contribut

Related Documents:

He has served as the Director, UCSD Medicine 401 Clerkship and as Associate Director, UCSD Internal Medicine Residency. UCSD Chancellor's Scholars Program UCSD Emeriti Mentor Program List of Mentors - 2022-2023 UCSD Emeriti Mentor Program, c/o UCSD Retirement Resource Center Mailing Address: 9500 Gilman Drive, Dept. 0020, La Jolla, CA 92093 .

1: UCSD faculty and staff retirees. 2: UCSD Alumni. 3: Parents of UCSD retirees, alum-ni, or active UCSD faculty and staff . 4: 5-year members of the Chancel-lor’s Associates. 5: Other community members as may be mutually agreed upon by the management and UCSD

5. The Electrophysiology of Tinnitus UCSD 6. Connectivity-guided Plasticity-induced Rehabilition Training (PIRT) for Autism Spectrum Disorders UCSD UCSD UCSD UCSD UCSD 3,500 6,000 12,000 6,000 25,000 10,000 1989-1990 1992-1993 1993-1995 1995-1996 2001-2002 2010-2011 PI

Perfecting Passenger Pickups : An Uber Case Study Ajeet Kumar Jigar Surana Madhur Kapoor Piyush Anil Nahar ajk054@ucsd.edu jsurana@ucsd.edu makapoor@ucsd.edu pnahar@ucsd.edu . Uber used Bayesian statistics and drop -off points for the trips to predict where a user would be going with an accuracy of 75%. 3) The Pulse o f a City: How People Mov .

Rajesh Gupta UCSD 9500 Gilman Dr. 92093, La Jolla, California rgupta@cs.ucsd.edu Bharathan Balaji UCSD 9500 Gilman Dr. 92093, La Jolla, California bbalaji@cs.ucsd.edu Donatella Sciuto Politecnico di Milano P.za Leonardo da Vinci 20133, Milano, Italy donatella.sciuto@polimi.it Paola Spoletini

container container container container container networking storage registry security logs & metrics container orchestration & cluster management (kubernetes) fedora / centos / red hat enterprise linux container runtime & packaging (docker) atomic host infrastructure automation & cockpit

container container container container container networking storage registry security logs & metrics container orchestration & cluster management (kubernetes) fedora / centos / red hat enterprise linux container runtime & packaging (docker) atomic host infrastructure automation & cockpit

The grade 10 ELA Reading Comprehension test included three separate test sessions. Sessions 1 and . 2 were both administered on the same day, and Session 3 was administered on the following day. Each session included reading passages, followed by multiple-choice and open-response questions. Common reading passages and test items are shown on the following pages as they appeared in test .