Installing Ceph on Fedora CoreOS
Ceph is a distributed storage system that provides a unified object, block and file storage interface. This tutorial will guide you through the steps to install Ceph on the latest version of Fedora CoreOS.
Prerequisites
Before you start, make sure you have the following:
- A system running the latest version of Fedora CoreOS.
- A user account with sudo privileges.
Step 1: Install Ceph
To install Ceph on Fedora CoreOS, you need to add the Ceph repository to the system.
- Open a terminal window and switch to root user:
sudo su -
- Download the Ceph repository GPG key and add it to the system:
curl -L https://download.ceph.com/keys/release.asc | gpg --import -
- Add the Ceph repository by creating a new file
/etc/yum.repos.d/ceph.repo:
cat <<EOF > /etc/yum.repos.d/ceph.repo
[ceph]
name=Ceph Release
baseurl=https://download.ceph.com/rpm-luminous/el7/
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc
EOF
- Install the Ceph package:
dnf install ceph
Step 2: Configure Ceph
After installing Ceph, you need to configure it to use the correct settings for your system.
- Create a new file
/etc/ceph/ceph.confand add the following content:
[global]
fsid = YOUR-FSID-HERE
mon_initial_members = PRIMARY-MONITOR-IP
mon_host = PRIMARY-MONITOR-IP
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
public_network = YOUR-NETWORK-HERE
cluster_network = YOUR-CLUSTER-NETWORK-HERE
Make sure to replace the placeholders YOUR-FSID-HERE, PRIMARY-MONITOR-IP, YOUR-NETWORK-HERE, and YOUR-CLUSTER-NETWORK-HERE with your specific values.
- Generate a new monitor map by running the following command:
monmaptool --create --add 1 PRIMARY-MONITOR-IP --print > /etc/ceph/monmap
Again, replace PRIMARY-MONITOR-IP with the IP address of the primary monitor node.
- Create new Ceph authentication keys by running the following commands:
ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring \
--gen-key -n client.admin --cap mon 'allow *' \
--cap osd 'allow *' --cap mds 'allow *'
chmod +r /etc/ceph/ceph.client.admin.keyring
Step 3: Start Ceph Services
Now that Ceph is installed and configured, it's time to start the necessary services.
- Start the
ceph-monservice:
systemctl start ceph-mon@{primary-monitor-node-name}.service
Replace {primary-monitor-node-name} with the name of the primary monitor node.
- Start the
ceph-osdservice:
systemctl start ceph-osd@{osd-number}.service
Replace {osd-number} with the OSD number of the node.
- Start the
ceph-mdsservice:
systemctl start ceph-mds@{mds-name}.service
Replace {mds-name} with the name of the MDS server.
Conclusion
Congratulations! You have successfully installed and configured Ceph on the latest version of Fedora CoreOS. You can now use Ceph's unified storage interface to manage your distributed storage resources efficiently.