Using CephAdm to deploy single node containerised ceph with Ceph ROCKs

CephAdm Deployment (using Ceph ROCKs)

Overview


Cephadm is a utility used to deploy and maintain containerised ceph. The downside being the default images used by cephadm are not based on Ubuntu. In this Article, we look into how we can use cephadm to deploy containerised ceph based on jammy-quincy images.

NOTE: Ceph ROCKs based OCI Images can be found here.

Procedure


Prepare a Host


For demonstration we picked an instance with following specifications, additionally 3 cinder-volumes were also added for the OSD deployment which will follow later:


+-------+------+-----------+-------+

| RAM | Disk | Ephemeral | VCPUs |

+-------+------+-----------+-------+

| 4096 | 40 | 40 | 2 |

+-------+------+-----------+-------+

Install CephAdm and Bootstrap


sudo apt install cephadm

Bootstrap: we are using custom images hosted at docker hub, if desired any other image can also be used.

Complete Output here

Note: Either Podman or Docker are required to be available on the host.


sudo cephadm --image ghcr.io/canonical/ceph:quincy --mon-ip <mon_ip> --single-host-defaults

NOTE: <mon_ip>: should be the IP of the first host of the cluster. (as per ceph docs)

Verify Shell Access and currently running services



sudo cephadm shell

root@host:/# ceph orch ls

Check available devices for OSD addition and provision them



ceph orch device ls

ceph orch apply osd --all-available-devices

Note: using --all-available-devices will automatically span any storage device added to Host in future into an OSD. If this is not desired specific storage device can also be specified.

Verification of Cluster (using RGW)


Add RGW service


root@host :/# ceph orch apply rgw <name>

Note: User is required to configure the zone (created by cephadm) for endpoints, and user through which the zone can be accessed.

  1. Configure Zone for endpoints:

root@host :/# radosgw-admin zone modify --rgw-zone default --endpoints http://<fqdn>:80

  1. Create a new user (the credentials of this user will be used for access)

root@host :/# radosgw-admin user create --uid=master-client --display-name=master

  1. Use any s3 client to perform IO

For demonstration we used aws cli

JFTR., at the beginning you’ll also need to install cephadm itself:

apt install cephadm

1 Like

Would be great if there were Arm64 based containers available.