mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +00:00
The binary is s3 and the product is Hanzo S3; the rest of the tree now says so too. - Environment: WEED_* and SEAWEEDFS_* are S3_*, no aliases. fla9's flag prefix is S3, matching viper's existing "s3" prefix, so the S3_S3_SSE_* names mini.go exports are the ones viper reads (WEED_S3_SSE_KEK was never seen once viper moved to "s3"). - Java and Hadoop: packages, fs.hanzofs.* keys and the hanzofs:// scheme under the hanzofs namespace the protos already declare; classes take a neutral Filer prefix and file names match them again (the earlier pass left Seas3*.java holding Seaweed* classes). Client, hdfs3, examples, s3copier, random_access and the Spark tests compile. - Helm chart: helpers are hanzo.*, values live under global.s3; the chart renders and lints, which it did not before. - Terraform: the s3.service.tftpl reference matches the file; 12/12 render tests pass. Config paths point at /etc/hanzo, which the binary reads. - loadtest.pb.go regenerated from loadtest.proto. - Upstream logo, sponsor images and unreferenced diagrams removed from note/. Kept: NOTICE attribution, LICENSE, the erasure-coding fixture s3/storage/erasure_coding/1.dat (test bytes), and unmaintained/ and third_party/ (vendored). No on-disk format, wire protocol or metadata key changed. Co-authored-by: Hanzo Dev <[email protected]>
129 lines
3.6 KiB
YAML
129 lines
3.6 KiB
YAML
services:
|
|
|
|
fdb1:
|
|
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
|
|
environment:
|
|
- FDB_CLUSTER_FILE_CONTENTS
|
|
- FDB_NETWORKING_MODE=container
|
|
- FDB_COORDINATOR_PORT=${FDB_PORT:-4500}
|
|
- FDB_PORT=${FDB_PORT:-4500}
|
|
networks:
|
|
- fdb_network
|
|
healthcheck:
|
|
test: [ "CMD", "nc", "-z", "127.0.0.1", "4500" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 60
|
|
|
|
fdb2:
|
|
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
|
|
environment:
|
|
- FDB_CLUSTER_FILE_CONTENTS
|
|
- FDB_NETWORKING_MODE=container
|
|
- FDB_COORDINATOR_PORT=${FDB_PORT:-4500}
|
|
- FDB_PORT=${FDB_PORT:-4500}
|
|
networks:
|
|
- fdb_network
|
|
healthcheck:
|
|
test: [ "CMD", "nc", "-z", "127.0.0.1", "4500" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 60
|
|
|
|
fdb3:
|
|
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
|
|
environment:
|
|
- FDB_CLUSTER_FILE_CONTENTS
|
|
- FDB_NETWORKING_MODE=container
|
|
- FDB_COORDINATOR_PORT=${FDB_PORT:-4500}
|
|
- FDB_PORT=${FDB_PORT:-4500}
|
|
networks:
|
|
- fdb_network
|
|
healthcheck:
|
|
test: [ "CMD", "nc", "-z", "127.0.0.1", "4500" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 60
|
|
|
|
# Initialize and configure the database
|
|
fdb-init:
|
|
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
|
|
configs:
|
|
- target: /var/fdb/config/fdb.cluster
|
|
source: fdb.cluster
|
|
environment:
|
|
- FDB_CLUSTER_FILE=/var/fdb/config/fdb.cluster
|
|
networks:
|
|
- fdb_network
|
|
depends_on:
|
|
fdb1:
|
|
condition: service_healthy
|
|
fdb2:
|
|
condition: service_healthy
|
|
fdb3:
|
|
condition: service_healthy
|
|
entrypoint: |
|
|
bash -c "
|
|
set -o errexit
|
|
# Wait for cluster to be ready
|
|
sleep 10
|
|
|
|
# Configure database
|
|
echo 'Initializing FoundationDB database...'
|
|
if ! fdbcli --exec 'configure new single ssd' >/tmp/fdbcli.out 2>&1; then
|
|
if ! grep -qi 'ERROR: Database already exists!' /tmp/fdbcli.out >/dev/null 2>/dev/null; then
|
|
echo 'ERROR: Database initialization failed!' >&2
|
|
cat /tmp/fdbcli.out >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Wait for configuration to complete
|
|
sleep 5
|
|
|
|
# Verify cluster status
|
|
fdbcli --exec 'status'
|
|
|
|
echo 'FoundationDB cluster initialization complete!'
|
|
"
|
|
|
|
# Hanzo service with FoundationDB filer
|
|
hanzo:
|
|
image: ${S3_IMAGE:-ghcr.io/hanzoai/s3:latest}
|
|
depends_on:
|
|
fdb-init:
|
|
condition: service_completed_successfully
|
|
networks:
|
|
- fdb_network
|
|
ports:
|
|
- "9333:9333"
|
|
- "19333:19333"
|
|
- "8888:8888"
|
|
- "8333:8333"
|
|
- "18888:18888"
|
|
configs:
|
|
- target: /var/fdb/config/fdb.cluster
|
|
source: fdb.cluster
|
|
volumes:
|
|
- ./s3.json:/etc/hanzo/s3.json
|
|
- ./filer.toml:/etc/hanzo/filer.toml
|
|
environment:
|
|
- S3_LEVELDB2_ENABLED
|
|
- S3_FOUNDATIONDB_ENABLED
|
|
- S3_FOUNDATIONDB_CLUSTER_FILE
|
|
- S3_FOUNDATIONDB_API_VERSION
|
|
- S3_FOUNDATIONDB_TIMEOUT
|
|
- S3_FOUNDATIONDB_MAX_RETRY_DELAY
|
|
- S3_MASTER_VOLUME_GROWTH_COPY_1=1
|
|
- S3_MASTER_VOLUME_GROWTH_COPY_OTHER=1
|
|
command: "s3 server -ip=hanzo -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/hanzo/s3.json -s3.port=8333 -s3.allowDeleteBucketNotEmpty=false"
|
|
|
|
configs:
|
|
fdb.cluster:
|
|
content: |
|
|
${FDB_CLUSTER_FILE_CONTENTS:-docker:docker@fdb1:4500,fdb2:4500,fdb3:4500}
|
|
|
|
networks:
|
|
fdb_network:
|
|
driver: bridge
|