Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Mastering Ceph
Mastering Ceph

Mastering Ceph: Redefine your storage system

eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Mastering Ceph

Deploying Ceph

Once you have planned your Ceph project and are ready to either deploy a test or production cluster, you will need to consider the method you wish to use to both deploy and maintain it. This chapter will demonstrate how to quickly deploy test environments for testing and development by the use of Vagrant. It will also explain the reasons why you might want to consider using an orchestration tool to deploy Ceph rather than using the supplied Ceph tools. As a popular orchestration tool, Ansible will be used to show how quickly and reliably a Ceph cluster can be deployed and the advantages that using it can bring.

In this chapter, you will learn about the following topics:

  • Preparing a testing environment with Vagrant and VirtualBox
  • Learning about the differences between ceph-deploy and orchestration tools
  • The advantages of using orchestration tools
  • Installing and using Ansible
  • Configuring the Ceph Ansible...

Preparing your environment with Vagrant and VirtualBox

Although a test cluster can be deployed on any hardware or virtual machine (VM), for the purposes of this book, a combination of Vagrant and VirtualBox will be used. This will allow rapid provisioning of the VMs and ensure a consistent environment.

VirtualBox is a free and open source type 2 (hosted) hypervisor currently being developed by Oracle. Performance and features may be lacking compared with high-end hypervisors, but its lightweight approach, and multi-OS support lends itself to be a prime candidate for testing.

Vagrant helps allow an environment that may comprise many machines to be created quickly and efficiently. It works with the concepts of boxes, which are predefined templates for use with hypervisors and its Vagrantfile, which defines the environment to be built. It supports multiple hypervisors and allows a Vagrantfile to be portable across...

Orchestration

One solution to making the installation and management of Ceph easier is to use an orchestration tool. There are several tools available, such as Puppet, Chef, Salt, and Ansible, all of which have Ceph modules available. If you are already using an orchestration tool in your environment, then it would be recommended that you stick to using that tool. For the purposes of this book, Ansible will be used; this is for a number of reasons:

  • It's the favored deployment method of Red Hat, who are the owners of both the Ceph and Ansible projects
  • It has a well-developed and mature set of Ceph roles and playbooks
  • Ansible tends to be easier to learn if you have never used an orchestration tool before
  • It doesn't require a central server to be set up, which means demonstrations are more focused on using the tool rather than installing it

All tools follow the same principle of where you provide them with...

Ansible

As mentioned, Ansible will be the orchestration tool of choice for this book, let's look at it in a bit more detail.

Ansible is an agentless orchestration tool written in Python, which uses SSH to carry out configuration tasks on remote nodes. It was first released in 2012 and has gained widespread adoption, and it is known for its ease of adoption and low learning curve. Red Hat purchased the commercial company Ansible, Inc. in 2015 and so has a very well-developed and close-knit integration for deploying Ceph.

Files named playbooks are used in Ansible to describe a list of commands, actions, and configurations to carry out on specified hosts or groups of hosts and are stored in a YAML file format. Instead of having large unmanageable playbooks, Ansible roles can be created that allow a playbook to contain a single task, which may then carry out a number of tasks associated with the role.

The use of...

A very simple playbook

To demonstrate how playbooks work, the following example will show a small playbook that also makes use of the variables we configured earlier:

- hosts: mon1 osd1
tasks:
- name: Echo Variables
debug: msg="I am a {{ a_variable }}"

Now run the playbook. Note the command to run a playbook that differs from running ad hoc Ansible commands:

    $ ansible-playbook /etc/ansible/playbook.yml

The preceding command gives the following output:

The output shows the playbook being executed on both mon1 and osd1 as they are in groups, which are children of the parent group ceph. Also, note how the output is different between the two servers as they are picking up the variables that you set earlier in the group_vars directory.

Finally, the last couple of lines show the overall run status of the playbook run. You can now destroy your Vagrant environment again, ready for the next section:

    vagrant...

Adding the Ceph Ansible modules

We can use git to clone the Ceph Ansible repository:

    git clone https://github.com/ceph/ceph-ansible.git

sudo cp -a ceph-ansible/* /etc/ansible/

The preceding commands gives the following output:

Let's also explore some of the key folders in the git repository:

  • group_vars: We've already covered what lives in here and will explore the possible configuration options in more detail later.
  • infrastructure-playbooks: This directory contains prewritten playbooks to carry out some standard tasks, such as deploying cluster or adding OSDs to an existing one. The comments at the top of the playbooks give a good idea of what they do.
  • roles: This directory contains all the roles that make up the Ceph Ansible modules. You will see that there is a role for each Ceph component, these are what are called via the playbooks to install, configure and maintain Ceph.

In order to be...

Change and configuration management

If you deploy your infrastructure with an orchestration tool such as Ansible, managing the Ansible playbooks becomes important. As we have seen Ansible allows you to rapidly deploy both the initial Ceph cluster but also configuration updates further down the line. It must be appreciated that this power can also have devastating effects if incorrect configuration or operations are deployed. By implementing some form of configuration management, Ceph administrators will clearly be able to see what changes have been made to the Ansible playbooks before running them.

A recommended approach would be to store your Ceph Ansible configuration in a git repository, this will allow you to track changes and gives the ability to implement some form of change control either by monitoring git commits or by forcing people to submit merge requests into the master branch.

...

Summary

In this chapter you will have learnt about the various deployment methods of Ceph that are available and the differences between them. You will now also have a basic understanding of how Ansible works and how to deploy a Ceph cluster with it. It would be advisable at this point to continue investigating and practicing deployment and configuration of Ceph with Ansible, so that you are confident to use it in production environments. The rest of this book will also make several assumptions that you have fully understood the contents of this chapter in order to manipulate the configuration of Ceph.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Leverage Ceph's advanced features such as erasure coding, tiering, and Bluestore
  • Solve large-scale problems with Ceph as a tool by understanding its strengths and weaknesses to develop the best solutions
  • A practical guide that covers engaging use cases to help you use advanced features of Ceph effectively

Description

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.

Who is this book for?

If you are a developer and an administrator who has deployed a Ceph cluster before and are curious about some of the most advanced features in order to improve performance then this book is for you

What you will learn

  • •Know when and how to use some of Ceph s advanced new features
  • • Set up a test cluster with Ansible and some virtual machines using VirtualBox and Vagrant
  • •Develop novel solutions to massive problems with librados and shared object classes.
  • • Choose intelligent parameters for an erasure coded pool and set it up.
  • • Configure the Bluestore settings and see how they interact with different hardware configurations.
  • • Keep Ceph running through thick and thin with tuning, monitoring and disaster
  • recovery advice.

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 30, 2017
Length: 240 pages
Edition : 1st
Language : English
ISBN-13 : 9781785881282
Vendor :
Red Hat
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : May 30, 2017
Length: 240 pages
Edition : 1st
Language : English
ISBN-13 : 9781785881282
Vendor :
Red Hat
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 115.97
Ceph Cookbook
€36.99
Learning Ceph
€41.99
Mastering Ceph
€36.99
Total 115.97 Stars icon

Table of Contents

11 Chapters
Planning for Ceph Chevron down icon Chevron up icon
Deploying Ceph Chevron down icon Chevron up icon
BlueStore Chevron down icon Chevron up icon
Erasure Coding for Better Storage Efficiency Chevron down icon Chevron up icon
Developing with Librados Chevron down icon Chevron up icon
Distributed Computation with Ceph RADOS Classes Chevron down icon Chevron up icon
Monitoring Ceph Chevron down icon Chevron up icon
Tiering with Ceph Chevron down icon Chevron up icon
Tuning Ceph Chevron down icon Chevron up icon
Troubleshooting Chevron down icon Chevron up icon
Disaster Recovery Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(4 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Hosam Al Ali Aug 09, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is an excellent book, it contains hands on sample and practice
Amazon Verified review Amazon
Maged Mokhtar Jun 23, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is an excellent book, it contains hands on no fluff and up to date information that is hard to find. The author is well versed in the subject and relays a lot of his experience in concise form. I recommend it to anyone involved in Ceph at all levels.
Amazon Verified review Amazon
Amedeo Aug 10, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It clarified to me concepts, and how to use, BlueStore, rbd-mirror and jerasure coding.If you are new to Ceph I strong recommend this book, but also if just use Ceph in production / POC / test and you want to deeply understand Ceph I recommend this book
Amazon Verified review Amazon
Brian H Dec 27, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Nicely written and easy to follow.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.