Lab - 2 Deploying The Ceph Cluster Using Cephadm
Lab - 2 Deploying The Ceph Cluster Using Cephadm
Introduction
In this Lab, you will learn how to deploy the ceph cluster using Cephadm tool.
1. Ensure that you have logged-in as root user with password as linux on ceph-mon1 node.
1.1 Let us first fetch the most recent version of the cephadm standalone script from github
using curl.
# chmod +x cephadm
output:
# ./cephadm install
output
# which cephadm
output:
# mkdir -p /etc/ceph
# cephadm bootstrap --mon-ip 192.168.100.51
Note: At the end of installation, the dashboard credentials are displayed, please save the details for
future use.
Note: The cephadm shell command launches a bash shell in a container with all of the Ceph packages
installed. By default, if configuration and keyring files are found in /etc/ceph on the host, they are
passed into the container environment so that the shell is fully functional.
1.8 Verify that in the backend there are containers created and running.
# ceph orch ps
output:
# ceph -v
Output:
# ceph status
Output:
To add each new host to the cluster, Install the cluster’s public SSH key in the new host’s root user’s
authorized_keys file:
1.14 Tell Ceph that the new node is part of the cluster:
1.15 Let us add labels to the hosts for our convenience and ease of deployment
Output:
Note: Be sure to include the first (bootstrap) host in this list. It takes around 5 minutes for all the
daemons to spawn up. Be patient!
Cephadm will be automatically deploy monitors on the hosts labeled as mon, this feature can be
disabled by passing --unmanaged option. We will see this is next step.
Output:
----OR----
1.23 An inventory of storage devices on all cluster hosts can be displayed with:
Output:
Note: Alternatively we can tell ceph to consume any available and unused storage device by specifying
the command “ceph orch apply osd --all-available-devices”.
1.25 Verify the ceph cluster status to verify is all the monitors and osd daemons are reflecting.
# ceph status
Output:
Note: It take around 5 minutes for all the daemons to spawn up. Be patient! To see HEALTH_OK.