From 65fbc0575f8321d29ba60fa8248d6df8e8b5b6cb Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 28 Feb 2021 22:57:01 -0800 Subject: [PATCH] 2clusters adds tiering to s3 --- docker/compose/local-clusters-compose.yml | 2 ++ docker/compose/master-cloud.toml | 30 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 docker/compose/master-cloud.toml diff --git a/docker/compose/local-clusters-compose.yml b/docker/compose/local-clusters-compose.yml index 7bd16aa3f..402ab8d8a 100644 --- a/docker/compose/local-clusters-compose.yml +++ b/docker/compose/local-clusters-compose.yml @@ -11,6 +11,8 @@ services: - 8888:8888 - 18888:18888 command: "server -ip=server1 -filer -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1" + volumes: + - ./master-cloud.toml:/etc/seaweedfs/master.toml server2: image: chrislusf/seaweedfs:local ports: diff --git a/docker/compose/master-cloud.toml b/docker/compose/master-cloud.toml new file mode 100644 index 000000000..17289c114 --- /dev/null +++ b/docker/compose/master-cloud.toml @@ -0,0 +1,30 @@ + +# Put this file to one of the location, with descending priority +# ./master.toml +# $HOME/.seaweedfs/master.toml +# /etc/seaweedfs/master.toml +# this file is read by master + +[master.maintenance] +# periodically run these scripts are the same as running them from 'weed shell' +scripts = """ + lock + ec.encode -fullPercent=95 -quietFor=1h + ec.rebuild -force + ec.balance -force + volume.balance -force + volume.fix.replication + unlock +""" +sleep_minutes = 17 # sleep minutes between each script execution + +# configurations for tiered cloud storage +# old volumes are transparently moved to cloud for cost efficiency +[storage.backend] + [storage.backend.s3.default] + enabled = true + aws_access_key_id = "any" # if empty, loads from the shared credentials file (~/.aws/credentials). + aws_secret_access_key = "any" # if empty, loads from the shared credentials file (~/.aws/credentials). + region = "us-east-2" + bucket = "volume_bucket" # an existing bucket + endpoint = "http://server2:8333"