Skip to content

Docker 使用時のストレージを RustFS に変更する#3

Merged
Hexa merged 19 commits intodevelopfrom
feature/minio-to-rustfs
Dec 23, 2025
Merged

Docker 使用時のストレージを RustFS に変更する#3
Hexa merged 19 commits intodevelopfrom
feature/minio-to-rustfs

Conversation

@Hexa
Copy link
Contributor

@Hexa Hexa commented Dec 23, 2025

This pull request migrates the storage backend from MinIO to RustFS across the project. It updates environment variables, Docker Compose configuration, documentation, Makefile commands, and test cases to use RustFS as the default storage solution instead of MinIO.

The most important changes are:

Environment and Configuration Updates:

  • Updated .env.template to replace all MinIO-related variables with RustFS equivalents, including data/log paths and endpoint settings. The default storage type is now rustfs instead of minio.
  • Modified compose.yml to remove the MinIO service and add the RustFS service with appropriate environment variables and volume mappings. All service dependencies and endpoints now reference RustFS. [1] [2] [3]

Build and Setup Process:

  • Updated the Makefile to create and manage RustFS directories (rustfs/data, rustfs/logs) instead of MinIO's data directory. Makefile targets and environment variable exports now reference RustFS. [1] [2] [3] [4] [5]

Documentation:

  • Revised docs/DOCKER.md to replace all references to MinIO with RustFS, including setup instructions, architecture descriptions, and port information. [1] [2] [3] [4] [5]

Application and Test Code:

  • Updated ingester/src/run.py to use rustfs as the default storage type and adjusted comments for RustFS compatibility. [1] [2]
  • Modified all test cases in ingester/tests/test_ingester.py to use rustfs instead of minio for storage, and updated comments to reflect the new backend. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]

@Hexa
Copy link
Contributor Author

Hexa commented Dec 23, 2025

!haiku レビューしてください

@github-actions
Copy link

github-actions bot commented Dec 23, 2025

Claude finished @Hexa's task in 32s —— View job


PR レビュー: Docker 使用時のストレージを RustFS に変更する

指摘事項(優先度順)

【重要】1. .env.template のコメントが不正確

ファイル: .env.template:5

# AWS のアクセスキーとシークレットキー
# または、MinIO にアクセスするためのユーザーとパスワードを指定します

このコメントは MinIO への言及が残っており、RustFS への変更で不整合です。RustFS に合わせて修正が必要です。

推奨修正:

# AWS のアクセスキーとシークレットキー
# または、RustFS にアクセスするためのユーザーとパスワードを指定します

【重要】2. .env.template の STORAGE コメントが不正確

ファイル: .env.template:19

# ingester に指定する Storage Type (s3 または minio)

s3minio から s3rustfs への変更漏れです。RustFS への統一が必要です。

推奨修正:

# ingester に指定する Storage Type (s3 または rustfs)

【重要】3. Makefile の init ターゲット: uid の固定値に根拠が不明

ファイル: Makefile:5

sudo chown -R 10001:10001 rustfs/data rustfs/logs

uid 10001 を指定しているのは、RustFS コンテナの実行ユーザーが uid 10001 だからと推測されますが、この根拠がコードに記載されていません。変更内容の説明 PR 本文にもこの点の記載がないため、実装の正当性が不透明です。

確認が必要:

  • RustFS コンテナのユーザー uid が本当に 10001 なのか
  • Dockerfile や公式ドキュメントで確認したのか
  • 他の uid 設定(Grafana など)との整合性は取れているか

【中程度】4. compose.yml: RustFS イメージの指定が不安定

ファイル: compose.yml:18

image: rustfs/rustfs:latest

:latest タグを使用しているため、本番環境での再現性が低下します。バージョンを明示的に指定することを推奨します。

推奨修正:

image: rustfs/rustfs:v1.0.0  # 具体的なバージョンを指定

【中程度】5. compose.yml: mc コンテナの comments の誤導

ファイル: compose.yml:32

# rustfs の初期設定用コンテナ

しかし、実際には minio/mc イメージを使用しており、S3 互換の初期設定を行うコンテナです。コメントの正確性を改善するか、minio/mc に依存している理由を明記すべきです。


【軽微】6. ingester/src/run.py: TODO コメントの意図が曖昧

ファイル: ingester/src/run.py:137

# TODO: rustfs で region を設定しても動作するか確認し、問題がなければ、こちらの条件分岐は削除する

誰が何をするのか、いつまでにやるのかが明記されていません。タスク管理システムにも記録されているのか不明です。


全体的な確認事項

  • 環境変数の MinIO → RustFS 置き換えは概ね完了している
  • Docker Compose サービスの置き換えは実施されている
  • ドキュメントの更新は実施されている
  • テストケースのコメント更新は実施されている
  • RustFS コンテナ起動時の権限設定(uid 10001)の根拠確認が必要
  • RustFS イメージのバージョン指定の明示化が必要
  • .env.template のコメント修正が必要

@Hexa
Copy link
Contributor Author

Hexa commented Dec 23, 2025

【重要】1. .env.template のコメントが不正確

8a10244 で修正しました

【重要】2. .env.template の STORAGE コメントが不正確

6dedb67 で修正しました

【重要】3. Makefile の init ターゲット: uid の固定値に根拠が不明

11087f2 で記載しました

【中程度】4. compose.yml: RustFS イメージの指定が不安定

d136cd9 で最新のタグに固定しました

@Hexa Hexa requested review from tnamao and voluntas and removed request for voluntas December 23, 2025 03:14
@Hexa Hexa marked this pull request as ready for review December 23, 2025 03:15
@voluntas
Copy link
Member

!opus 修正を再度レビューして

@github-actions
Copy link

github-actions bot commented Dec 23, 2025

Claude finished @voluntas's task in 1m 55s —— View job


修正後のレビュー

  • 変更されたファイルを確認する
  • 前回の指摘事項の修正状況を確認する
  • 新たな問題がないか確認する
  • レビュー結果をまとめる

前回の指摘事項の修正状況

指摘 状況 コミット
【重要】.env.template のコメントが不正確 修正済み 8a10244
【重要】.env.template の STORAGE コメントが不正確 修正済み 6dedb67
【重要】Makefile の uid 固定値の根拠が不明 修正済み 11087f2
【中程度】compose.yml の RustFS イメージ指定が不安定 修正済み d136cd9
【中程度】compose.yml の mc コンテナのコメントが誤導 対応不要 -
【軽微】run.py の TODO コメントの意図が曖昧 対応不要 -

修正内容の確認結果

1. .env.template (修正済み)
# AWS のアクセスキーとシークレットキー
# または、RustFS にアクセスするためのユーザーとパスワードを指定します
# ingester に指定する Storage Type (s3 または rustfs)

MinIO への言及が RustFS に修正されている。

2. Makefile (修正済み)
# rustfs コンテナ内のユーザー UID/GID に合わせる
# https://github.com/rustfs/rustfs/blob/1.0.0-alpha.76/Dockerfile#L69-L70
sudo chown -R 10001:10001 rustfs/data rustfs/logs

uid 10001 の根拠が Dockerfile へのリンクで明示されている。

3. compose.yml (修正済み)
image: rustfs/rustfs:1.0.0-alpha.76

latest から具体的なバージョン 1.0.0-alpha.76 に変更されている。


対応不要とした理由

mc コンテナのコメント
# rustfs の初期設定用コンテナ
mc:
  image: minio/mc:RELEASE.2025-07-21T05-28-08Z

minio/mc は S3 互換のクライアントツールであり、RustFS も S3 互換であるため、このツールを使って RustFS の初期設定を行うのは正当。コメントは「RustFS の初期設定用コンテナ」と記載されており、これは実際の用途を正確に表している。

run.py の TODO コメント
# TODO: rustfs で region を設定しても動作するか確認し、問題がなければ、こちらの条件分岐は削除する

今後の検証作業として残しておくのは妥当。


レビュー結果

前回の重要な指摘事項はすべて適切に修正されている。変更内容とリリースノート(PR 説明)の整合性も取れている。

@voluntas
Copy link
Member

!opus 他に MinIO という表記はない?それも変更したいです。

@github-actions

This comment was marked as resolved.

@Hexa
Copy link
Contributor Author

Hexa commented Dec 23, 2025

docs/README.md の MinIO 表記を RustFS に変更する

7b74b72 で変更しました

README.md の MinIO 表記を RustFS に変更する

df2cbe0 で変更しました

ingester/README.md の MinIO 表記を RustFS に変更する

756d419 で実行例を rustfs に変更しました

compose.yml の myminio エイリアスを myrustfs に変更する

9f4a590 で alias を myrustfs に変更しました

ingester/tests/test_ingester.py のコメントを変更する

MinIO ライブラリを使っているので、MinIO クライアント表記のままにします
また、testcontainers も今回はこのまま MinIO を使用します

@Hexa Hexa merged commit b46c653 into develop Dec 23, 2025
1 check passed
@Hexa Hexa deleted the feature/minio-to-rustfs branch December 23, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants