Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ceph Cookbook

You're reading from   Ceph Cookbook Practical recipes to design, implement, operate, and manage Ceph storage systems

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781788391061
Length 466 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Vikhyat Umrao Vikhyat Umrao
Author Profile Icon Vikhyat Umrao
Vikhyat Umrao
Michael Hackett Michael Hackett
Author Profile Icon Michael Hackett
Michael Hackett
Karan Singh Karan Singh
Author Profile Icon Karan Singh
Karan Singh
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Ceph – Introduction and Beyond 2. Working with Ceph Block Device FREE CHAPTER 3. Working with Ceph and OpenStack 4. Working with Ceph Object Storage 5. Working with Ceph Object Storage Multi-Site v2 6. Working with the Ceph Filesystem 7. Monitoring Ceph Clusters 8. Operating and Managing a Ceph Cluster 9. Ceph under the Hood 10. Production Planning and Performance Tuning for Ceph 11. The Virtual Storage Manager for Ceph 12. More on Ceph 13. An Introduction to Troubleshooting Ceph 14. Upgrading Your Ceph Cluster from Hammer to Jewel

Installing and configuring Ceph

To deploy our first Ceph cluster, we will use the ceph-ansible tool to install and configure Ceph on all three virtual machines. The ceph-ansible tool is a part of the Ceph project, which is used for easy deployment and management of your Ceph storage cluster. In the previous section, we created three virtual machines with CentOS 7, which have connectivity with the internet over NAT, as well as private host-only networks.

We will configure these machines as Ceph storage clusters, as mentioned in the following diagram:

Creating the Ceph cluster on ceph-node1

We will first install Ceph and configure ceph-node1 as the Ceph monitor and the Ceph OSD node. Later recipes in this chapter will introduce ceph-node2 and ceph-node3.

How to do it...

Copy ceph-ansible package on ceph-node1 from the Ceph-Cookbook-Second-Edition directory.

  1. Use vagrant as the password for the root user:
      # cd Ceph-Cookbook-Second-Edition
# scp ceph-ansible-2.2.10-38.g7ef908a.el7.noarch.rpm root@ceph-node1:/root
  1. Log in to ceph-node1 and install ceph-ansible on ceph-node1:
      [root@ceph-node1 ~]# 
yum install ceph-ansible-2.2.10-38.g7ef908a.el7.noarch.rpm -y
  1. Update the Ceph hosts to /etc/ansible/hosts:
  1. Verify that Ansible can reach the Ceph hosts mentioned in /etc/ansible/hosts:
  1. Create a directory under the root home directory so Ceph Ansible can use it for storing the keys:
>
  1. Create a symbolic link to the Ansible group_vars directory in the /etc/ansible/ directory:
  1. Go to /etc/ansible/group_vars and copy an all.yml file from the all.yml.sample file and open it to define configuration options' values:
  1. Define the following configuration options in all.yml for the latest jewel version on CentOS 7:
  1. Go to /etc/ansible/group_vars and copy an osds.yml file from the osds.yml.sample file and open it to define configuration options' values:
  1. Define the following configuration options in osds.yml for OSD disks; we are co-locating an OSD journal in the OSD data disk:
  1. Go to /usr/share/ceph-ansible and add retry_files_save_path option in ansible.cfg in the [defaults] tag:
  1. Run Ansible playbook in order to deploy the Ceph cluster on ceph-node1:

To run the playbook, you need site.yml, which is present in the same path: /usr/share/ceph-ansible/. You should be in the /usr/share/ceph-ansible/ path and should run following commands:

      # cp site.yml.sample site.yml
# ansible-playbook site.yml

Once playbook completes the Ceph cluster installation job and plays the recap with failed=0, it means ceph-ansible has deployed the Ceph cluster, as shown in the following screenshot:

You have all three OSD daemons and one monitor daemon up and running in ceph-node1.

Here's how you can check the Ceph jewel release installed version. You can run the ceph -v command to check the installed ceph version:

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 £16.99/month. Cancel anytime