mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-08 17:42:56 +01:00
Use host IP instead of localhost for setting redis cluster
This commit is contained in:
parent
f538f4ae62
commit
bfb96d0306
1 changed files with 4 additions and 1 deletions
|
|
@ -11,13 +11,16 @@ start_redis_server() {
|
|||
--cluster-config-file "$2" &
|
||||
}
|
||||
|
||||
IP=$(hostname -I)
|
||||
IP=${IP%% *}
|
||||
|
||||
start_redis_server 7001 nodes-1.conf
|
||||
start_redis_server 7002 nodes-2.conf
|
||||
start_redis_server 7003 nodes-3.conf
|
||||
|
||||
sleep 3
|
||||
|
||||
redis-cli --cluster create 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 --cluster-yes
|
||||
redis-cli --cluster create "$IP:7001" "$IP:7002" "$IP:7003" --cluster-yes
|
||||
|
||||
wait -n
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue