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
35b3a8e1
Commit
35b3a8e1
authored
May 07, 2018
by
artix
Browse files
- Updated create-cluster with redis-cli
- Updated README
parent
26b3a0eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
utils/create-cluster/README
View file @
35b3a8e1
...
@@ -15,7 +15,7 @@ To create a cluster, follow these steps:
...
@@ -15,7 +15,7 @@ To create a cluster, follow these steps:
1. Edit create-cluster and change the start / end port, depending on the
1. Edit create-cluster and change the start / end port, depending on the
number of instances you want to create.
number of instances you want to create.
2. Use "./create-cluster start" in order to run the instances.
2. Use "./create-cluster start" in order to run the instances.
3. Use "./create-cluster create" in order to execute redis-
trib
create, so that
3. Use "./create-cluster create" in order to execute redis-
cli --cluster
create, so that
an actual Redis cluster will be created.
an actual Redis cluster will be created.
4. Now you are ready to play with the cluster. AOF files and logs for each instances are created in the current directory.
4. Now you are ready to play with the cluster. AOF files and logs for each instances are created in the current directory.
...
...
utils/create-cluster/create-cluster
View file @
35b3a8e1
...
@@ -34,7 +34,7 @@ then
...
@@ -34,7 +34,7 @@ then
PORT
=
$((
PORT+1
))
PORT
=
$((
PORT+1
))
HOSTS
=
"
$HOSTS
127.0.0.1:
$PORT
"
HOSTS
=
"
$HOSTS
127.0.0.1:
$PORT
"
done
done
../../src/redis-
trib.rb create
-
-replicas
$REPLICAS
$HOSTS
../../src/redis-
cli
--cluster
create
$HOSTS
--cluster
-replicas
$REPLICAS
exit
0
exit
0
fi
fi
...
@@ -94,7 +94,7 @@ fi
...
@@ -94,7 +94,7 @@ fi
echo
"Usage:
$0
[start|create|stop|watch|tail|clean]"
echo
"Usage:
$0
[start|create|stop|watch|tail|clean]"
echo
"start -- Launch Redis Cluster instances."
echo
"start -- Launch Redis Cluster instances."
echo
"create -- Create a cluster using redis-
trib
create."
echo
"create -- Create a cluster using redis-
cli --cluster
create."
echo
"stop -- Stop Redis Cluster instances."
echo
"stop -- Stop Redis Cluster instances."
echo
"watch -- Show CLUSTER NODES output (first 30 lines) of first node."
echo
"watch -- Show CLUSTER NODES output (first 30 lines) of first node."
echo
"tail <id> -- Run tail -f of instance at base port + ID."
echo
"tail <id> -- Run tail -f of instance at base port + ID."
...
...
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