mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +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.
105 lines
3.2 KiB
Bash
Executable File
105 lines
3.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "๐งช SeaweedFS Vacuum Task Testing Demo"
|
|
echo "======================================"
|
|
echo ""
|
|
|
|
# Check if SeaweedFS is running
|
|
echo "๐ Checking SeaweedFS status..."
|
|
MASTER_URL="${MASTER_HOST:-master:9333}"
|
|
ADMIN_URL="${ADMIN_HOST:-admin:23646}"
|
|
|
|
if ! curl -s http://$MASTER_URL/cluster/status > /dev/null; then
|
|
echo "โ SeaweedFS master not running at $MASTER_URL"
|
|
echo " Please ensure Docker cluster is running: make start"
|
|
exit 1
|
|
fi
|
|
|
|
if ! curl -s http://volume1:8080/status > /dev/null; then
|
|
echo "โ SeaweedFS volume servers not running"
|
|
echo " Please ensure Docker cluster is running: make start"
|
|
exit 1
|
|
fi
|
|
|
|
if ! curl -s http://$ADMIN_URL/ > /dev/null; then
|
|
echo "โ SeaweedFS admin server not running at $ADMIN_URL"
|
|
echo " Please ensure Docker cluster is running: make start"
|
|
exit 1
|
|
fi
|
|
|
|
echo "โ
All SeaweedFS components are running"
|
|
echo ""
|
|
|
|
# Phase 1: Create test data
|
|
echo "๐ Phase 1: Creating test data with garbage..."
|
|
go run create_vacuum_test_data.go -master=$MASTER_URL -files=15 -delete=0.5 -size=150
|
|
echo ""
|
|
|
|
# Phase 2: Check initial status
|
|
echo "๐ Phase 2: Checking initial volume status..."
|
|
go run create_vacuum_test_data.go -master=$MASTER_URL -files=0
|
|
echo ""
|
|
|
|
# Phase 3: Configure vacuum
|
|
echo "โ๏ธ Phase 3: Vacuum configuration instructions..."
|
|
echo " 1. Visit: http://localhost:23646/maintenance/config/vacuum"
|
|
echo " 2. Set these values for testing:"
|
|
echo " - Enable Vacuum Tasks: โ
Checked"
|
|
echo " - Garbage Threshold: 0.30"
|
|
echo " - Scan Interval: [30] [Seconds]"
|
|
echo " - Min Volume Age: [0] [Minutes]"
|
|
echo " - Max Concurrent: 2"
|
|
echo " 3. Click 'Save Configuration'"
|
|
echo ""
|
|
|
|
read -p " Press ENTER after configuring vacuum settings..."
|
|
echo ""
|
|
|
|
# Phase 4: Monitor tasks
|
|
echo "๐ฏ Phase 4: Monitoring vacuum tasks..."
|
|
echo " Visit: http://localhost:23646/maintenance"
|
|
echo " You should see vacuum tasks appear within 30 seconds"
|
|
echo ""
|
|
|
|
echo " Waiting 60 seconds for vacuum detection and execution..."
|
|
for i in {60..1}; do
|
|
printf "\r Countdown: %02d seconds" $i
|
|
sleep 1
|
|
done
|
|
echo ""
|
|
echo ""
|
|
|
|
# Phase 5: Check results
|
|
echo "๐ Phase 5: Checking results after vacuum..."
|
|
go run create_vacuum_test_data.go -master=$MASTER_URL -files=0
|
|
echo ""
|
|
|
|
# Phase 6: Create more garbage for continuous testing
|
|
echo "๐ Phase 6: Creating additional garbage for continuous testing..."
|
|
echo " Running 3 rounds of garbage creation..."
|
|
|
|
for round in {1..3}; do
|
|
echo " Round $round: Creating garbage..."
|
|
go run create_vacuum_test_data.go -master=$MASTER_URL -files=8 -delete=0.6 -size=100
|
|
echo " Waiting 30 seconds before next round..."
|
|
sleep 30
|
|
done
|
|
|
|
echo ""
|
|
echo "๐ Final volume status:"
|
|
go run create_vacuum_test_data.go -master=$MASTER_URL -files=0
|
|
echo ""
|
|
|
|
echo "๐ Demo Complete!"
|
|
echo ""
|
|
echo "๐ Things to check:"
|
|
echo " 1. Maintenance Queue: http://localhost:23646/maintenance"
|
|
echo " 2. Volume Status: http://localhost:9333/vol/status"
|
|
echo " 3. Admin Dashboard: http://localhost:23646"
|
|
echo ""
|
|
echo "๐ก Next Steps:"
|
|
echo " - Try different garbage thresholds (0.10, 0.50, 0.80)"
|
|
echo " - Adjust scan intervals (10s, 1m, 5m)"
|
|
echo " - Monitor logs for vacuum operations"
|
|
echo " - Test with multiple volumes"
|
|
echo "" |