Use ipv6 localhost for dev cluster and different port numbers

This commit is contained in:
Alex 2020-11-29 17:31:58 +01:00
parent cee6c3a821
commit 2f11191f60
2 changed files with 8 additions and 8 deletions

View file

@ -24,11 +24,11 @@ cat > $CONF_PATH <<EOF
block_size = 1048576 # objects are split in blocks of maximum this number of bytes block_size = 1048576 # objects are split in blocks of maximum this number of bytes
metadata_dir = "/tmp/garage-meta-$count" metadata_dir = "/tmp/garage-meta-$count"
data_dir = "/tmp/garage-data-$count" data_dir = "/tmp/garage-data-$count"
rpc_bind_addr = "127.0.0.$count:3901" # the port other Garage nodes will use to talk to this node rpc_bind_addr = "[::]:$((3900+$count))" # the port other Garage nodes will use to talk to this node
bootstrap_peers = [ bootstrap_peers = [
"127.0.0.1:3901", "[::1]:3901",
"127.0.0.2:3901", "[::1]:3902",
"127.0.0.3:3901" "[::1]:3903"
] ]
max_concurrent_rpc_requests = 12 max_concurrent_rpc_requests = 12
data_replication_factor = 3 data_replication_factor = 3
@ -36,11 +36,11 @@ meta_replication_factor = 3
meta_epidemic_fanout = 3 meta_epidemic_fanout = 3
[s3_api] [s3_api]
api_bind_addr = "127.0.0.$count:3900" # the S3 API port, HTTP without TLS. Add a reverse proxy for the TLS part. api_bind_addr = "[::]:$((3910+$count))" # the S3 API port, HTTP without TLS. Add a reverse proxy for the TLS part.
s3_region = "garage" # set this to anything. S3 API calls will fail if they are not made against the region set here. s3_region = "garage" # set this to anything. S3 API calls will fail if they are not made against the region set here.
[s3_web] [s3_web]
bind_addr = "127.0.0.$count:3902" bind_addr = "[::]:$((3920+$count))"
EOF EOF
echo -en "$LABEL configuration written to $CONF_PATH\n" echo -en "$LABEL configuration written to $CONF_PATH\n"

View file

@ -10,8 +10,8 @@ ACCESS_KEY=`cat /tmp/garage.s3 |cut -d' ' -f1`
SECRET_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2` SECRET_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2`
alias s3grg="s3cmd \ alias s3grg="s3cmd \
--host 127.0.0.1:3900 \ --host 127.0.0.1:3911 \
--host-bucket 127.0.0.1:3900 \ --host-bucket 127.0.0.1:3911 \
--access_key=$ACCESS_KEY \ --access_key=$ACCESS_KEY \
--secret_key=$SECRET_KEY \ --secret_key=$SECRET_KEY \
--region=garage \ --region=garage \