Travis Cardwell Technical Meeting

Similar documents
SAINT LOUIS JAVA USER GROUP MAY 2014

ISLET: Jon Schipp, AIDE jonschipp.com. An Attempt to Improve Linux-based Software Training

OS Containers. Michal Sekletár November 06, 2016

Introduction to Containers

docker & HEP: containerization of applications for development, distribution and preservation

A Hands on Introduction to Docker

Docker for HPC? Yes, Singularity! Josef Hrabal

Introduction to Container Technology. Patrick Ladd Technical Account Manager April 13, 2016

Introduction to VMs & Containers

Introduction to containers

Portable, lightweight, & interoperable Docker containers across Red Hat solutions

An introduction to Docker

OS Virtualization. Linux Containers (LXC)

Midterm Presentation Schedule

Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING

Deployment Patterns using Docker and Chef

Devops, Docker and Security. John

TangeloHub Documentation

[Docker] Containerization

EE 660: Computer Architecture Cloud Architecture: Virtualization

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand

Docker & why we should use it

for Kerrighed? February 1 st 2008 Kerrighed Summit, Paris Erich Focht NEC

CS-580K/480K Advanced Topics in Cloud Computing. Container III

Faculté Polytechnique

Think Small to Scale Big

High Performance Containers. Convergence of Hyperscale, Big Data and Big Compute

Docker and Oracle Everything You Wanted To Know

Containers. Pablo F. Ordóñez. October 18, 2018

LSST software stack and deployment on other architectures. William O Mullane for Andy Connolly with material from Owen Boberg

Docker und IBM Digital Experience in Docker Container

Singularity: Containers for High-Performance Computing. Grigory Shamov Nov 21, 2017

Singularity: container formats

Docker Deep Dive. Daniel Klopp

Installing and Using Docker Toolbox for Mac OSX and Windows

LXC(Linux Container) Lightweight virtual system mechanism Gao feng

, Inc

FreeBSD Jails vs. Solaris Zones

Relax-and-Recover (ReaR) Automated Testing

Real world Docker applications

Splunk N Box. Splunk Multi-Site Clusters In 20 Minutes or Less! Mohamad Hassan Sales Engineer. 9/25/2017 Washington, DC

containerization: more than the new virtualization

Zadara Enterprise Storage in

Introduction to Linux

Who is Docker and how he can help us? Heino Talvik

Installation and setup guide of 1.1 demonstrator

Container Adoption for NFV Challenges & Opportunities. Sriram Natarajan, T-Labs Silicon Valley Innovation Center

Container-based virtualization: Docker

Continuous integration & continuous delivery. COSC345 Software Engineering

Index. Bessel function, 51 Big data, 1. Cloud-based version-control system, 226 Containerization, 30 application, 32 virtualize processes, 30 31

Infoblox Kubernetes1.0.0 IPAM Plugin

Harbor Registry. VMware VMware Inc. All rights reserved.

OPENSTACK CLOUD RUNNING IN A VIRTUAL MACHINE. In Preferences, add 3 Host-only Ethernet Adapters with the following IP Addresses:

CS197U: A Hands on Introduction to Unix

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

A review of AIX Container Technology: with perspectives on. Docker Management Operations. Zeyuan Zhu. AIX Development Engineer

Cross platform enablement for the yocto project with containers. ELC 2017 Randy Witt Intel Open Source Technology Center

Orchestrating Docker containers at scale

Introduction to Containers. Martin Čuma Center for High Performance Computing University of Utah

Engineering Robust Server Software

LENS Server Maintenance Guide JZ 2017/07/28

Introduction to Linux

1 Virtualization Recap

Downloading and installing Db2 Developer Community Edition on Red Hat Enterprise Linux Roger E. Sanders Yujing Ke Published on October 24, 2018

CONTAINERIZING JOBS ON THE ACCRE CLUSTER WITH SINGULARITY

Linux Containers Roadmap Red Hat Enterprise Linux 7 RC. Bhavna Sarathy Senior Technology Product Manager, Red Hat

what's in it for me? Ian Truslove :: Boulder Linux User Group ::

Dockerized Tizen Platform

A Design and Implementation of Universal Container

OS Security III: Sandbox and SFI

Docker. Master the execution environment of your applications. Aurélien Dumez. Inria Bordeaux - Sud-Ouest. Tuesday, March 24th 2015

Infrastructure at your Service. Oracle over Docker. Oracle over Docker

Lecture 09: VMs and VCS head in the clouds

Intel Clear Containers. Amy Leeland Program Manager Clear Linux, Clear Containers And Ciao

Dockerize Your IT! Centrale Nantes Information Technology Department Yoann Juet Dec, 2018

Introduction to Virtualization and Containers Phil Hopkins

Multi-Arch Layered Image Build System

Ubuntu Manually Mount Cdrom Drive Command Line Vmware

How Container Runtimes matter in Kubernetes?

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

Getting Started With Containers

Building A Better Test Platform:

EMC Smarts SAM, IP, ESM, MPLS, NPM, OTM, and VoIP Managers 9.5 Support Matrix

Quick Prototyping+CI with LXC and Puppet

THE ROUTE TO ROOTLESS

Welcome to Linux Foundation E-Learning Training

" Qué me estás container?" Docker for dummies

Virtual Machine Monitors!

개발자와운영자를위한 DevOps 플랫폼 OpenShift Container Platform. Hyunsoo Senior Solution Architect 07.Feb.2017

Cauldron: A Framework to Defend Against Cache-based Side-channel Attacks in Clouds

CS 470 Spring Virtualization and Cloud Computing. Mike Lam, Professor. Content taken from the following:

Microservice Deployment. Software Engineering II Sharif University of Technology MohammadAmin Fazli

Introduction to Linux

Introduction to Docker. Antonis Kalipetis Docker Athens Meetup

Downloading and installing Db2 Developer Community Edition on Ubuntu Linux Roger E. Sanders Yujing Ke Published on October 24, 2018

Welcome to Linux Foundation E-Learning Training

SUSE An introduction...

Welcome to Linux Foundation E-Learning Training

Flip the Switch to Container-based Clouds

Docker and Security. September 28, 2017 VASCAN Michael Irwin

Transcription:

.. Introduction to Docker Travis Cardwell Tokyo Linux Users Group 2014-01-18 Technical Meeting

Presentation Motivation OS-level virtualization is becoming accessible Docker makes it very easy to experiment with the technology If you have not already started learning about OS-level virtualization, now is the time! Travis Cardwell Introduction to Docker 2 / 37

Presentation Outline.1 The Big Picture.2 Underlying Technology.3 Docker.4 Use Cases.5 Demonstration.6 How To Get Started Travis Cardwell Introduction to Docker 3 / 37

.. The Big Picture Travis Cardwell Introduction to Docker 4 / 37

Virtualization Bare Metal Linux KVM Linux... Each virtual machine (VM) runs a full OS VMs require significant resources VMs take time to provision and boot KVM Linux.... Travis Cardwell Introduction to Docker 5 / 37

Virtualization Bare Metal Linux KVM Linux... KVM Linux... 1967 first demo @IBM 1997 Virtual PC 1999 VMware 2003 Xen QEMU 2007 KVM VirtualBox. Travis Cardwell Introduction to Docker 5 / 37

OS-Level Virtualization Bare Metal Linux Container... Container... Containers share the host kernel Filesystem, network, etc. are virtualized Requires fewer resources A guest OS does not have to boot starts fast. Container... Travis Cardwell Introduction to Docker 6 / 37

OS-Level Virtualization. Bare Metal Linux Container... Container... Container... 1982 chroot 1998 FreeBSD jails 2001 Linux VServer Virtuozzo 2005 OpenVZ Solaris Containers 2007 AIX WPARS HP-UX Containers 2008 LXC Travis Cardwell Introduction to Docker 6 / 37

chroot # export MY_CHROOT=/tmp/sid # mkdir $MY_CHROOT # debootstrap sid $MY_CHROOT \ http://ftp.jp.debian.org/debian/ # mount proc $MY_CHROOT/proc -t proc # mount sysfs $MY_CHROOT/sys -t sysfs # chroot $MY_CHROOT /bin/bash Travis Cardwell Introduction to Docker 7 / 37

.. Underlying Technology Travis Cardwell Introduction to Docker 8 / 37

Kernel Namespaces Namespaces are used for isolation of: filesystem - like chroot but more secure UTS (host and domain names) IPC (interprocess communication resources) PIDs (process ID number space) network stack (devices, addresses, routing, ports, etc.) users (user and group IDs) Travis Cardwell Introduction to Docker 9 / 37

Kernel Control Groups cgroups partition sets of tasks into hierarchical groups Allows control over system resources: resource limits (CPU, memory) bandwidth limits (block I/O) prioritization access control (devices) Provides accounting/metrics Allows management of tasks: suspend/resume Travis Cardwell Introduction to Docker 10 / 37

LXC (LinuX Containers) Userspace interface for kernel containment features lxc-create -t ubuntu -n p1 lxc-start -n p1 -d lxc-ls lxc-stop -n p1 Travis Cardwell Introduction to Docker 11 / 37

aufs Implements a union mount Overlays filesystems, creating a unified hierarchy Smaller size (diffs) allow for faster deployment # cd /tmp # mkdir aufs-{orig,diff,mount} # debootstrap sid aufs-orig \ http://ftp.jp.debian.org/debian/ # mount -t aufs \ -o br=/tmp/aufs-diff:/tmp/aufs-orig \ none /tmp/aufs-mount Travis Cardwell Introduction to Docker 12 / 37

.. Docker Travis Cardwell Introduction to Docker 13 / 37

Docker Created by dotcloud (now Docker, Inc.), a Platform-as-a-Service company Created to automate the deployment of any application Open source, on GitHub, active community License: Apache 2.0 Travis Cardwell Introduction to Docker 14 / 37

Feature: Compiled Docker is written in Go The executable is statically compiled Travis Cardwell Introduction to Docker 15 / 37

Feature: Layers The filesystem is layered using aufs Changes are committed, similar to git commits Travis Cardwell Introduction to Docker 16 / 37

Feature: Dockerfiles Configuration files that define how to build containers from images Use configuration tools, build tools, packages, etc. FROM ubuntu RUN apt-get update RUN apt-get upgrade -y RUN apt-get install -y build-essential Travis Cardwell Introduction to Docker 17 / 37

Feature: Registry A server that stores repositories Provides an API for uploading/downloading them There is a public registry called the index Open source, so you can host your own # docker search ghc # docker pull afriel/ghc-head # docker login localhost:8080 # docker push tcard/gitit Travis Cardwell Introduction to Docker 18 / 37

Features Coming Soon Container wiring and service discovery Plugin API Broader kernel support Cross-architecture support Travis Cardwell Introduction to Docker 19 / 37

Development Status Development is moving quite quickly A production ready version is coming soon 0.1.0 2013-03-23 8 31 days 0.2.0 2013-04-23 2 13 days 0.3.0 2013-05-06 4 28 days 0.4.0 2013-06-03 8 44 days 0.5.0 2013-07-17 3 36 days 0.6.0 2013-08-22 7+7 95 days 0.7.0 2013-11-25 (6) (54 days) Travis Cardwell Introduction to Docker 20 / 37

Usage Status Currently requires x86_64 Currently requires Linux 3.8 or higher Currently not production ready Containers are not considered secure Advice: Avoid root access in containers Advice: Use SELinux if you need more security Travis Cardwell Introduction to Docker 21 / 37

.. Use Cases Travis Cardwell Introduction to Docker 22 / 37

Deployment OS is included, so there are fewer parts to break Same way for development, staging, and production Can have fast transfer and boot times Scale applications and services Examples: CoreOS is a distro for distributed platforms Flynn is an open source Platform-as-a-Service Dokku is a mini-heroku in 100 lines of BASH Travis Cardwell Introduction to Docker 23 / 37

Test Automation Test across different distributions and library versions Perform fast unit and integration testing Examples: DNT tests code against multiple versions of Node.js simultaneously NodeChecker is a website that tests all NPM modules Travis Cardwell Introduction to Docker 24 / 37

Isolation Run some services on battle-tested RHEL and others on bleeding-edge Arch Sandbox web applications; example: JiffyLab is a Python/Unix web-based teaching environment Sandbox local applications; example: Run Mozilla Firefox in an ephemeral container Travis Cardwell Introduction to Docker 25 / 37

Lightweight Virtualization Launch virtualized environments quickly Reduce resource requirements Use Xpra ( screen for X ) to manage sessions Travis Cardwell Introduction to Docker 26 / 37

Share Builds Provide quick access to difficult builds Provide easy access to new users Examples: ghc-head repository provides latest builds of GHC docker-selenium-firefox-chrome repository provides Selenium testing of specific browser buttons Travis Cardwell Introduction to Docker 27 / 37

.. Demonstration Travis Cardwell Introduction to Docker 28 / 37

Containers Separate process space Separate filesystems Separate networking Travis Cardwell Introduction to Docker 29 / 37

Committing The service listens to virtual port 8888 It can be routed that to any port The service is run in detached mode Travis Cardwell Introduction to Docker 30 / 37

BusyBox The image is small: <5MB Run with the -rm option to automatically remove the container Travis Cardwell Introduction to Docker 31 / 37

IPython Service The service listens to virtual port 8888 It can be routed that to any port Bind mount a directory for data Travis Cardwell Introduction to Docker 32 / 37

Sandboxed Firefox Bind mount /tmp/.x11-unix (X11 unix socket) Bind mount /dev/snd Give access to c 116:* (ALSA) Pass the $DISPLAY environment variable Choose what to do with data: Ephemeral: delete on close Data on host: bind mount a host directory Data container: use a volume Travis Cardwell Introduction to Docker 33 / 37

.. How To Get Started Travis Cardwell Introduction to Docker 34 / 37

Linux Beginners: Vagrant.1 Install VirtualBox.2 Install Vagrant.3 Install git.4 Deploy a Docker VM: git clone https://github.com/dotcloud/docker.git cd docker vagrant up.5 Connect to the VM: vagrant ssh.6 Run Docker in the VM: sudo docker Travis Cardwell Introduction to Docker 35 / 37

Linux Veterans: Debian Works painlessly on Jessie (testing) Dependencies are listed in /hack/packagers.md You will need to: Add some parameters to /etc/default/grub Add a cgroup mount to /etc/fstab Enable forwarding in /etc/sysctl.conf All output of lxc-checkconfig should be green To install Docker: wget the binary from the Docker website wget the SysVinit script from the GitHub repo Travis Cardwell Introduction to Docker 36 / 37

Tokyo Docker Meetup http://www.meetup.com/docker-tokyo/ First meeting has not been scheduled yet Travis Cardwell Introduction to Docker 37 / 37