Container Storage For Dummies, Red Hat Special Edition (1)

2y ago
144 Views
8 Downloads
1.80 MB
27 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Brady Himes
Transcription

Container StorageRed Hat Special Editionby Ed Tittel, Sayan Saha,Steve Watt, Michael Adam,and Irshad RaihanThese materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

Container Storage For Dummies , Red Hat Special EditionPublished byJohn Wiley & Sons, Inc.111 River St.Hoboken, NJ 07030‐5774www.wiley.comCopyright 2017 by John Wiley & Sons, Inc.No part of this publication may be reproduced, stored in a retrieval system or transmitted in anyform or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise,except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without theprior written permission of the Publisher. Requests to the Publisher for permission should beaddressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ07030, (201) 748‐6011, fax (201) 748‐6008, or online at http://www.wiley.com/go/permissions.Trademarks: Wiley, For Dummies, the Dummies Man logo, The Dummies Way, Dummies.com,Making Everything Easier, and related trade dress are trademarks or registered trademarks of JohnWiley & Sons, Inc. and/or its affiliates in the United States and other countries, and may not be usedwithout written permission. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss aretrademarks or registered trademarks of Red Hat, Inc. or its subsidiaries in the United States andother countries. The OpenStack Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States andother countries and are used with the OpenStack Foundation’s permission. Linux is the registeredtrademark of Linus Torvalds in the U.S. and other countries. Java is the registered trademark ofOracle America, Inc. in the United States and other countries. All other trademarks are the propertyof their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendormentioned in this book.LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKENO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY ORCOMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALLWARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULARPURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONALMATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOREVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER ISNOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IFPROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONALPERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLEFOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE ISREFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHERINFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THEINFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS ITMAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED INTHIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WASWRITTEN AND WHEN IT IS READ.For general information on our other products and services, or how to create a custom For Dummiesbook for your business or organization, please contact our Business Development Departmentin the U.S. at 877‐409‐4177, contact info@dummies.biz, or visit www.wiley.com/go/custompub.For information about licensing the For Dummies brand for products or services, contactBrandedRights&Licenses@Wiley.com.ISBN: 978‐1‐119‐41663‐0 (pbk); ISBN: 978‐1‐119‐41656‐2 (ebk)Manufactured in the United States of America10 9 8 7 6 5 4 3 2 1Publisher’s AcknowledgmentsSome of the people who helped bring this book to market include the following:Project Editor: Carrie A. BurchfieldEditorial Manager: Rev MengleAcquisitions Editor: Amy FandreiBusiness Development Representative:Ashley BarthThese materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

Table of ContentsIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1About This Book . 2Icons Used in This Book . 2Chapter 1: What’s the Big Deal withLinux Containers? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3What Is a Container, Exactly? . 3Why Containers Need Persistent Storage . 5Containers are ephemeral . 5Local storage isn’t enough . 5Storage adapters to the rescue . 6Don’t lose track of metadata . 6The Red Hat and Kubernetes Connection . 7Chapter 2: Looking at Storage for andin Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9What’s Wrong with Traditional Storage? . 9There’s More Than One Type of Container Storage. 10Chapter 3: What’s So Cool aboutContainer-Native Storage? . . . . . . . . . . . . . . . . . . . . . .11Container-Native Storage Is the Next Sliced Bread. 11Common Management Plane Makes Life Easier. 12Issues with static provisioning . 12The efficiency of dynamic provisioning. 13The Secret Sauce behind Container-Native Storage . 14Chapter 4: Container-Native Storage Is BlowingUp the Dev World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15Developers Have More Control . 15Developers Focus On What They Do Best: Code . 16These materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

ivContainer Storage For Dummies, Red Hat Special EditionChapter 5: Ten Reasons to Get on the ContainerStorage Bandwagon . . . . . . . . . . . . . . . . . . . . . . . . . . . .17The Future Is Here; Go With It . 17The Persistence Payoff for Container Storage . 18Orchestrators Simplify Container Management . 18More Automation with Dynamic Provisioning . 18Scalability . 19Developers Love It . 19Admins Love It. 19Lower TCO . 19It’s Open Source . 20Red Hat Knows Its Stuff . 20These materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

IntroductionLinux containers are an industry phenomenon that istop of mind in development shops around the globe.Containers have quickly moved from “science project” to production status in just a few years, for many good reasons. Themeteoric uptick in interest in containers is driven primarily bydevelopers and DevOps staff looking for a way to push morecode out the door, with more stable and usable code from theget‐go.Developer focus and interest has led to new containers builtto permit applications to scale rapidly, be more reliable, andoffer better performance than more conventional means ormethods. While developers like to think about what’s possible, admins tend to think in terms of what’s stable. They mustbe able to manage infrastructures quickly and easily and wantto know how containers can meet those requirements.Although many organizations still use traditional storageappliances, they don’t offer the agility needed by containerized environments. Containers are highly flexible and bringincredible scale to how apps and storage are delivered; traditional storage can be the bottleneck that stops this progress.The underlying storage should be highly elastic, easily provisioned by developers and admins, and, ideally, managed usingthe same orchestration framework (like Kubernetes) used forapplication containers.You discover throughout this book that a key part of achieving flexibility and scalability is container‐native storage, a typeof storage deployed inside containers along with the appsalready running there.These materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

2Container Storage For Dummies, Red Hat Special EditionAbout This BookThis book consists of six short chapters: Chapter 1 introduces Linux containers and why they’reuseful. It also covers the inherent lack of persistent storage in containers and the necessary workaround. Chapter 2 explains the various flavors of storage for andin containers. Chapter 3 takes a deeper look at container‐native storageand explores how a common management plane makescontainer storage easier for admins and developers. Chapter 4 describes the reasons why developers haveembraced container‐native storage. Chapter 5 offers ten compelling reasons why you shouldmove toward container storage ASAP.Chapters are designed to stand alone, so if you want to diginto SDS, jump to Chapter 2. Otherwise, start with Chapter 1to begin noodling through all things great and wonderfulabout Linux containers in general.Icons Used in This BookEvery For Dummies book includes small graphics called iconssprinkled around its margins. These icons call attention totext worth noting for some reason or another:Remember icons highlight points to recall as you immerseyourself in the ins and outs of container storage.As techies, we like sharing some of the inner details abouthow things work and why. We do understand that you mightnot need to know such details, so we mark tricks of the tradewith this icon to let you detour around them if you like.This icon flags on‐target information you can (and should) useto make the most of container storage.These materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

Chapter 1What’s the Big Deal withLinux Containers?In This Chapter Getting to know the Linux container Realizing why containers need persistent storage Making the Red Hat and Kubernetes connectionLinux containers offer a way for an infrastructure tobehave like an application. These self‐contained unitswrap up pretty much everything they need in a small package, making app delivery more efficient. In this chapter, youdiscover what containers are and why they need persistentstorage.What Is a Container, Exactly?A container is a small, lightweight bundle of one or moreapplications and the dependencies needed for that code torun. That means a container has code, a runtime environment, system tools, and libraries — the same stuff that youtraditionally install on a server. A container can also houseinfrastructure services such as storage, or a hybrid of appsand storage. Packaging everything together makes a containerhighly portable and results in fewer integration errors.Containers are often compared to virtual machines (VMs), buta container’s footprint and scope are much smaller. For example, a VM is like a heavy hammer. It assumes you’re runninga server and that the server can host multiple applications.A container needs a minimal amount of operating system andThese materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

4Container Storage For Dummies, Red Hat Special Editionsystem resources to run its contents, which could be oneapplication or several. And the container can run just aboutanywhere, even on a bare metal machine or in a VM — thecontainer doesn’t care.Implementing containers is quick and easy. Where it mighttake minutes or (gulp) days to spin up a fully functional VM,the time to get a container moving is typically seconds.Increased agility, scalability, and aggregation of services helpsIT be more efficient and cost‐effective, resulting in lower totalcost of ownership (TCO).Everything about containers sounds pretty great, but there’sat least one sticky issue to consider — persistent storage forstateful applications deployed in containers.The container ecosystemAlthough containers are independent entities, they work with a lot ofother technologies. You see a lot ofterms covered throughout the book,but here, you look at the big picture,from the Red Hat perspective: Container platform: The goal ofa container platform is to automate the packing and loadingof containers, for greater efficiency, in addition to providinggovernance for the overall appdevelopment process. Red HatOpenShift Container Platformenables developers to build,host, deploy, manage, and scalemulti‐container applications. Orchestrator: An orchestrator, such as Kubernetes, is apiece of software that managesapplication containers across acluster, ensuring that each container keeps running regardlessof conditions. (Kubernetes isGreek for the “helmsman” of aship, as in a ship holding manycontainers.) But Kubernetes canmanage more than just apps. Itcan help orchestrate storage incontainers, too. Kubernetes isincluded in Red Hat OpenShiftContainer Platform. Storage cluster: This is a network of storage nodes thatprovides high availability andscale to applications that need topersist data. The storage clusterproviding storage services couldreside outside or within thecontainer.These materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

Chapter 1: What’s the Big Deal with Linux Containers?5Why Containers NeedPersistent StorageFew applications are useful without some way to store data.Back in the day, Linux containers had no features for persisting data, and container engines and orchestrators couldn’tsupport or manage storage, either. But all that’s changed intoday’s brave new world.Containers are ephemeralA container, by nature, is a transient object. It might live onone server for a period of time and then head over to anotherif the orchestrator tells it to. While a container keeps itsbundle of software and dependencies wherever it goes, itdoesn’t store data so it can maintain a light footprint.Virtual machines (VMs) don’t have this problem. With VMs,you start with an image, modify it, and save the altered stateas a new VM. It’s the same thing with containers, but the container isn’t designed to persist any data that an applicationgenerates. If a process stops or the container is rebooted, allthe data associated with any applications within is lost. Heck,hypervisors have always allowed for persistent storage in oneform or the other. What’s up with containers?Local storage isn’t enoughLike with VMs, some applications may need to persist theirstate, data, and configuration. For example, a database container needs persistent storage for its data store (wherethe actual database lives). In addition, given the ephemeralnature of containers, applications may need to persist theirstate beyond the life of the container. Local storage isn’t sufficient because if the container moves to another host, it losesaccess to the data.It’s common in an on‐premise data center to find servers andlocal disks, with a lot of storage. (A good deal of that storageis wasted, but that’s beside the point right now.) Then consider a public cloud scenario. You have some local storageThese materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

6Container Storage For Dummies, Red Hat Special Editioncapacity, but it’s limited and often ephemeral. What if youhave no access to network storage or the service is down forno fault of yours? Until you solve this issue, you can’t hoststateful applications effectively.Stateful applications also require an underlying storage layerto provide enterprise features just like those available to appsdeployed in virtualized (and other runtime) environments.Storage adapters to the rescueWhen it comes to developers building containerized applications, they have two primary concerns. First, they need toprovision the storage their application will consume, andsecond, they need to ensure that their containerized application can mount and use the storage they provisioned in orderto get the persistence they need.In order to address the provisioning concern, OpenShift’sstorage framework allows provisioners to deliver volumesfrom a wide array of on‐premise and cloud storage platforms.Similarly, OpenShift provides volume plugins that ensurethat when a container is scheduled on a node, it can mountthe storage volume, start the container, and bind the volumemount to a directory within the container.Persistent volumes are storage connections that point to storage resources.No need to worry about the security of your data, either.If you’re using the right storage platform, you can restrictaccess to it using SELinux, which protects the data fromunauthorized changes or corruption.Don’t lose track of metadataMetadata is as important as containers themselves. Itdescribes the contents within each container, without whichmanagement across a cluster becomes a nightmare.Metadata is essentially arbitrary key‐value pairs in a containerimage. There’s all kinds of metadata, such as name, release,vendor, architecture, and so on.These materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.

Chapter 1: What’s the Big Deal with Linux Containers?7Developers can store metadata inside containers, along withother contents, but what if the container is damaged and nolonger functions?Persistent storage maps to information about containers ina cluster, which is needed to ensure secure and distributeddata storage for applications in containers, and proper delivery of each package. Bundling such critical information asmetadata within a container (for example, local disk storage)isn’t a great solution. Metadata is too important to the wholeprocess to risk it disappearing due to some failure or disaster.The best approach is to distribute metadata across multiplecontainers. The information could be stored in a container ofits own — something called container‐native storage — or incontainer‐ready storage. Linux containers offer flexibility andagility, plus packaging and distribution for applications, data,and metadata.The Red Hat and KubernetesConnectionRed Hat has been a solid contributor to the Kubernetescommunity, with the most contributors and contributionsafter Google. (A bunch of Star Trek‐loving Google engineersdesigned Kubernetes and released the first version in 2015.)Red Hat also has the second largest contributor base in theDocker community after Docker itself.Red Hat standardized on Kubernetes for its container platforms and has contributed open‐source volume plugins andprovisioners, such as iSCSI, FibreChannel, Amazon ElasticBlock Store, Azure File Storage, Google Compute Engine (GCE)Persistent Disks, and NFS along with a number of Red Hattechnologies, to Kubernetes.During the technology’s fledgling days, Red Hat quicklydoubled down on its efforts to build storage capabilities forKubernetes, resulting in breakthrough innovations that notThese materials are 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohib

discover what containers are and why they need persistent storage. What Is a Container, Exactly? A container is a small, lightweight bundle of one or more applications and the dependencies needed for that code to run. That means a container has code, a runtime environ-me

Related Documents:

Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade . Excel Workbook For Dummies and Roxio Easy Media Creator 8 For Dummies, . Greg went on to teach semester-

Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com and related trade dress are trademarks or registered . English Grammar For Dummies, English Grammar Workbook For Dummies, Research Papers For Dummies, College Admissions Essays For Dummies, SAT I . Getting the Story from Prose

Dummies, Solaris 9 For Dummies, Fedora Linux 2 For Dummies, and Linux Timesaving Techniques For Dummies. Gurdy Leete is a co-author of OpenOffice.org For Dummies, a technical editor for Free Software For Dummies, and the co-author of five other popular com-puter books. He’s also an award-winning software engineer and a co-author of

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

About the Author Geraldine Woods teaches English and directs the independent study program at the Horace Mann School in New York City. She is the author of more than 50 books, includ-ing English Grammar For Dummies, SAT For Dummies, Research Papers For Dummies, College Admission Essays For Dummies, AP English Literature For Dummies, and AP English Language and Composition For Dummies, all .

Container Storage Best Practices in 2017 . Keith Resar Red Hat Solution Architect January 24th, 2017 @KeithResar Agenda Container Storage Myths Container Storage Primer Review 6 Storage Drivers . The Docker community has documented a good bit of this detail in the official storage driver documentation

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