mirror of
https://github.com/fluencelabs/redis
synced 2025-06-20 12:36:31 +00:00
Added cluster host and protected mode variables
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Settings
|
||||
CLUSTER_HOST=127.0.0.1
|
||||
PORT=30000
|
||||
TIMEOUT=2000
|
||||
NODES=6
|
||||
REPLICAS=1
|
||||
PROTECTED_MODE=yes
|
||||
|
||||
# You may want to put the above config parameters into config.sh in order to
|
||||
# override the defaults without modifying this script.
|
||||
@ -22,7 +24,7 @@ then
|
||||
while [ $((PORT < ENDPORT)) != "0" ]; do
|
||||
PORT=$((PORT+1))
|
||||
echo "Starting $PORT"
|
||||
../../src/redis-server --port $PORT --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes
|
||||
../../src/redis-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
@ -32,7 +34,7 @@ then
|
||||
HOSTS=""
|
||||
while [ $((PORT < ENDPORT)) != "0" ]; do
|
||||
PORT=$((PORT+1))
|
||||
HOSTS="$HOSTS 127.0.0.1:$PORT"
|
||||
HOSTS="$HOSTS $CLUSTER_HOST:$PORT"
|
||||
done
|
||||
../../src/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user