mirror of
https://github.com/hanzoai/s3.git
synced 2026-11-03 03:07:41 +00:00
hanzoai/s3 was an AGPL-3.0 MinIO fork whose network-copyleft blocks embedding
and reselling as a managed service. Replace it wholesale with a fork of
SeaweedFS (github.com/seaweedfs/seaweedfs, Apache-2.0, Go) which ships a
built-in S3 gateway + Filer.
- License: AGPL-3.0 -> Apache-2.0 (upstream LICENSE kept verbatim, incl.
"Copyright 2025 Chris Lu"); NOTICE added crediting SeaweedFS. No AGPL/BUSL/
SSPL/GPL or enterprise ("ee") files remain.
- Module: go.mod path set to github.com/hanzoai/s3 with a self-replace
(replace github.com/seaweedfs/seaweedfs => ./) so the ~1800 internal Go files
keep their upstream import paths with zero churn. Internal identifiers and
import paths are intentionally NOT renamed.
- CLI rebrand: the binary is built as `s3` (was `weed`); root usage, per-command
help/usage/flag strings, shell autocomplete program name, and the product name
in CLI output now read "Hanzo S3" / `s3`. Users never see `weed`.
(e.g. `s3 server`, `s3 filer`, `s3 master`, `s3 volume`, `s3 s3`, `s3 mount`.)
- Build: `make` (or `go build -o s3 ./weed`) builds the `s3` binary green;
`cmd/weed-db` and `cmd/weed-sql` also build; `go vet ./weed/command/` clean.
- README/LLM.md rewritten for Hanzo S3; AGENTS.md/CLAUDE.md symlinks preserved.
- Dropped a 33MB prebuilt Mach-O `stress` binary upstream had committed; `.gitignore`
updated to ignore the `s3` build output.
268 lines
6.4 KiB
YAML
268 lines
6.4 KiB
YAML
services:
|
|
# SeaweedFS Master
|
|
seaweedfs-master:
|
|
image: chrislusf/seaweedfs:latest
|
|
container_name: seaweedfs-master
|
|
ports:
|
|
- "9333:9333"
|
|
- "19333:19333"
|
|
command: >
|
|
master
|
|
-port=9333
|
|
-mdir=/data
|
|
-volumeSizeLimitMB=1024
|
|
-defaultReplication=000
|
|
volumes:
|
|
- seaweedfs_master_data:/data
|
|
networks:
|
|
- seaweedfs-rdma
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--timeout=10", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:9333/cluster/status"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 6
|
|
start_period: 60s
|
|
|
|
# SeaweedFS Volume Server
|
|
seaweedfs-volume:
|
|
image: chrislusf/seaweedfs:latest
|
|
container_name: seaweedfs-volume
|
|
ports:
|
|
- "8080:8080"
|
|
- "18080:18080"
|
|
command: >
|
|
volume
|
|
-master=seaweedfs-master:9333
|
|
-port=8080
|
|
-dir=/data
|
|
-max=100
|
|
volumes:
|
|
- seaweedfs_volume_data:/data
|
|
networks:
|
|
- seaweedfs-rdma
|
|
depends_on:
|
|
seaweedfs-master:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "sh", "-c", "pgrep weed && netstat -tln | grep :8080"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 6
|
|
start_period: 30s
|
|
|
|
# SeaweedFS Filer
|
|
seaweedfs-filer:
|
|
image: chrislusf/seaweedfs:latest
|
|
container_name: seaweedfs-filer
|
|
ports:
|
|
- "8888:8888"
|
|
- "18888:18888"
|
|
command: >
|
|
filer
|
|
-master=seaweedfs-master:9333
|
|
-port=8888
|
|
-defaultReplicaPlacement=000
|
|
networks:
|
|
- seaweedfs-rdma
|
|
depends_on:
|
|
seaweedfs-master:
|
|
condition: service_healthy
|
|
seaweedfs-volume:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "sh", "-c", "pgrep weed && netstat -tln | grep :8888"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 6
|
|
start_period: 45s
|
|
|
|
# RDMA Engine (Rust)
|
|
rdma-engine:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.rdma-engine
|
|
container_name: rdma-engine
|
|
volumes:
|
|
- rdma_socket:/tmp/rdma
|
|
networks:
|
|
- seaweedfs-rdma
|
|
environment:
|
|
- RUST_LOG=debug
|
|
- RDMA_SOCKET_PATH=/tmp/rdma/rdma-engine.sock
|
|
- RDMA_DEVICE=auto
|
|
- RDMA_PORT=18515
|
|
- RDMA_GID_INDEX=0
|
|
- DEBUG=true
|
|
command: >
|
|
./rdma-engine-server
|
|
--ipc-socket ${RDMA_SOCKET_PATH}
|
|
--device ${RDMA_DEVICE}
|
|
--port ${RDMA_PORT}
|
|
--debug
|
|
healthcheck:
|
|
test: ["CMD", "sh", "-c", "pgrep rdma-engine-server >/dev/null && test -S /tmp/rdma/rdma-engine.sock"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
# RDMA Sidecar (Go)
|
|
rdma-sidecar:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.sidecar
|
|
container_name: rdma-sidecar
|
|
ports:
|
|
- "8081:8081"
|
|
volumes:
|
|
- rdma_socket:/tmp/rdma
|
|
networks:
|
|
- seaweedfs-rdma
|
|
environment:
|
|
- RDMA_SOCKET_PATH=/tmp/rdma/rdma-engine.sock
|
|
- VOLUME_SERVER_URL=http://seaweedfs-volume:8080
|
|
- SIDECAR_PORT=8081
|
|
- ENABLE_RDMA=true
|
|
- ENABLE_ZEROCOPY=true
|
|
- ENABLE_POOLING=true
|
|
- MAX_CONNECTIONS=10
|
|
- MAX_IDLE_TIME=5m
|
|
- DEBUG=true
|
|
command: >
|
|
./demo-server
|
|
--port ${SIDECAR_PORT}
|
|
--rdma-socket ${RDMA_SOCKET_PATH}
|
|
--volume-server ${VOLUME_SERVER_URL}
|
|
--enable-rdma
|
|
--enable-zerocopy
|
|
--enable-pooling
|
|
--max-connections ${MAX_CONNECTIONS}
|
|
--max-idle-time ${MAX_IDLE_TIME}
|
|
--debug
|
|
depends_on:
|
|
rdma-engine:
|
|
condition: service_healthy
|
|
seaweedfs-volume:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
|
|
# SeaweedFS Mount with RDMA
|
|
seaweedfs-mount:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.mount-rdma
|
|
platform: linux/amd64
|
|
container_name: seaweedfs-mount
|
|
privileged: true # Required for FUSE
|
|
devices:
|
|
- /dev/fuse:/dev/fuse
|
|
cap_add:
|
|
- SYS_ADMIN
|
|
volumes:
|
|
- seaweedfs_mount:/mnt/seaweedfs
|
|
- /tmp/seaweedfs-mount-logs:/var/log/seaweedfs
|
|
networks:
|
|
- seaweedfs-rdma
|
|
environment:
|
|
- FILER_ADDR=seaweedfs-filer:8888
|
|
- RDMA_SIDECAR_ADDR=rdma-sidecar:8081
|
|
- MOUNT_POINT=/mnt/seaweedfs
|
|
- RDMA_ENABLED=true
|
|
- RDMA_FALLBACK=true
|
|
- RDMA_MAX_CONCURRENT=64
|
|
- RDMA_TIMEOUT_MS=5000
|
|
- DEBUG=true
|
|
command: /usr/local/bin/mount-helper.sh
|
|
depends_on:
|
|
seaweedfs-filer:
|
|
condition: service_healthy
|
|
rdma-sidecar:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "mountpoint", "-q", "/mnt/seaweedfs"]
|
|
interval: 15s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 45s
|
|
|
|
# Integration Test Runner
|
|
integration-test:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.integration-test
|
|
container_name: integration-test
|
|
volumes:
|
|
- seaweedfs_mount:/mnt/seaweedfs
|
|
- ./test-results:/test-results
|
|
networks:
|
|
- seaweedfs-rdma
|
|
environment:
|
|
- MOUNT_POINT=/mnt/seaweedfs
|
|
- FILER_ADDR=seaweedfs-filer:8888
|
|
- RDMA_SIDECAR_ADDR=rdma-sidecar:8081
|
|
- TEST_RESULTS_DIR=/test-results
|
|
depends_on:
|
|
seaweedfs-mount:
|
|
condition: service_healthy
|
|
command: >
|
|
sh -c "
|
|
echo 'Starting RDMA Mount Integration Tests...' &&
|
|
sleep 10 &&
|
|
/usr/local/bin/run-integration-tests.sh
|
|
"
|
|
profiles:
|
|
- test
|
|
|
|
# Performance Test Runner
|
|
performance-test:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.performance-test
|
|
container_name: performance-test
|
|
volumes:
|
|
- seaweedfs_mount:/mnt/seaweedfs
|
|
- ./performance-results:/performance-results
|
|
networks:
|
|
- seaweedfs-rdma
|
|
environment:
|
|
- MOUNT_POINT=/mnt/seaweedfs
|
|
- RDMA_SIDECAR_ADDR=rdma-sidecar:8081
|
|
- PERFORMANCE_RESULTS_DIR=/performance-results
|
|
depends_on:
|
|
seaweedfs-mount:
|
|
condition: service_healthy
|
|
command: >
|
|
sh -c "
|
|
echo 'Starting RDMA Mount Performance Tests...' &&
|
|
sleep 10 &&
|
|
/usr/local/bin/run-performance-tests.sh
|
|
"
|
|
profiles:
|
|
- performance
|
|
|
|
volumes:
|
|
seaweedfs_master_data:
|
|
driver: local
|
|
seaweedfs_volume_data:
|
|
driver: local
|
|
seaweedfs_mount:
|
|
driver: local
|
|
driver_opts:
|
|
type: tmpfs
|
|
device: tmpfs
|
|
o: size=1g
|
|
rdma_socket:
|
|
driver: local
|
|
|
|
networks:
|
|
seaweedfs-rdma:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.20.0.0/16
|