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:
- Install the librados Python bindings and image-manipulation libraries:
$ sudo apt-get install python-rados python-imaging
The preceding...