syed-ali/feat/replace-minio-with-rustfs#73
Open
Syed-Ali-Abbas-568 wants to merge 3 commits into
Open
Conversation
Add a preview branch that swaps the archived MinIO server for RustFS, a Rust re-implementation of the MinIO S3 API. RustFS is the most direct of the three drop-in candidates: same ports (9000/9001), same mc client tooling, same bucket policy semantics — so this branch is mostly an image swap plus env-var rename.⚠️ ALPHA ONLY. RustFS is at v1.0.0-alpha; this branch is preview- only, not for production. Real deployments should use the Garage branch until RustFS cuts a stable release. Key changes: - plugin.py: RUSTFS_DOCKER_IMAGE (rustfs/rustfs:latest), RUSTFS_UID and RUSTFS_GID (both 10001). MINIO_DOCKER_IMAGE kept as deprecated alias. MINIO_MC_DOCKER_IMAGE unchanged — mc still works with RustFS. - Docker compose + k8s manifests: service renamed to `rustfs`, user:10001 / runAsUser+fsGroup 10001 for the non-root process, env vars RUSTFS_ACCESS_KEY / RUSTFS_SECRET_KEY / RUSTFS_VOLUMES sourced from the existing OPENEDX_AWS_ACCESS_KEY / SECRET_ACCESS_KEY. - init.sh: mc alias renamed from "minio" to "rustfs" pointing at rustfs:9000; bucket create + mc policy set public logic unchanged because RustFS honours MinIO-compatible bucket policies. - MINIO_GATEWAY kept for backwards-compat but is a no-op under RustFS. - README.rst ships a prominent ALPHA warning at the top; CHANGES.md documents the non-root UID pitfall and migration recipe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGES —
feat/replace-minio-with-rustfsSummary
MinIO has been archived upstream. This branch replaces the MinIO
server with RustFS, a Rust
re-implementation of the MinIO S3 API. RustFS is the most direct drop-
in of the three alternatives we evaluated: same ports (9000 S3 / 9001
console), same
mcclient tooling, same bucket policy semantics.What changed
MINIO_DOCKER_IMAGEis superseded byRUSTFS_DOCKER_IMAGE(
rustfs/rustfs:latest— pinned tolatestfor the alpha period).The old name is kept as a deprecated alias pointing at the same
image.
MINIO_MC_DOCKER_IMAGEis unchanged — stilldocker.io/minio/mc:RELEASE.2022-03-31T04-55-30Z. RustFS is wire-compatible with
mc, so we keep using the MinIO Client image forinit jobs.
:9000S3,:9001console.AWS_S3_ENDPOINT_URLand Caddy routes did not change.RUSTFS_DOCKER_IMAGERUSTFS_UID(default10001),RUSTFS_GID(default10001) —the non-root user inside the RustFS container. Exposed as config
so operators can override if their host's user namespace maps
differently (e.g. rootless Docker).
MinIO's
MINIO_ROOT_USER/MINIO_ROOT_PASSWORDto RustFS'sRUSTFS_ACCESS_KEY/RUSTFS_SECRET_KEY, plusRUSTFS_VOLUMES,RUSTFS_ADDRESS,RUSTFS_CONSOLE_ENABLE,RUSTFS_CONSOLE_ADDRESS.These values are sourced from the existing
OPENEDX_AWS_ACCESS_KEY/
OPENEDX_AWS_SECRET_ACCESS_KEYkeys so Open edX needs no change.user: "10001:10001". On a fresh bind mount,Docker creates the host directory with the invoking user's UID,
which may not be 10001. If you hit
EACCESon /data, runsudo chown -R 10001:10001 $(tutor config printroot)/data/minio.securityContext.runAsUser/runAsGroup/fsGroupto 10001, which makes the PVC owner match on mount.MINIO_GATEWAY— RustFS has no gateway mode. Still accepted forbackwards-compat; setting it is a no-op with a warning from
init.sh.tasks/minio/init.sh) — near-identical to theMinIO version. The
mcalias was renamed fromminiotorustfsand points at
http://rustfs:9000. Bucket creation andmc policy set publicuse the same commands as before.minioservice is renamed torustfsin compose and k8s.minio-jobis preserved as the init job service name so existingCLI_DO_INIT_TASKSentries targeting"minio"keep resolving.rustfs.Why
RustFS is the most attractive future home for this plugin once it
stabilises — it matches MinIO's API surface almost exactly, so there
is close to zero adapter code. Shipping this branch now lets us (a)
exercise the plumbing, (b) report back any incompatibilities upstream,
and (c) flip users over quickly when a stable release appears.
Migration notes
Because RustFS uses the same S3 wire format and the same
mctooling,a migration from MinIO is in principle straightforward:
on-disk format is NOT guaranteed stable across RustFS releases, so
exporting your objects with
mc mirrorfirst is strongly advised.tutor config saveandtutor local do init.mc mirror ./backup/<bucket>/ rustfs/<bucket>/against the runningRustFS instance.
If you previously set
MINIO_GATEWAY=s3orMINIO_GATEWAY=azure,unset it (
tutor config save --unset MINIO_GATEWAY) and point OpenedX's
AWS_S3_ENDPOINT_URLat your cloud provider directly.