chore(CI): fix redis ssl cluster error

This commit is contained in:
zhanghongtong 2021-04-15 08:07:03 +00:00 committed by turtleDeng
parent ed2a675404
commit ef88b283e8
2 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,7 @@ tls-cert-file /tls/redis.crt
tls-key-file /tls/redis.key
tls-ca-cert-file /tls/ca.crt
tls-replication yes
tls-cluster yes
protected-mode no
requirepass public
masterauth public

View File

@ -90,7 +90,11 @@ do
continue;
fi
if [ "${node}" = "cluster" ] ; then
yes "yes" | redis-cli --cluster create "$LOCAL_IP:7000" "$LOCAL_IP:7001" "$LOCAL_IP:7002" --pass public --no-auth-warning;
if $tls ; then
yes "yes" | redis-cli --cluster create "$LOCAL_IP:8000" "$LOCAL_IP:8001" "$LOCAL_IP:8002" --pass public --no-auth-warning --tls true --cacert /tls/ca.crt --cert /tls/redis.crt --key /tls/redis.key;
else
yes "yes" | redis-cli --cluster create "$LOCAL_IP:7000" "$LOCAL_IP:7001" "$LOCAL_IP:7002" --pass public --no-auth-warning;
fi
elif [ "${node}" = "sentinel" ] ; then
tee /_sentinel.conf>/dev/null << EOF
port 26379