Skip to content

Tips for CephFS

michaelbuchar edited this page Jul 10, 2026 · 3 revisions

This page summarizes the local Rook CephFS workflow used to test REANA against a real CSI-backed ReadWriteMany filesystem on Kind. The focus is local development and storage-behavior validation, not production deployment.

What this setup gives you

  • a local rook-cephfs storage class backed by Rook
  • a REANA deployment that uses CephFS for shared_storage
  • a separate infrastructure storage path so that database and RabbitMQ storage are kept separate from user runtime workspaces
  • a validated variant where both shared_storage and infrastructure_storage are separate PVCs from the same rook-cephfs storage class
  • a repeatable smoke path for fsGroup and shared-workspace validation

Assumptions

  • you already have a running single-node Kind cluster
  • kubectl, kind, docker, and helm are installed
  • reana-dev is installed if you want to use the convenience reana-dev cluster-deploy flow below
  • reana-client is installed if you want to use the smoke helpers below
  • you are running the commands below from the root of the reana repository

1. Check whether the current cluster underlay can host Ceph OSDs

Rook needs raw block devices for Ceph OSDs. The default Kind storage class is usually rancher.io/local-path, which does not support raw block PVCs.

$ scripts/check-cephfs-dev-prereqs.sh standard

If this fails on a default local Kind setup, this is expected. The workaround is to attach loop-backed raw devices directly inside the Kind node container.

2. Attach loop-backed raw devices to the Kind node

The helper below provisions loop devices inside kind-control-plane:

$ scripts/setup-kind-rook-loop-devices.sh kind-control-plane

Useful overrides:

$ DEVICE_COUNT=3 DEVICE_SIZE=6G \
  scripts/setup-kind-rook-loop-devices.sh kind-control-plane

The helper creates loop-backed image files under /var/lib/rook-dev inside the Kind node and synthesizes the udev metadata Rook expects.

3. Deploy Rook CephFS

$ scripts/deploy-kind-rook-cephfs.sh

This deploys:

  • the Rook operator
  • a local Ceph cluster
  • the reanafs Ceph filesystem
  • the rook-cephfs storage class

Useful readiness checks:

$ kubectl -n rook-ceph get cephcluster rook-ceph -o wide
$ kubectl -n rook-ceph get cephfilesystem reanafs -o wide
$ kubectl get storageclass rook-cephfs

4. Smoke-test the rook-cephfs storage class

The checked-in smoke PVC and pod are enough to verify RWX provisioning:

$ kubectl apply -f etc/rook-cephfs-kind/test-pvc.yaml
$ kubectl apply -f etc/rook-cephfs-kind/test-pod.yaml
$ kubectl logs rook-cephfs-smoke

Expected output includes the contents of probe.txt, proving the PVC is mounted and writable.

Cleanup:

$ kubectl delete pod rook-cephfs-smoke --ignore-not-found
$ kubectl delete pvc rook-cephfs-smoke --ignore-not-found

5. Deploy REANA with separate runtime and infrastructure storage

Validated local split

The local validation that was actually exercised used:

  • CephFS for shared_storage
  • a separate hostPath root for infrastructure_storage

This keeps infrastructure storage separate from user runtime workspaces while keeping local iteration simple.

The checked-in development profile is helm/configurations/values-dev-cephfs.yaml.

The relevant storage part is:

shared_storage:
  backend: cephfs
  volume_size: 200
  access_modes: ReadWriteMany
  fs_group: 0
  storage_class_name: rook-cephfs

infrastructure_storage:
  backend: hostpath
  hostpath:
    root_path: /var/reana-infrastructure

Because the infrastructure storage is a hostPath, create the database and RabbitMQ directories inside the Kind node first:

$ docker exec kind-control-plane mkdir -p \
  /var/reana-infrastructure/db \
  /var/reana-infrastructure/rabbitmq/mnesia

Then deploy REANA:

$ reana-dev cluster-deploy \
  -v helm/configurations/values-dev-cephfs.yaml \
  --admin-email john.doe@example.org \
  --admin-password mysecretpassword

If you are validating unreleased storage or security-context changes, make sure that reana-workflow-controller and reana-job-controller images actually contain the code under test. Otherwise the CephFS run will exercise an older runtime pod-generation path and the result will be misleading.

Closer-to-recommendation split

To emulate the storage-volume recommendations more closely, REANA can use two separate PVCs backed by the same Rook CephFS storage class:

infrastructure_storage:
  backend: cephfs
  volume_size: 10
  access_modes: ReadWriteMany
  storage_class_name: rook-cephfs

shared_storage:
  backend: cephfs
  volume_size: 200
  access_modes: ReadWriteMany
  fs_group: 0
  fs_group_change_policy: OnRootMismatch
  storage_class_name: rook-cephfs

This requires a REANA chart revision that already supports infrastructure_storage.storage_class_name. The local validation here used a chart revision newer than 0.95.0-alpha.5; older chart releases may not support this field yet.

The concrete Helm install pattern that was validated locally was:

$ helm upgrade --install ceph2vol helm/reana \
  -n ceph2vol-test \
  --create-namespace \
  -f my-two-pvc-values.yaml \
  --set fullnameOverride=ceph2vol \
  --set secrets.database.user=test \
  --set secrets.database.password=test \
  --set secrets.cache.user=test \
  --set secrets.cache.password=test \
  --set secrets.message_broker.user=test \
  --set secrets.message_broker.password=test \
  --set secrets.reana.REANA_SECRET_KEY=test \
  --set secrets.opensearch.user=test \
  --set secrets.opensearch.password=test \
  --set opensearch.initialAdminPassword=test

If you are validating unreleased controller changes, add the corresponding components.reana_workflow_controller.image and components.reana_job_controller.image overrides as needed.

This variant was validated locally on Kind + Rook CephFS. It resulted in two distinct bound PVCs, one for infrastructure pods and one for user runtime workspaces:

  • ceph2vol-infrastructure-persistent-volume
  • ceph2vol-shared-persistent-volume

The infrastructure pods mounted the infrastructure PVC, while the reana-run-batch and reana-run-job pods mounted the shared PVC. Runtime containers still ran as uid=1000 gid=0, and files created in workflow workspaces were owned 1000:0 as expected.

One caveat when testing multiple REANA releases side by side on the same Kind cluster: REANA truncates the release prefix to 13 characters. Use a short, unique release name, or set fullnameOverride, otherwise cluster-scoped resources such as the CVMFS storage class may collide between releases. In the validated example above, fullnameOverride=ceph2vol is intentional. A longer name such as reana-cephfs-2vol would truncate to the same 13-character prefix as reana-cephfs and collide.

6. fsGroup combinations worth exercising on CephFS

The following storage settings were useful for local validation:

True chart-default asymmetry:

shared_storage:
  backend: cephfs
  fs_group: ""
  fs_group_change_policy: OnRootMismatch
  storage_class_name: rook-cephfs

Explicitly aligned group:

shared_storage:
  backend: cephfs
  fs_group: 0
  fs_group_change_policy: OnRootMismatch
  storage_class_name: rook-cephfs

Fallback policy:

shared_storage:
  backend: cephfs
  fs_group: 0
  fs_group_change_policy: Always
  storage_class_name: rook-cephfs

7. Run the shared-storage smoke

Once REANA is up, use the checked-in non-root smoke workflow:

Before running the smoke helpers, make sure reana-client can authenticate to the target deployment. If you are not already logged in via the client config, export the server URL and access token first:

$ export REANA_SERVER_URL=https://localhost:30443
$ export REANA_ACCESS_TOKEN=<your-access-token>
$ reana-client ping
$ scripts/check-shared-storage-fsgroup-smoke.sh

This runs the same workflow twice against the same workspace and verifies that:

  • the first run can create files
  • the second run can reuse the existing workspace
  • the second run can read and append to files created by the first run

For the Jupyter path, use:

$ scripts/check-jupyter-session-nonroot-smoke.sh

8. Cleanup

Remove the Rook resources:

$ scripts/undeploy-kind-rook-cephfs.sh

Remove the loop-backed devices from the Kind node:

$ scripts/cleanup-kind-rook-loop-devices.sh kind-control-plane

If you also want to reset the REANA deployment, remove it separately using the usual reana-dev or helm uninstall workflow for your local stack.

Clone this wiki locally