Deploying the Cluster
Prerequisites
- All the OSs must support the Python 3.x environment.
- The basic environment image source, password-free, and NTP service configurations have been completed.
For details, see "Configuring the Deployment Environment" in Ceph Block Storage Deployment Guide.
- The following dependencies have been installed: pyOpenSSL, werkzeug, and prettytable. If not, run the following command to install:
1 2 3
pip3 install --upgrade pip pip3 install setuptools_rust pip3 install pyOpenSSL werkzeug prettytable
- A Ceph user has been created. If not, run the following commands to create a user:
1 2
echo 'ceph:x:167:' >> /etc/group echo 'ceph:x:167:167:Ceph daemons:/var/lib/ceph:/sbin/nologin' >> /etc/passwd
Deploying a Ceph Cluster
- Copy the compiled RPM package to the /home/local_ceph directory.
1 2
mkdir /home/local_ceph cp -r /root/rpmbuild/RPMS/* /home/local_ceph/
- Create a local source.
- Create a repo source.
cd /home/local_ceph createrepo .
- Create a local_ceph.repo file.
1vi /etc/yum.repos.d/local_ceph.repo - Press i to enter the insert mode and add the following content to the end of the file:
1 2 3 4 5
[local_ceph] name=local_ceph baseurl=file:///home/local_ceph enable=1 gpgcheck=0
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Create a repo source.
- Generate the local Yum cache.
1yum clean all && yum makecache
- Install the dependencies.
yum install -y python-sphinx rdma-core-devel systemd-devel openldap-devel leveldb-devel snappy-devel lz4-devel curl-devel expat-devel liboath-devel lttng-ust-devel libbabeltrace-devel python3-Cython fuse-devel libnl3-devel libaio-devel gperf librabbitmq-devel gperftools libcap-ng-devel
- Check whether the installation is successful.
yum repolist
The command output displays the list of installed dependencies.
- Install Ceph.
yum install -y ceph-14.2.8
Check the Ceph version. If the version is 14.2.8, the installation is successful.
1ceph -v
- Deploy MON and MGR nodes.
For details, see "Deploying MON Nodes" and "Deploying MGR Nodes" in Ceph Block Storage Deployment Guide.
In the deployment guide, the Ceph image source is the official Ceph image, which is a Ceph RPM package that does not contain new features. Therefore, you need to use the local source to configure the compiled RPM package.
- Deploy OSD nodes.
Parent topic: Compiling and Deploying Ceph