From 69d28be0f1939683d63546ef88ab949ee2e2847d Mon Sep 17 00:00:00 2001 From: Jun Luo Date: Wed, 3 Apr 2024 01:39:16 -0700 Subject: [PATCH] Rename redis to valkey in create-cluster script (#165) Otherwise currently create-cluster will not work (because there is no redis-*). Signed-off-by: Jun Luo --- utils/create-cluster/create-cluster | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/utils/create-cluster/create-cluster b/utils/create-cluster/create-cluster index dd2008331..f4f44871f 100755 --- a/utils/create-cluster/create-cluster +++ b/utils/create-cluster/create-cluster @@ -28,7 +28,7 @@ then while [ $((PORT < ENDPORT)) != "0" ]; do PORT=$((PORT+1)) echo "Starting $PORT" - $BIN_PATH/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 --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} + $BIN_PATH/valkey-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 --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} done exit 0 fi @@ -44,7 +44,7 @@ then if [ "$2" == "-f" ]; then OPT_ARG="--cluster-yes" fi - $BIN_PATH/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS $OPT_ARG + $BIN_PATH/valkey-cli --cluster create $HOSTS --cluster-replicas $REPLICAS $OPT_ARG exit 0 fi @@ -53,7 +53,7 @@ then while [ $((PORT < ENDPORT)) != "0" ]; do PORT=$((PORT+1)) echo "Stopping $PORT" - $BIN_PATH/redis-cli -p $PORT shutdown nosave + $BIN_PATH/valkey-cli -p $PORT shutdown nosave done exit 0 fi @@ -64,13 +64,13 @@ then while [ $((PORT < ENDPORT)) != "0" ]; do PORT=$((PORT+1)) echo "Stopping $PORT" - $BIN_PATH/redis-cli -p $PORT shutdown nosave + $BIN_PATH/valkey-cli -p $PORT shutdown nosave done PORT=$OLD_PORT while [ $((PORT < ENDPORT)) != "0" ]; do PORT=$((PORT+1)) echo "Starting $PORT" - $BIN_PATH/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 --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} + $BIN_PATH/valkey-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 --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} done exit 0 fi @@ -81,7 +81,7 @@ then while [ 1 ]; do clear date - $BIN_PATH/redis-cli -p $PORT cluster nodes | head -30 + $BIN_PATH/valkey-cli -p $PORT cluster nodes | head -30 sleep 1 done exit 0 @@ -105,7 +105,7 @@ if [ "$1" == "call" ] then while [ $((PORT < ENDPORT)) != "0" ]; do PORT=$((PORT+1)) - $BIN_PATH/redis-cli -p $PORT $2 $3 $4 $5 $6 $7 $8 $9 + $BIN_PATH/valkey-cli -p $PORT $2 $3 $4 $5 $6 $7 $8 $9 done exit 0 fi @@ -131,10 +131,10 @@ then fi echo "Usage: $0 [start|create|stop|restart|watch|tail|tailall|clean|clean-logs|call]" -echo "start -- Launch Redis Cluster instances." -echo "create [-f] -- Create a cluster using redis-cli --cluster create." -echo "stop -- Stop Redis Cluster instances." -echo "restart -- Restart Redis Cluster instances." +echo "start -- Launch Valkey Cluster instances." +echo "create [-f] -- Create a cluster using valkey-cli --cluster create." +echo "stop -- Stop Valkey Cluster instances." +echo "restart -- Restart Valkey Cluster instances." echo "watch -- Show CLUSTER NODES output (first 30 lines) of first node." echo "tail -- Run tail -f of instance at base port + ID." echo "tailall -- Run tail -f for all the log files at once."