Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Ceph

You're reading from   Mastering Ceph Infrastructure storage solutions with the latest Ceph release

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789610703
Length 356 pages
Edition 2nd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Nick Fisk Nick Fisk
Author Profile Icon Nick Fisk
Nick Fisk
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Planning And Deployment FREE CHAPTER
2. Planning for Ceph 3. Deploying Ceph with Containers 4. BlueStore 5. Ceph and Non-Native Protocols 6. Section 2: Operating and Tuning
7. RADOS Pools and Client Access 8. Developing with Librados 9. Distributed Computation with Ceph RADOS Classes 10. Monitoring Ceph 11. Tuning Ceph 12. Tiering with Ceph 13. Section 3: Troubleshooting and Recovery
14. Troubleshooting 15. Disaster Recovery 16. Assessments 17. Other Books You May Enjoy

Example librados application

We will now go through some example librados applications that use librados to get a better understanding of what you can accomplish with the library.

The following example will take you through the steps to create an application which, when given an image file as a parameter, will store the image as an object in a Ceph cluster and store various attributes about the image file as object attributes. The application will also allow you to retrieve the object and export it as an image file. This example will be written in Python, which is also supported by librados. The following example also uses the Python Imaging Library (PIL) to read an image's size and the argument parser library to read command-line parameters:

  1. Install the librados Python bindings and image-manipulation libraries:
$ sudo apt-get install python-rados python-imaging

The preceding...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image