Skip to content

SeaweedFS integration#274

Open
lucaspar wants to merge 36 commits into
masterfrom
lp/sfs
Open

SeaweedFS integration#274
lucaspar wants to merge 36 commits into
masterfrom
lp/sfs

Conversation

@lucaspar
Copy link
Copy Markdown
Member

@lucaspar lucaspar commented Apr 16, 2026

Note

Do not merge before May 26.

Integration of SeaweedFS and RustFS as additional storage backends, replacing MinIO for local, CI, and production environments.

  • Gateway Django app changes
    • Custom storage backend that uses both primary secondary.
    • Primary and secondary changes with environment: from production, primary is SFS. For local and CI, primary is RustFS.
    • Different read and write modes according to configured storage options.
    • minio.env is not used anymore: generate local secrets to create a storage.env with the new configuration format.
  • Compose stack updates
    • Added health checks to compose files, covering more services.
  • Security
    • Reviewed and improved Nginx server config.
    • chmod-ing .env files to 600 upon (re-)generation.
  • CI/CD
    • Expanded automated secret generation to cover SFS setup.
  • Others
    • Sample-based integrity check script to run against object stores.

@lucaspar lucaspar self-assigned this Apr 16, 2026
@lucaspar lucaspar added feature New feature or request refactoring General code improvements network Networking and other deploy tasks dependencies PRs that update dependencies: versioning, security patches, upstream fixes labels Apr 16, 2026
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Apr 16, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  gateway/sds_gateway/monitoring/services.py  63% smaller
  gateway/sds_gateway/monitoring/tests/test_services.py  51% smaller
  gateway/config/settings/base.py  17% smaller
  gateway/compose.production.yaml  16% smaller
  gateway/sds_gateway/monitoring/tests/test_admin_dashboard.py  11% smaller
  gateway/compose.local.yaml  11% smaller
  gateway/compose.ci.yaml  10% smaller
  gateway/sds_gateway/api_methods/utils/minio_client.py  3% smaller
  .github/workflows/gwy-code-quality.yaml  0% smaller
  .gitignore Unsupported file format
  gateway/.envs/example/minio.env Unsupported file format
  gateway/.envs/example/storage.env Unsupported file format
  gateway/.envs/example/storage.prod.env Unsupported file format
  gateway/.github/workflows/ci.yml  0% smaller
  gateway/compose/local/opensearch/opensearch.yaml  0% smaller
  gateway/compose/production/django/celery/worker-start Unsupported file format
  gateway/compose/production/nginx/nginx-default.conf Unsupported file format
  gateway/config/settings/local.py  0% smaller
  gateway/config/settings/production.py  0% smaller
  gateway/docs/detailed-deploy.md Unsupported file format
  gateway/docs/github-actions-ephemeral-env.md Unsupported file format
  gateway/docs/migration-minio-to-seaweedfs.md Unsupported file format
  gateway/justfile Unsupported file format
  gateway/scripts/deploy.sh Unsupported file format
  gateway/scripts/env-selection.sh Unsupported file format
  gateway/scripts/generate-secrets.sh Unsupported file format
  gateway/sds_gateway/api_methods/management/commands/create_storage_buckets.py  0% smaller
  gateway/sds_gateway/api_methods/management/commands/init_indices.py  0% smaller
  gateway/sds_gateway/api_methods/tests/test_capture_endpoints.py  0% smaller
  gateway/sds_gateway/api_methods/tests/test_object_store_migration.py  0% smaller
  gateway/sds_gateway/api_methods/tests/test_opensearch.py  0% smaller
  gateway/sds_gateway/api_methods/utils/dual_object_store_storage.py  0% smaller
  jupyter/docs/agents.md Unsupported file format
  jupyter/scripts/env-selection.sh Unsupported file format
  sdk/README.md Unsupported file format
  sdk/config/nginx/nginx.conf Unsupported file format
  sds-code.code-workspace Unsupported file format
  seaweedfs/.envs/example/seaweedfs.env Unsupported file format
  seaweedfs/.gitignore Unsupported file format
  seaweedfs/compose.ci.yaml  0% smaller
  seaweedfs/compose.local.yaml  0% smaller
  seaweedfs/compose.production.yaml  0% smaller
  seaweedfs/config/credential.toml Unsupported file format
  seaweedfs/config/filer.toml Unsupported file format
  seaweedfs/config/master.toml Unsupported file format
  seaweedfs/config/notification.toml Unsupported file format
  seaweedfs/config/replication.toml Unsupported file format
  seaweedfs/config/s3-config.json  0% smaller
  seaweedfs/config/security.toml Unsupported file format
  seaweedfs/config/shell.toml Unsupported file format
  seaweedfs/data/filer/.gitkeep Unsupported file format
  seaweedfs/data/volumes/.gitkeep Unsupported file format
  seaweedfs/docs/.gitignore Unsupported file format
  seaweedfs/docs/operations.md Unsupported file format
  seaweedfs/docs/readme.md Unsupported file format
  seaweedfs/docs/sfs-deployment-checklist.md Unsupported file format
  seaweedfs/justfile Unsupported file format
  seaweedfs/progress.md Unsupported file format
  seaweedfs/prometheus/prometheus.yaml  0% smaller
  seaweedfs/scripts/.gitignore Unsupported file format
  seaweedfs/scripts/checksum-audit.sh Unsupported file format
  seaweedfs/scripts/common.sh Unsupported file format
  seaweedfs/scripts/deploy.sh Unsupported file format
  seaweedfs/scripts/env-selection.sh Unsupported file format
  seaweedfs/scripts/health-check.sh Unsupported file format
  seaweedfs/scripts/prod-hostnames.example.env Unsupported file format

@lucaspar lucaspar force-pushed the lp/sfs branch 2 times, most recently from bc33793 to dc567ea Compare April 23, 2026 20:28
@lucaspar lucaspar force-pushed the lp/sfs branch 4 times, most recently from bcc648e to b3bec15 Compare May 9, 2026 04:39
lucaspar added 18 commits May 12, 2026 16:19
- rewrite compose.production.yaml: 5 volume servers (1 per 22TB
  drive) with leveldb index, admin+worker for erasure coding,
  pushgateway+prometheus+grafana, filer backup, x-logging
- enable s3 sink in replication.toml for async backup to minio
- add s3-config.json with admin + backup identities
- switch prometheus to pushgateway scrape mode
- add jwt security env var docs to security.toml
- update .env templates with secrets scaffolding (jwt, sse, grafana)
- document audit and changes in progress.md
Rename SFS_* settings to PRIMARY_* and MINIO_* to SECONDARY_* across
the storage backend (settings, dual storage, client, tests, monitoring).
Introduce OBJECT_STORE_READ_FALLBACK_TO_SECONDARY_ENABLED flag.
Fix duplicate dead code block in get_minio_client().
Replace MinIO service with RustFS (local/CI) and add secondary RustFS
(production). Rename associated networks/volumes. Consolidate env_file
references to storage.env. Remove old CI workflow.
Replace minio.env and sfs.env with storage.env (local/CI) and
storage.prod.env (production). Update generate-secrets and deploy
scripts to use new names and PRIMARY/SECONDARY env vars. Update
seaweedfs justfile and deploy.sh for renamed env vars.
Update documentation to reflect the rename from SFS/MINIO to
PRIMARY/SECONDARY and from minio/sfs.env to storage.env.
standardize ci and local compose files to follow production patterns:
- upgrade image tag to 4.23_large_disk_full
- add x-logging anchor with default logging config
- mount individual config files instead of entire config directory
- use yaml block scalar format for commands
- standardize healthcheck parameters across all services
- use bind mounts under ./data/ instead of named volumes for local/ci
- remove obsolete compose.yaml not used by any environment
- fix data-setup justfile recipe for new directory structure
Add dedicated postgres network to ci/local/prod compose files. Switch
postgres to its own network instead of sharing rustfs/minio networks.
Port primary service to 19000:9000 and load storage.env for access
credentials. Update justfile to include storage.env in docker compose
command. Add access key generation to generate-secrets.sh.
Add container/S3 logs to wait loops for debugging. Use current user
uid/gid instead of hardcoded 1000 for data directory ownership in
seaweedfs deploy.
- update generate-secrets.sh to configure secondary (seaweedfs) credentials for local env
- add secondary credentials to example storage.env template
- skip secondary bucket creation in management cmd when creds are unset
- load and configure secondary s3 identity on seaweedfs during deploy
… ci resilience

- init_indices: use contextlib.suppress(exception) for reset_create_block
- test_capture_endpoints: replace try/except/pass with contextlib.suppress
- test_opensearch: same suppress pattern for _clear_create_index_block helper
- test_admin_dashboard: use primary-storage service name, remove unused var
- gateway deploy: add nuke_ci_opensearch_volume for ci volume cleanup
- opensearch config: raise disk watermark thresholds to 98%/99%
- seaweedfs deploy: add debug logs and ci sfs.env generation helper
@lucaspar lucaspar marked this pull request as ready for review May 13, 2026 14:54
@lucaspar lucaspar requested a review from klpoland May 13, 2026 14:54
@lucaspar lucaspar added the ci/cd GH actions, tests, builds, packaging, etc label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd GH actions, tests, builds, packaging, etc dependencies PRs that update dependencies: versioning, security patches, upstream fixes feature New feature or request network Networking and other deploy tasks refactoring General code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants