-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(router): enable redis to work with auth (#1563)
- Loading branch information
Showing
10 changed files
with
248 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
# wait for the docker-compose depends_on to spin up the redis nodes usually takes this long | ||
sleep 10 | ||
|
||
node_0_ip=$(getent hosts redis-cluster-node-0 | awk '{ print $1 }') | ||
node_1_ip=$(getent hosts redis-cluster-node-1 | awk '{ print $1 }') | ||
node_2_ip=$(getent hosts redis-cluster-node-2 | awk '{ print $1 }') | ||
node_3_ip=$(getent hosts redis-cluster-node-3 | awk '{ print $1 }') | ||
|
||
# Set cluster properties dynamically for each node | ||
for ip in $node_1_ip $node_2_ip $node_3_ip; do | ||
echo "Configuring Redis node at $ip" | ||
redis-cli -h $ip -p 6379 CONFIG SET cluster-announce-ip "$ip" | ||
done | ||
|
||
# Create the cluster | ||
redis-cli --cluster create \ | ||
$node_0_ip:6379 \ | ||
$node_1_ip:6379 \ | ||
$node_2_ip:6379 \ | ||
--cluster-replicas 0 --cluster-yes | ||
$node_3_ip:6379 \ | ||
--cluster-replicas 0 --cluster-yes | ||
|
||
echo "Redis Cluster setup complete!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.