To deploy our first Ceph cluster, we will use theceph-ansible
tool to install and configure Ceph on all three virtual machines. Theceph-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:
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
.
Copy ceph-ansible
package on ceph-node1
from the Ceph-Cookbook-Second-Edition
directory.
- Use
vagrant
as the password for the root user:
# cd Ceph-Designing-and-Implementing-Scalable-Storage-Systems
# scp ceph-ansible-2.2.10-38.g7ef908a.el7.noarch.rpm root@ceph-node1:/root
- Log in to
ceph-node1
and installceph-ansible
onceph-node1
:
[root@ceph-node1 ~]# yum install ceph-ansible-2.2.10-38.g7ef908a.el7.noarch.rpm -y
- Update the Ceph hosts to
/etc/ansible/hosts
:
- Verify that Ansible can reach the Ceph hosts mentioned in
/etc/ansible/hosts
:
>
- Create a symbolic link to the Ansible
group_vars
directory in the/etc/ansible/
directory:
- Go to
/etc/ansible/group_vars
and copy anall.yml
file from theall.yml.sample
file and open it to define configuration options' values:
- Define the following configuration options in
all.yml
for the latest jewel version on CentOS 7:
- Go to
/etc/ansible/group_vars
and copy anosds.yml
file from theosds.yml.sample
file and open it to define configuration options' values:
- Go to
/usr/share/ceph-ansible
and addretry_files_save_path
option inansible.cfg
in the[defaults]
tag:
- 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: