OpenStack Object Storage Essentials (Update) - Amar Kapadia - E-Book

OpenStack Object Storage Essentials (Update) E-Book

Amar Kapadia

0,0
23,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

If you are an IT administrator and you want to enter the world of cloud storage using OpenStack Swift, then this book is ideal for you. Basic knowledge of Linux and server technology is beneficial to get the most out of the book.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 183

Veröffentlichungsjahr: 2015

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

OpenStack Object Storage (Swift) Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Cloud Storage – Why Can't I Be Like Google?
What constitutes cloud storage?
Reduced TCO
Unlimited scalability
Elastic
On-demand
Universal access
Multitenancy
Data durability and availability
Limitations of cloud storage
Performance
New APIs
Object storage
The importance of being open
OpenStack Swift
Summary
2. OpenStack Swift Architecture
Logical organization of objects
Swift implementation and architecture
Key architectural principles
Physical data organization
Data path software servers
A day in the life of a create operation
A day in the life of a read operation
A day in the life of an update operation
A day in the life of a delete operation
Post-processing software components
Replication
Updaters
Auditors
Other processes
Inline middleware options
Authentication
Other modules
Additional features
Large object support
Metadata
Multirange support
CORS
Server-side copies
Cluster health
Summary
3. Installing OpenStack Swift
Hardware planning
Server setup and network configuration
Pre-installation steps
Downloading and installing Swift
Setting up storage server nodes
Installing services
Formatting and mounting hard disks
RSYNC and RSYNCD
Setting up the proxy server node
The Keystone service
Installing MariaDB
Installing Keystone
The ring setup
Multiregion support
Finalizing the installation
Storage policies
Implementing storage policies
Applying storage policies
Summary
4. Using Swift
Installing clients
Creating a token using Keystone authentication
Displaying metadata information for an account, container, or object
Using the Swift client CLI
Using cURL
Using the specialized REST API client
Listing containers
Using the Swift client CLI
Using cURL
Listing objects in a container
Using the Swift client CLI
Using cURL
Using the REST API
Updating the metadata for a container
Using the Swift client CLI
Using the REST API
Environment variables
The pseudo-hierarchical directories
Container ACLs
Transferring large objects
Amazon S3 API compatibility
Accessing Swift using S3 commands
Accessing Swift using client libraries
Java
Python
Ruby
Summary
5. Additional Swift Interfaces
Using Swift for virtual machine storage
Swift in Sahara
Hadoop Cluster with Sahara
Using Swift with Sahara
Running a job in Sahara
Authenticating with Swift proxy
Summary
6. Monitoring and Managing Swift
Routine management
Swift cluster monitoring
Swift Recon
Swift Informant
Swift dispersion tool
StatsD
Swift metrics
Tulsi – a Swift health monitoring tool
Architecture of Tulsi
Deploying Tulsi
Running Tulsi
Anomaly detection in Tulsi
Logging using rsyslog
Failure management
Detecting drive failures
Handling drive failure
Handling node failure
Proxy server failure
Zone and region failure
Capacity planning
Adding new drives
Adding new storage and proxy servers
Migrations
Summary
7. Docker Intercepts Swift
Swift with Docker
Installation of Docker
Basic commands for the Docker user
Setting up a Swift proxy container using the Docker image
Setting up the storage container using the Docker image
Setting up a Swift cluster using a Dockerfile
Creating a proxy container using a Dockerfile
Creating a storage container using a Dockerfile
Summary
8. Choosing the Right Hardware
The hardware list
The hardware selection criteria
Choosing the storage server configuration
Determining the region and zone configuration
Choosing the account and container server configuration
Selecting the proxy server configuration
Choosing the network hardware
Choosing the ratios of various server types
Heterogeneous hardware
Choosing additional networking equipment
Selecting a cloud gateway
Additional selection criteria
The vendor selection strategy
Branded hardware
Commodity hardware
Summary
9. Tuning Your Swift Installation
Performance benchmarking
Hardware tuning
Software tuning
Ring considerations
Data path software tuning
Post-processing software tuning
Additional tuning parameters
Summary
10. Additional Resources
Use cases
Archival
Backup
Content repository
Collaboration
Data lakes
Operating systems used for OpenStack implementations
Virtualization used for OpenStack implementations
Provisioning and distribution tools
Monitoring and graphing tools
Additional information
Summary
A. Swift CLI Commands
Commands
list
Examples
stat
Examples
post
Examples
upload
Examples
download
Examples
delete
Examples
Index

OpenStack Object Storage (Swift) Essentials

OpenStack Object Storage (Swift) Essentials

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: May 2014

Second edition: May 2015

Production reference: 1270515

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78528-359-8

www.packtpub.com

Credits

Authors

Amar Kapadia

Kris Rajana

Sreedhar Varma

Reviewers

Steve Martinelli

Juan J. Martínez

Christian Schwede

Commissioning Editor

Kartikey Pandey

Acquisition Editor

Harsha Bharwani

Content Development Editor

Akashdeep Kundu

Technical Editors

Prajakta Mhatre

Tanmayee Patil

Copy Editor

Vikrant Phadke

Project Coordinator

Milton Dsouza

Proofreaders

Stephen Copestake

Safis Editing

Indexer

Rekha Nair

Graphics

Jason Monteiro

Production Coordinator

Manu Joseph

Cover Work

Manu Joseph

About the Authors

Amar Kapadia is a storage technologist and blogger based in the San Francisco Bay Area. He is currently the senior director of product marketing for Mirantis, the #1 pure-play OpenStack company. Prior to Mirantis, he was the senior director of strategy for EVault's Long-Term Storage Service, a public cloud storage offering based on OpenStack Swift. He has over 20 years of experience in storage, server, and I/O technologies at Emulex, Philips, and HP. Amar's current passion is in cloud and object storage technologies. He holds a master's degree in electrical engineering from the University of California, Berkeley.

When not working on OpenStack Swift, Amar can be found working on technologies such as Kubernetes, MongoDB, PHP, or jQuery. His blogs can be found at www.buildcloudstorage.com.

I would like to thank my wife for tolerating my late-night and weekend book-writing sessions.

Kris Rajana is a technologist and serial entrepreneur, passionate about building globally distributed teams to deliver innovative infrastructure solutions. His areas of interest include data infrastructure and fast-emerging open source cloud storage technologies, such as OpenStack, Cloud Foundry, Dockers/Containers, and big data. As the CEO of Vedams and Biarca (an offshoot of Vedams), he takes immense pride in his team and its development, which leads to excellence in execution. Kris has over 20 years of experience in managing engineering teams in fields such as space, aviation, storage at BFGoodrich Aerospace, Snap Appliance (currently Overland Storage), Adaptec, Xyratex, and Sullego. His current passion is DevOps, and he likes to leverage leading open source cloud technologies to make enterprises more agile, speed up the development and deployment of modern enterprise applications, and make IT operations more efficient. Kris earned his doctorate in engineering science from Pennsylvania State University.

He is a member of the board of the Pratham Bay Area Chapter. Along with the Vedams team, he is a sponsor of an urban learning center in Hyderabad. He is a student and sevak of the San Jose Chinmaya mission.

I would like to thank my family for their patience and support. I would also like to thank all my mentors and teachers over the years.

Sreedhar Varma has more than 15 years of experience in the storage industry, and has worked on various storage technologies such as SCSI, SAS, SATA, FC HBA drivers (Adaptec, Emulex, Qlogic, Promise, and so on), RAID, storage stacks of various operating systems, and system software for fault-tolerant and high-availability systems. He has good experience with SAN, NAS, and iSCSI networks; various storage arrays (Dothill, IBM, EMC, Netapp, Oracle Pillar, and so on); object storage implementations (Swift and Ceph); and software development using the corresponding REST APIs.

Sreedhar is currently working for Vedams software providing storage engineering services. In the past, he has worked for Stratus Technologies, Compaq, Digital Equipment Corp, and IBM. He has a master's degree in computer science from the University of Massachusetts.

About the Reviewers

Steve Martinelli is a software developer for IBM, and has been involved with OpenStack since the Grizzly release. He is a core contributor to OpenStack's Identity Service—Keystone. He primarily focuses on enabling Keystone to better integrate into enterprise environments. Steve has helped federated identity, auditing, and OAuth support to Keystone. In his spare time, he contributes to OpenStackClient, PyCADF, and Oslo Policy as a core contributor.

Juan J. Martínez is an experienced software developer with a strong open source background. He has been involved in OpenStack object storage since the Bexar release. His work related to Swift includes the customization and deployment of an award-winning cloud storage solution. He currently maintains a number of open source projects that provide access to the storage using common protocols (FTP, SFTP, and NBD). Juan is currently employed by Memset, a British cloud provider based in Cranleigh.

Christian Schwede is a principal software engineer working at Red Hat. He started working on OpenStack Swift in 2012. He is a core reviewer and contributor to Swift.

Christian's main interests are open source software, storage systems, cloud computing, and software-defined infrastructure.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

CIOs around the world are asking their teams to take advantage of cloud technologies as a way to cut costs and improve usability. OpenStack is a piece of fast-growing open source cloud software with a number of projects, and OpenStack Swift is one such project that allows users to build cloud storage. With Swift, users can not only build storage using inexpensive commodity hardware, but also use the public cloud storage built using the same technology. Starting with the fundamentals of cloud storage and OpenStack Swift, this book will provide you with the skills required to build and operate your own cloud storage or use a third-party cloud. This book is an invaluable tool if you want to get a head start in the world of cloud storage using OpenStack Swift. You will be equipped to build an on-premise private cloud, manage it, and tune it.

What this book covers

Chapter 1, Cloud Storage – Why Can't I Be Like Google?, introduces the need for cloud storage, the underlying technology of object storage, and an extremely popular open source object storage project called OpenStack Swift.

Chapter 2, OpenStack Swift Architecture, discusses the internals of the Swift architecture in detail, and shows you how elegantly Swift converts commodity hardware into reliable and scalable cloud storage.

Chapter 3, Installing OpenStack Swift, walks you through all the necessary steps required to perform a multinode Swift installation, and show you how to set it up along with the Keystone setup for authentication.

Chapter 4, Using Swift, describes the various ways in which you can access Swift object storage. This chapter also provides examples for the various access methods.

Chapter 5, Additional Swift Interfaces, describes the interfaces available for using Swift object storage as data stores (block storage), as well as the Swift interface within Sahara.

Chapter 6, Monitoring and Managing Swift, provides details on the various options that are available for monitoring and managing a Swift cluster. Some of the topics covered in this chapter are StatsD metrics, handling drive failures, node failures, and migrations.

Chapter 7, Docker Intercepts Swift, describes dockerization of Swift services and how to deploy a dockerized Swift image.

Chapter 8, Choosing the Right Hardware, provides you with the information necessary to make the right decision in selecting the required hardware for your cloud storage cluster.

Chapter 9, Tuning Your Swift Installation, walks you through a performance benchmarking tool and the basic mechanisms available for tuning a Swift cluster. Users utilizing Swift will need to tune their installation to optimize performance, durability, and availability, based on their unique workload.

Chapter 10, Additional Resources, explores several use cases of Swift and provides pointers on operating systems, virtualization, and distribution tools used across various Swift installations.

Appendix, Swift CLI Commands, provides details on various commands that can be run from a Swift CLI session.

What you need for this book

The various software components required to follow the instructions in the chapters are as follows:

Ubuntu operating system 12.04, which can be downloaded from the following sites:
http://www.ubuntu.com/download/serverhttp://releases.ubuntu.com/12.04/
OpenStack Swift Juno releaseThe python-swiftclient Swift CLIcURLSwift tools such as Swift-Recon, Swift-Informant, and Swift-DispersionA StatsD server from https://github.com/etsy/statsd/

Who this book is for

This book is targeted at IT and storage administrators who want to enter the world of cloud storage using OpenStack Swift. It also targets anyone who wishes to understand how to use OpenStack Swift, and developers looking to port their applications to OpenStack Swift.

This book also provides invaluable information for IT management professionals trying to understand the differences between traditional and cloud storage.

Basic knowledge of Linux and server technology will be beneficial if you want to get the most out of the book.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The name of the container should be provided after the stat command to get the container information."

A block of code is set as follows:

import org.jclouds.ContextBuilder; import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.openstack.swift.CommonSwiftAsyncClient; import org.jclouds.openstack.swift.CommonSwiftClient;

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

France.txt segment 0France.txt segment 1France.txt segment 2France.txt

Any command-line input or output is written as follows:

swift post -r tenant1:user1 cities

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the ErrataSubmissionForm link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.

Chapter 1. Cloud Storage – Why Can't I Be Like Google?

If you could build your IT systems and operations from scratch today, would you recreate what you have? That's the question Geir Ramleth, CIO of the construction giant Bechtel, asked himself in 2005. The answer was obviously not, and Bechtel ended up using the best practices from four Internet forerunners of that time—YouTube, Google, Amazon, and Salesforce—to create their next set of data centers.

This is exactly the same question CIOs and IT administrators around the world are asking themselves! In this book, you will learn about a revolutionary new storage system called cloud storage that uses the best practices (though not the exact technologies) of these web giants. This will cut thetotal cost of ownership (TCO) of storage by more than 10 times compared to traditional enterprise block or file storage.

This book will show you how you can implement cloud storage using a leading open source storage software stack called OpenStack Swift. Let's first explore some key elements that constitute cloud storage:

Dramatic reduction in TCOUnlimited scalabilityElasticity achieved by virtualizationOn-demand; that is, pay for what you useUniversal, that is, access from anywhereMultitenancy, which means sharing storage hardware with other departments or companiesData durability and availability, even with partial failures of the storage system

What constitutes cloud storage?

Let's review each of these elements of cloud storage in more detail.

Reduced TCO

Reduced TCO is the crux of cloud storage. Unless this new storage cuts storage cost by more than 10 times, it is not worth switching from block or file storage and dealing with something new and different. By total cost of ownership, we mean the total of capital expenditure (CAPEX) which involves equipment and operational expenditure (OPEX) in the form of IT storage administrators, electricity, power, cooling, and so on. This TCO reduction must be achieved without sacrificing durability (keeping data intact) or availability.

Unlimited scalability

Whether the cloud storage offering is public (that is, offered by a service provider) or private (that is, offered by central IT), it must have unlimited scalability. As we will see, cloud storage is built on distributed systems, which means that it scales very well. Traditional storage systems typically have an upper limit, making them unsuitable for cloud storage.

Elastic

Storage virtualization decouples and abstracts the storage pool from its physical implementation. This means that you can get an elastic (grow and shrink as required) and unified storage pool, when in reality, the underlying hardware is neither. IT professionals who have spent endless hours forecasting data growth and then waiting for their equipment will appreciate the magnitude of this benefit.

On-demand

Consumers do not reserve blocks of electricity and pay for it upfront, yet we routinely pay for storage upfront, whether we use it or not. Cloud storage uses a pay-as-you-go model, where you pay only for the data stored and the data accessed. For a private cloud, there is a minimal cluster to start with, beyond which it is on-demand. This can result in huge cost savings for the storage user.

Universal access

Existing enterprise storage has limitations in terms of access. Block storage is very limiting; a server has to be on the same storage area network, and storage volumes cannot be shared. Network-attached-storage (NAS) must be mounted to access it. This creates limitations on the number of clients and requires LAN access.

Cloud storage is extremely flexible—there is no limit on the number of users or from where you can access it. This is possible since cloud storage systems usually use a REST API over HTTP (GET, PUT, POST, and DELETE) instead of the traditional SCSI or CIFS/NFS protocols.

Multitenancy

Cloud storage is typically multi-tenant. The tenants may be different organizations in a public cloud or different departments in a private cloud. The benefit is centralized management and higher storage utilization, which reduces costs. Security, often an issue with multi-tenant systems, is addressed comprehensively in cloud storage through strong authentication, access controls, and various encryption options.

Data durability and availability

Cloud storage is