Book Image

Mastering Ceph

By : Nick Fisk
Book Image

Mastering Ceph

By: Nick Fisk

Overview of this book

Mastering Ceph covers all that you need to know to use Ceph effectively. Starting with design goals and planning steps that should be undertaken to ensure successful deployments, you will be guided through to setting up and deploying the Ceph cluster, with the help of orchestration tools. Key areas of Ceph including Bluestore, Erasure coding and cache tiering will be covered with help of examples. Development of applications which use Librados and Distributed computations with shared object classes are also covered. A section on tuning will take you through the process of optimisizing both Ceph and its supporting infrastructure. Finally, you will learn to troubleshoot issues and handle various scenarios where Ceph is likely not to recover on its own. By the end of the book, you will be able to successfully deploy and operate a resilient high performance Ceph cluster.
Table of Contents (12 chapters)

How to use librados?

To get started with librados, a development environment is needed. For the examples in this chapter, one of the monitor nodes can be used to act as both the development environment and the client to run the developed application. The examples in this book assume you are using a Debian based distribution:

  1. Firstly, install the base build tools for the operating system:
       $ sudo apt-get install build-essential

The preceding command gives the following output:

  1. Install the librados development library:
       $ sudo apt-get install librados-dev

The preceding command gives the following output:

  1. Now that your environment is complete, let's create a quick application written in C to establish a connection to the test Ceph cluster:
       $ mkdir test_app
$ cd test_app
  1. Create a file called test_app.c with your favorite text editor and place the following in it: