mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 18:12:55 +01:00
Merge branch 'sc1-fix-rediscluster-hostip' into 'master'
Use host IP instead of localhost for setting redis cluster See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/684 Merged-by: Stan Hu <stanhu@gmail.com> Approved-by: Stan Hu <stanhu@gmail.com> Co-authored-by: Sylvester Chin <schin@gitlab.com>
This commit is contained in:
commit
f035933a1b
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