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.
155 lines
4.0 KiB
Bash
Executable File
155 lines
4.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Docker Test Helper - Simplified commands for running integration tests
|
|
|
|
set -e
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m'
|
|
|
|
print_usage() {
|
|
echo -e "${BLUE}SeaweedFS RDMA Docker Integration Test Helper${NC}"
|
|
echo ""
|
|
echo "Usage: $0 [command]"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " start - Start all services"
|
|
echo " test - Run integration tests"
|
|
echo " stop - Stop all services"
|
|
echo " clean - Stop services and clean up volumes"
|
|
echo " logs - Show logs from all services"
|
|
echo " status - Show status of all services"
|
|
echo " shell - Open shell in test client container"
|
|
echo ""
|
|
echo "Examples:"
|
|
echo " $0 start # Start all services"
|
|
echo " $0 test # Run full integration test suite"
|
|
echo " $0 logs rdma-engine # Show logs from RDMA engine"
|
|
echo " $0 shell # Interactive testing shell"
|
|
}
|
|
|
|
start_services() {
|
|
echo -e "${GREEN}๐ Starting SeaweedFS RDMA integration services...${NC}"
|
|
docker-compose up -d seaweedfs-master seaweedfs-volume rdma-engine rdma-sidecar
|
|
|
|
echo -e "${YELLOW}โณ Waiting for services to be ready...${NC}"
|
|
sleep 10
|
|
|
|
echo -e "${GREEN}โ
Services started. Checking health...${NC}"
|
|
docker-compose ps
|
|
}
|
|
|
|
run_tests() {
|
|
echo -e "${GREEN}๐งช Running integration tests...${NC}"
|
|
|
|
# Make sure services are running
|
|
docker-compose up -d seaweedfs-master seaweedfs-volume rdma-engine rdma-sidecar
|
|
|
|
# Wait for services to be ready
|
|
echo -e "${YELLOW}โณ Waiting for services to be ready...${NC}"
|
|
sleep 15
|
|
|
|
# Run the integration tests
|
|
docker-compose run --rm integration-tests
|
|
}
|
|
|
|
stop_services() {
|
|
echo -e "${YELLOW}๐ Stopping services...${NC}"
|
|
docker-compose down
|
|
echo -e "${GREEN}โ
Services stopped${NC}"
|
|
}
|
|
|
|
clean_all() {
|
|
echo -e "${YELLOW}๐งน Cleaning up services and volumes...${NC}"
|
|
docker-compose down -v --remove-orphans
|
|
echo -e "${GREEN}โ
Cleanup complete${NC}"
|
|
}
|
|
|
|
show_logs() {
|
|
local service=${1:-}
|
|
if [ -n "$service" ]; then
|
|
echo -e "${BLUE}๐ Showing logs for $service...${NC}"
|
|
docker-compose logs -f "$service"
|
|
else
|
|
echo -e "${BLUE}๐ Showing logs for all services...${NC}"
|
|
docker-compose logs -f
|
|
fi
|
|
}
|
|
|
|
show_status() {
|
|
echo -e "${BLUE}๐ Service Status:${NC}"
|
|
docker-compose ps
|
|
|
|
echo -e "\n${BLUE}๐ก Health Checks:${NC}"
|
|
|
|
# Check SeaweedFS Master
|
|
if curl -s http://localhost:9333/cluster/status >/dev/null 2>&1; then
|
|
echo -e " ${GREEN}โ
SeaweedFS Master: Healthy${NC}"
|
|
else
|
|
echo -e " ${RED}โ SeaweedFS Master: Unhealthy${NC}"
|
|
fi
|
|
|
|
# Check SeaweedFS Volume
|
|
if curl -s http://localhost:8080/status >/dev/null 2>&1; then
|
|
echo -e " ${GREEN}โ
SeaweedFS Volume: Healthy${NC}"
|
|
else
|
|
echo -e " ${RED}โ SeaweedFS Volume: Unhealthy${NC}"
|
|
fi
|
|
|
|
# Check RDMA Sidecar
|
|
if curl -s http://localhost:8081/health >/dev/null 2>&1; then
|
|
echo -e " ${GREEN}โ
RDMA Sidecar: Healthy${NC}"
|
|
else
|
|
echo -e " ${RED}โ RDMA Sidecar: Unhealthy${NC}"
|
|
fi
|
|
}
|
|
|
|
open_shell() {
|
|
echo -e "${GREEN}๐ Opening interactive shell in test client...${NC}"
|
|
echo -e "${YELLOW}Use './test-rdma --help' for RDMA testing commands${NC}"
|
|
echo -e "${YELLOW}Use 'curl http://rdma-sidecar:8081/health' to test sidecar${NC}"
|
|
|
|
docker-compose run --rm test-client /bin/bash
|
|
}
|
|
|
|
# Main command handling
|
|
case "${1:-}" in
|
|
start)
|
|
start_services
|
|
;;
|
|
test)
|
|
run_tests
|
|
;;
|
|
stop)
|
|
stop_services
|
|
;;
|
|
clean)
|
|
clean_all
|
|
;;
|
|
logs)
|
|
show_logs "${2:-}"
|
|
;;
|
|
status)
|
|
show_status
|
|
;;
|
|
shell)
|
|
open_shell
|
|
;;
|
|
-h|--help|help)
|
|
print_usage
|
|
;;
|
|
"")
|
|
print_usage
|
|
exit 1
|
|
;;
|
|
*)
|
|
echo -e "${RED}โ Unknown command: $1${NC}"
|
|
print_usage
|
|
exit 1
|
|
;;
|
|
esac
|