Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0db3b0a0
Commit
0db3b0a0
authored
Oct 16, 2019
by
Yossi Gottlieb
Browse files
Merge remote-tracking branch 'upstream/unstable' into tls
parents
c469f6ad
b8e02f2b
Changes
61
Hide whitespace changes
Inline
Side-by-side
utils/create-cluster/create-cluster
View file @
0db3b0a0
#!/bin/bash
# Settings
CLUSTER_HOST
=
127.0.0.1
PORT
=
30000
TIMEOUT
=
2000
NODES
=
6
REPLICAS
=
1
PROTECTED_MODE
=
yes
# You may want to put the above config parameters into config.sh in order to
# override the defaults without modifying this script.
...
...
@@ -22,7 +24,7 @@ then
while
[
$((
PORT < ENDPORT
))
!=
"0"
]
;
do
PORT
=
$((
PORT+1
))
echo
"Starting
$PORT
"
../../src/redis-server
--port
$PORT
--cluster-enabled
yes
--cluster-config-file
nodes-
${
PORT
}
.conf
--cluster-node-timeout
$TIMEOUT
--appendonly
yes
--appendfilename
appendonly-
${
PORT
}
.aof
--dbfilename
dump-
${
PORT
}
.rdb
--logfile
${
PORT
}
.log
--daemonize
yes
../../src/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
--dbfilename
dump-
${
PORT
}
.rdb
--logfile
${
PORT
}
.log
--daemonize
yes
done
exit
0
fi
...
...
@@ -32,7 +34,7 @@ then
HOSTS
=
""
while
[
$((
PORT < ENDPORT
))
!=
"0"
]
;
do
PORT
=
$((
PORT+1
))
HOSTS
=
"
$HOSTS
127.0.0.1
:
$PORT
"
HOSTS
=
"
$HOSTS
$CLUSTER_HOST
:
$PORT
"
done
../../src/redis-cli
--cluster
create
$HOSTS
--cluster-replicas
$REPLICAS
exit
0
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment