Containers on HPC

Total Page:16

File Type:pdf, Size:1020Kb

Containers on HPC Containers On HPC Amr Radwan HPC Applications Specialist Supercomputing Core Laboratory Outline ● Why containers? ● What is a container? ● Containers solutions on HPC ● Singularity containers ● Demos ● Open discussion ● Why containers ● Why containers ● Some programs require complex software environments ○ OS type and versions ○ Drivers ○ Compiler type and versions ○ Software dependencies ■ glibc, stdlibc++ versions ■ Other libraries and executables ■ Python/R libraries ● Old applications built on old Linux versions can run on newer Linux host Difference between VMs and Containers What is a container Image Source: https://www.slideshare.net/arafkarsh/docker-container-linux-container Containers Solutions in HPC ● Docker ○ Well established ○ Has docker hub for container sharing ○ Problematic with HPC ● Singularity ○ Designed for HPC, user friendly ○ Support for MPI, GPUs ● Charliecloud and Shifter ○ Also HPC designed, built on top of Docker ○ Simple but less user friendly Singularity Containers Singularity began as an open-source project in 2015, when a team of researchers at Lawrence Berkeley National Laboratory, led by Gregory Kurtzer, developed the initial version and released it under the BSD license By the end of 2016, many developers from different research facilities joined forces with the team at Lawrence Berkeley National Laboratory to further the development of Singularity In 2017 Singularity also won the first place for the category ″Best HPC Programming Tool or Technology″ https://en.wikipedia.org/wiki/Singularity_(software) Singularity Features ● Integrate with traditional HPC ○ Support natively high-performance interconnects, such as InfiniBand and Intel Omni-Path Architecture (OPA) ○ Singularity can support any PCIe-attached device within the compute node, such as graphic accelerators. ○ Same user inside and outside of the container ○ Singularity has also native support for Open MPI library ○ Can integrate with existing software ● Portable and shareable ○ A container is a file ○ It can be built on one OS and run on another Singularity Key Concepts ● Singularity Architecture ● Singularity Workflow ● Singularity container image ● Name-spaces and isolation Singularity Architecture Image Source:https://pdfs.semanticscholar.org/presentation/18f6/40085071afdbd20f644e6945f07d3343dd4d.pdf Singularity Workflow Singularity Container Image ● Singularity makes use of a container image file, which physically contains the container. This file is a physical representation of the container environment itself. If you obtain an interactive shell within a Singularity container, you are literally running within that file. ● When Singularity builds the container, output can be one of a few formats: ○ default: The compressed Singularity read only image format (default) ○ sandbox: This is a read-write container within a directory structure Singularity Name-Spaces By default, Singularity starts containers with a separate mount namespace only. This gives the container its own filesystem, but doesn’t isolate processes and networking in the same way as Docker. Workflow Singularity Hub Image Source: https://rse-cambridge.github.io/hpc-container-workshop/docs/Singularity_Cambridge_keynote.pdf Demos Singularity Demos ● Installing Singularity Singularity Demos ● Building Singularity image (Recipe File) Singularity Demos ● Building Singularity image Singularity Demos ● MPI Hello World on Ibex Singularity Demos ● MPI Hello World on Shaheen Singularity Demos ● Tensorflow GPU on Ibex Singularity Demos ● Web server in container Singularity Demos ● Spark cluster inside containers Singularity Demos ● Spark cluster inside containers Thank You.
Recommended publications
  • Industrial Control Via Application Containers: Migrating from Bare-Metal to IAAS
    Industrial Control via Application Containers: Migrating from Bare-Metal to IAAS Florian Hofer, Student Member, IEEE Martin A. Sehr Antonio Iannopollo, Member, IEEE Faculty of Computer Science Corporate Technology EECS Department Free University of Bolzano-Bozen Siemens Corporation University of California Bolzano, Italy Berkeley, CA 94704, USA Berkeley, CA 94720, USA fl[email protected] [email protected] [email protected] Ines Ugalde Alberto Sangiovanni-Vincentelli, Fellow, IEEE Barbara Russo Corporate Technology EECS Department Faculty of Computer Science Siemens Corporation University of California Free University of Bolzano-Bozen Berkeley, CA 94704, USA Berkeley, CA 94720, USA Bolzano, Italy [email protected] [email protected] [email protected] Abstract—We explore the challenges and opportunities of control design full authority over the environment in which shifting industrial control software from dedicated hardware to its software will run, it is not straightforward to determine bare-metal servers or cloud computing platforms using off the under what conditions the software can be executed on cloud shelf technologies. In particular, we demonstrate that executing time-critical applications on cloud platforms is viable based on computing platforms due to resource virtualization. Yet, we a series of dedicated latency tests targeting relevant real-time believe that the principles of Industry 4.0 present a unique configurations. opportunity to explore complementing traditional automation Index Terms—Industrial Control Systems, Real-Time, IAAS, components with a novel control architecture [3]. Containers, Determinism We believe that modern virtualization techniques such as application containerization [3]–[5] are essential for adequate I. INTRODUCTION utilization of cloud computing resources in industrial con- Emerging technologies such as the Internet of Things and trol systems.
    [Show full text]
  • Portability: Containers, Cloud
    JEDI Portability Across Platforms Containers, Cloud Computing, and HPC Mark Miesch, Rahul Mahajan, Xin Zhang, David Hahn, Francois Vandenberg, Jim Rosinski, Dan Holdaway, Yannick Tremolet, Maryam Abdioskouei, Steve Herbener, Mark Olah, Benjamin Menetrier, Anna Shlyaeva, Clementine Gas Academy website http://academy.jcsda.org/june2019 ‣ Instructions for accessing AWS ‣ Activity instructions ‣ Presentation slides ‣ Doxygen documentation for fv3-bundle We will add further content throughout the week Outline I) JEDI Portability Overview ✦ Unified vision for software development and distribution II) Container Fundamentals ✦ What are they? How do they work? ✦ Docker, Charliecloud, and Singularity III) Using the JEDI Containers ✦ How they are built and deployed ✦ Mac and Windows (Vagrant) IV) HPC and Cloud Computing ✦ Environment modules ✦ Containers in HPC? V) Summary and Outlook JEDI Software Dependencies ‣ Essential ✦ Compilers, MPI ✦ CMake Common versions among users ✦ SZIP, ZLIB and developers minimize ✦ LAPACK / MKL, Eigen 3 stack-related debugging ✦ NetCDF4, HDF5 ✦ udunits ✦ Boost (headers only) ✦ ecbuild, eckit, fckit ‣ Useful ✦ ODB-API, eccodes ✦ PNETCDF ✦ Parallel IO ✦ nccmp, NCO ✦ Python tools (py-ncepbufr, netcdf4, matplotlib…) ✦ NCEP libs ✦ Debuggers & Profilers (ddt/TotalView, kdbg, valgrind, TAU…) The JEDI Portability Vision I want to run JEDI on… Development ‣ My Laptop/Workstation/PC ✦ We provide software containers ✦ Mac & Windows system need to first establish a linux environment (e.g. a Vagrant/VirtualBox virtual machine) Development
    [Show full text]
  • Remote Attestation on Light VM
    POLITECNICO DI TORINO Master's Degree in Computer Engineering Master Thesis Remote Attestation on light VM Supervisor prof. Antonio Lioy Candidate Fabio Vallone Accademic Year 2016-2017 To my parents, who helped me during this journey Summary In the last decade Cloud Computing has massively entered the IT world, changing the way services are offered to the final users. One important aspect of Cloud Computing is the needs to provide greater scalability and flexibility and this can be done by using a technique called Virtualization. This enables us to execute different virtualized ambient on a single piece of hardware. Each virtualized ambient can be seen as a node that offers some services to the final users by exchanging information with other nodes. For this reason the ability to trust each other is growing exponentially. This process is called Remote Attestation and it is from this consideration that the thesis work start. When we say that a node is trustworthy, we are saying that we are sure that all the file that are loaded into memory are the ones that are supposed to be loaded. In other word we need to be sure that the code, and in general the files loaded on that node, have not been tampered by anyone in order to produce a different behaviour of the node. It is important to note that we are not checking in anyway that the behaviour of the machine is logically correct, but we are simply checking that no one has modified it, so bug and logical error can still occurs in the code.
    [Show full text]
  • A Study on the Evaluation of HPC Microservices in Containerized Environment
    ReceivED XXXXXXXX; ReVISED XXXXXXXX; Accepted XXXXXXXX DOI: xxx/XXXX ARTICLE TYPE A Study ON THE Evaluation OF HPC Microservices IN Containerized EnVIRONMENT DeVKI Nandan Jha*1 | SaurABH Garg2 | Prem PrAKASH JaYARAMAN3 | Rajkumar Buyya4 | Zheng Li5 | GrAHAM Morgan1 | Rajiv Ranjan1 1School Of Computing, Newcastle UnivERSITY, UK Summary 2UnivERSITY OF Tasmania, Australia, 3Swinburne UnivERSITY OF TECHNOLOGY, AustrALIA Containers ARE GAINING POPULARITY OVER VIRTUAL MACHINES (VMs) AS THEY PROVIDE THE ADVANTAGES 4 The UnivERSITY OF Melbourne, AustrALIA OF VIRTUALIZATION WITH THE PERFORMANCE OF NEAR bare-metal. The UNIFORMITY OF SUPPORT PROVIDED 5UnivERSITY IN Concepción, Chile BY DockER CONTAINERS ACROSS DIFFERENT CLOUD PROVIDERS MAKES THEM A POPULAR CHOICE FOR DEVel- Correspondence opers. EvOLUTION OF MICROSERVICE ARCHITECTURE ALLOWS COMPLEX APPLICATIONS TO BE STRUCTURED INTO *DeVKI Nandan Jha Email: [email protected] INDEPENDENT MODULAR COMPONENTS MAKING THEM EASIER TO manage. High PERFORMANCE COMPUTING (HPC) APPLICATIONS ARE ONE SUCH APPLICATION TO BE DEPLOYED AS microservices, PLACING SIGNIfiCANT RESOURCE REQUIREMENTS ON THE CONTAINER FRamework. HoweVER, THERE IS A POSSIBILTY OF INTERFERENCE BETWEEN DIFFERENT MICROSERVICES HOSTED WITHIN THE SAME CONTAINER (intra-container) AND DIFFERENT CONTAINERS (inter-container) ON THE SAME PHYSICAL host. In THIS PAPER WE DESCRIBE AN Exten- SIVE EXPERIMENTAL INVESTIGATION TO DETERMINE THE PERFORMANCE EVALUATION OF DockER CONTAINERS EXECUTING HETEROGENEOUS HPC microservices. WE ARE PARTICULARLY CONCERNED WITH HOW INTRa- CONTAINER AND inter-container INTERFERENCE INflUENCES THE performance. MoreoVER, WE INVESTIGATE THE PERFORMANCE VARIATIONS IN DockER CONTAINERS WHEN CONTROL GROUPS (cgroups) ARE USED FOR RESOURCE limitation. FOR EASE OF PRESENTATION AND REPRODUCIBILITY, WE USE Cloud Evaluation Exper- IMENT Methodology (CEEM) TO CONDUCT OUR COMPREHENSIVE SET OF Experiments.
    [Show full text]
  • A Comparative Analysis Between Traditional Virtualization and Container Based Virtualization for Advancement of Open Stack Cloud
    ISSN (Online) 2394-2320 International Journal of Engineering Research in Computer Science and Engineering (IJERCSE) Vol 5, Issue 4, April 2018 A Comparative Analysis between Traditional Virtualization and Container Based Virtualization for Advancement of Open Stack Cloud [1] Krishna Parihar, [2] Arjun Choudhary, [3] Vishrant Ojha [1][2] Department of Computer Science and Engineering, Sardar Patel University of police, Security and Criminal Justice, Jodhpur Abstract: - LXD based machine containerized new concept in the virtualization world. Its give performance to the bare metal virtualizations. A Centralized system is accessed through IP and can be scalable on demand as per requirement, Technology that eases the user problem like hardware, as well as software most popular technologies, is known as Cloud Computing. As per enterprise and industries demand cloud computing holds a big part of IT world. An OpenStack is a way to manage public and private cloud computing platform. A Linux Container Hypervisor brings Cloud Computing to the next generation Hypervisor with its features Fast, Simple, Secure. The main goal of this paper is factual calibrate is determine various virtualization technique and performance analysis. Keywords— OpenStack, LXD, Cloud Computing, Virtualization, Container, Hypervisor power their public cloud infrastructure.[2] The core I. INTRODUCTION component of virtualization is Hypervisors. Analysis of structured and consistent data has seen A B. Hypervisor cloud computing technologies have been rapidly devel- It is a software which provides isolation for virtual ma- oping. resources are dynamically enlarged, virtualized as chines running on top of physical hosts. The thin layer of well as feed as a service over the Internet, it permits software that typically provides capabilities to virtual providers to provide users connected to a virtually parti-tioning that runs directly on hardware, It provides a unlimited number of resources i.e.
    [Show full text]
  • Application Container Security Guide
    NIST Special Publication 800-190 Application Container Security Guide Murugiah Souppaya John Morello Karen Scarfone This publication is available free of charge from: https://doi.org/10.6028/NIST.SP.800-190 C O M P U T E R S E C U R I T Y NIST Special Publication 800-190 Application Container Security Guide Murugiah Souppaya Computer Security Division Information Technology Laboratory John Morello Twistlock Baton Rouge, Louisiana Karen Scarfone Scarfone Cybersecurity Clifton, Virginia This publication is available free of charge from: https://doi.org/10.6028/NIST.SP.800-190 September 2017 U.S. Department of Commerce Wilbur L. Ross, Jr., Secretary National Institute of Standards and Technology Kent Rochford, Acting Under Secretary of Commerce for Standards and Technology and Acting Director NIST SP 800-190 APPLICATION CONTAINER SECURITY GUIDE Authority This publication has been developed by NIST in accordance with its statutory responsibilities under the Federal Information Security Modernization Act (FISMA) of 2014, 44 U.S.C. § 3551 et seq., Public Law (P.L.) 113-283. NIST is responsible for developing information security standards and guidelines, including minimum requirements for federal information systems, but such standards and guidelines shall not apply to national security systems without the express approval of appropriate federal officials exercising policy authority over such systems. This guideline is consistent with the requirements of the Office of Management and Budget (OMB) Circular A-130. Nothing in this publication should be taken to contradict the standards and guidelines made mandatory and binding on federal agencies by the Secretary of Commerce under statutory authority.
    [Show full text]
  • Separating Protection and Management in Cloud Infrastructures
    SEPARATING PROTECTION AND MANAGEMENT IN CLOUD INFRASTRUCTURES A Dissertation Presented to the Faculty of the Graduate School of Cornell University in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy by Zhiming Shen December 2017 c 2017 Zhiming Shen ALL RIGHTS RESERVED SEPARATING PROTECTION AND MANAGEMENT IN CLOUD INFRASTRUCTURES Zhiming Shen, Ph.D. Cornell University 2017 Cloud computing infrastructures serving mutually untrusted users provide se- curity isolation to protect user computation and resources. Additionally, clouds should also support flexibility and efficiency, so that users can customize re- source management policies and optimize performance and resource utiliza- tion. However, flexibility and efficiency are typically limited due to security requirements. This dissertation investigates the question of how to offer flexi- bility and efficiency as well as strong security in cloud infrastructures. Specifically, this dissertation addresses two important platforms in cloud in- frastructures: the containers and the Infrastructure as a Service (IaaS) platforms. The containers platform supports efficient container provisioning and execut- ing, but does not provide sufficient security and flexibility. Different containers share an operating system kernel which has a large attack surface, and kernel customization is generally not allowed. The IaaS platform supports secure shar- ing of cloud resources among mutually untrusted users, but does not provide sufficient flexibility and efficiency. Many powerful management primitives en- abled by the underlying virtualization platform are hidden from users, such as live virtual machine migration and consolidation. The main contribution of this dissertation is the proposal of an approach in- spired by the exokernel architecture that can be generalized to any multi-tenant system to improve security, flexibility, and efficiency.
    [Show full text]
  • Introduction to Containers
    Introduction to Containers Martin Čuma Center for High Performance Computing University of Utah [email protected] Overview • Why do we want to use containers? • Containers basics • Run a pre-made container • Build and deploy a container • Containers for complex software 06-Nov-20 http://www.chpc.utah.edu Slide 2 Hands on setup 1. Download the talk slides http://home.chpc.utah.edu/~mcuma/chpc/Containers20s.pdf https://tinyurl.com/yd2xtv5d 2. Using FastX or Putty, ssh to any CHPC Linux machine, e.g. $ ssh [email protected] 3. Load the Singularity and modules $ module load singularity 06-Nov-20 http://www.chpc.utah.edu Slide 3 Hands on setup for building containers 1. Create a GitHub account if you don’t have one https://github.com/join {Remember your username and password!} 2. Go to https://cloud.sylabs.io/home click Remote Builder, then click Sign in to Sylabs and then Sign in with GitHub, using your GitHub account 3. Go to https://cloud.sylabs.io/builder click on your user name (upper right corner), select Access Tokens, write token name, click Create a New Access Token, and copy it 4. In the terminal on frisco, install it to your ~/.singularity/sylabs-token file nano ~/.singularity/sylabs-token, paste, ctrl-x to save 06-Nov-20 http://www.chpc.utah.edu Slide 4 Why to use containers? 06-Nov-20 http://www.chpc.utah.edu Slide 5 Software dependencies • Some programs require complex software environments – OS type and versions – Drivers – Compiler type and versions – Software dependencies • glibc, stdlibc++ versions • Other libraries
    [Show full text]
  • Copy, Rip, Burn : the Politics of Copyleft and Open Source
    Copy, Rip, Burn Berry 00 pre i 5/8/08 12:05:39 Berry 00 pre ii 5/8/08 12:05:39 Copy, Rip, Burn The Politics of Copyleft and Open Source DAVID M. BERRY PLUTO PRESS www.plutobooks.com Berry 00 pre iii 5/8/08 12:05:39 First published 2008 by Pluto Press 345 Archway Road, London N6 5AA www.plutobooks.com Copyright © David M. Berry 2008 The right of David M. Berry to be identifi ed as the author of this work has been asserted by him in accordance with the Copyright, Designs and Patents Act 1988. British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library ISBN 978 0 7453 2415 9 Hardback ISBN 978 0 7453 2414 2 Paperback Library of Congress Cataloging in Publication Data applied for This book is printed on paper suitable for recycling and made from fully managed and sustained forest sources. Logging, pulping and manufacturing processes are expected to conform to the environmental standards of the country of origin. The paper may contain up to 70% post consumer waste. 10 9 8 7 6 5 4 3 2 1 Designed and produced for Pluto Press by Chase Publishing Services Ltd, Sidmouth, EX10 9QG, England Typeset from disk by Stanford DTP Services, Northampton Printed and bound in the European Union by CPI Antony Rowe, Chippenham and Eastbourne Berry 00 pre iv 5/8/08 12:05:41 CONTENTS Acknowledgements ix Preface x 1. The Canary in the Mine 1 2. The Information Society 41 3.
    [Show full text]
  • Openshift Container Platform 4.6 Architecture
    OpenShift Container Platform 4.6 Architecture An overview of the architecture for OpenShift Container Platform Last Updated: 2021-09-22 OpenShift Container Platform 4.6 Architecture An overview of the architecture for OpenShift Container Platform Legal Notice Copyright © 2021 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/ . In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
    [Show full text]
  • Singularity Container Documentation Release 3.6
    Singularity Container Documentation Release 3.6 User Docs Oct 13, 2020 CONTENTS 1 Getting Started & Background Information3 1.1 Introduction to Singularity........................................3 1.2 Quick Start................................................5 1.3 Security in Singularity.......................................... 15 2 Building Containers 19 2.1 Build a Container............................................. 19 2.2 Definition Files.............................................. 23 2.3 Build Environment............................................ 33 2.4 Support for Docker and OCI....................................... 37 2.5 Fakeroot feature............................................. 78 3 Signing & Encryption 81 3.1 Signing and Verifying Containers.................................... 81 3.2 Key commands.............................................. 86 3.3 Encrypted Containers.......................................... 88 4 Sharing & Online Services 93 4.1 Remote Endpoints............................................ 93 4.2 Cloud Library.............................................. 96 5 Advanced Usage 101 5.1 Bind Paths and Mounts.......................................... 101 5.2 Persistent Overlays............................................ 104 5.3 Running Services............................................. 107 5.4 Environment and Metadata........................................ 118 5.5 OCI Runtime Support.......................................... 128 5.6 Plugins.................................................. 143 5.7
    [Show full text]
  • Cgroups, Containers and Htcondor, Oh My
    Cgroups, containers and HTCondor, oh my Center for High Throughput Computing Outline › Why put contain jobs? › Ersatz HTCondor containment › Docker containers › Singularity containers 2 3 Protections 1) Protect the machine from the job. 2) Protect the job from the machine. 3) Protect one job from another. 3 The ideal container › Allows nesting › Need not require root › Can’t be broken out of › Portable to all OSes › Allows full management: Creation // Destruction Monitoring Limiting 4 Resources a job can (ab)use CPU Memory Disk Network Signals L1-2-3 cache 5 HTCondor’s containment 6 PID namespaces › You can’t kill what you can’t see › Requirements: RHEL 6 or later USE_PID_NAMESPACES = true • (off by default) Must be root 7 PID Namespaces Init (1) Master (pid 15) Startd (pid 26) Starter (pid 73) Starter (pid 39) Condor_init (pid 1) Condor_init (pid 1) Job A (pid 2) Job B (pid 2) 8 MOUNT_UNDER_SCRATCH › Or, “Shared subtrees” › Goal: protect /tmp from shared jobs › Requires Condor 8.0+ RHEL 5 HTCondor must be running as root MOUNT_UNDER_SCRATCH = /tmp,/var/tmp 9 MOUNT_UNDER_SCRATCH MOUNT_UNDER_SCRATCH=/tmp,/var/tmp Each job sees private /tmp, /var/tmp Downsides: No sharing of files in /tmp 10 Control Groups aka “cgroups” › Two basic kernel abstractions: 1) nested groups of processes 2) “controllers” which limit resources 11 Control Cgroup setup › Implemented as filesystem Mounted on /sys/fs/cgroup, Groups are per controller • E.g. /sys/fs/cgroup/memory/my_group • /sys/fs/cgroup/cpu/my_group Interesting contents of virtual groups: • /sys/fs/cgroup/memory/my_group/tasks
    [Show full text]