Operations 15 min read

Deploy a Single‑Node Ceph Cluster with Docker in Minutes

This step‑by‑step guide shows how to initialize a CentOS 7 host, disable firewalls, configure time sync, prepare storage disks, pull the official Ceph Docker image, and launch MON, OSD, MGR, RGW, and MDS containers to build a functional single‑node Ceph cluster with a dashboard.

Cloud Native Technology Community
Cloud Native Technology Community
Cloud Native Technology Community
Deploy a Single‑Node Ceph Cluster with Docker in Minutes

Overview

Ceph is an open‑source distributed storage system that provides object, block, and file interfaces. This guide shows how to set up a single‑node Ceph cluster using the official ceph/daemon Docker image, avoiding manual installation and simplifying upgrades.

Prerequisites

CentOS 7.8, Docker 20.10.10, Ceph Nautilus 14.2.22.

Machine initialization

Disable firewalld, set SELinux to disabled, set the hostname to ceph, add the host entry to /etc/hosts, enable chronyd for time synchronization, create an alias for the ceph command, create the directory tree /usr/local/ceph/{admin,etc,lib,logs}, and give Docker’s internal user (uid 167) ownership and full permissions.

Docker and Ceph image

Install Docker dependencies, add the Alibaba Cloud repository, install Docker CE, configure a registry mirror, and pull ceph/daemon:latest‑nautilus.

Deploying Ceph components

MON

Create start_mon.sh that runs the container with host networking and mounts the configuration directories, setting MON_IP and CEPH_PUBLIC_NETWORK. Execute the script, then append required options to ceph.conf (clock drift, pool defaults, dashboard module, RGW port, etc.).

OSD

Prepare three raw disks ( /dev/vdb1, /dev/vdb2, /dev/vdb3), format them with XFS, mount them to /dev/osd1, /dev/osd2, /dev/osd3, and create start_osd.sh that launches three OSD containers, each mapping the corresponding host directory. Generate the OSD bootstrap key on the MON node before starting.

MGR

Run start_mgr.sh to launch the manager container, which provides the Ceph dashboard UI.

RGW

Run start_rgw.sh to launch the object‑gateway container, generate its bootstrap key, and adjust the RGW pools’ size and min_size to 1 to suppress health warnings.

MDS

Run start_mds.sh to launch the metadata server needed for CephFS.

CephFS creation

Create data and metadata pools (64 placement groups each) with ceph osd pool create, then create the filesystem using ceph fs new cephfs cephfs_metadata cephfs_data. Set both pools’ size and min_size to 1.

Verification

Check cluster health with ceph -s, mount the filesystem on a client using ceph‑fuse -m 192.168.129.16:6789 -r / /mnt/ -o nonempty, and verify usage with df -h.

Dashboard

Enable the dashboard module ( ceph mgr module enable dashboard), create a self‑signed certificate, set login credentials (admin/admin), configure the external port (18080) and bind address (192.168.129.16), optionally disable SSL, restart the MGR container, and access the UI at http://192.168.129.16:18080/.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeDockerOperationsDeploymentLinuxstorageCeph
Cloud Native Technology Community
Written by

Cloud Native Technology Community

The Cloud Native Technology Community, part of the CNBPA Cloud Native Technology Practice Alliance, focuses on evangelizing cutting‑edge cloud‑native technologies and practical implementations. It shares in‑depth content, case studies, and event/meetup information on containers, Kubernetes, DevOps, Service Mesh, and other cloud‑native tech, along with updates from the CNBPA alliance.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.