File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ RUN chmod +x /create_cluster.sh
6
6
7
7
EXPOSE 16379 16380 16381 16382 16383 16384
8
8
9
- CMD [ " /create_cluster.sh"]
9
+ CMD /create_cluster.sh 16379 16384
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ RUN chmod +x /create_cluster.sh
6
6
7
7
EXPOSE 6372 6373 6374 6375 6376 6377
8
8
9
- CMD [ " /create_cluster.sh"]
9
+ CMD /create_cluster.sh 6372 6377
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
mkdir -p /nodes
3
3
touch /nodes/nodemap
4
- for PORT in $( seq 16379 16384) ; do
4
+ START_NODE=$1
5
+ END_NODE=$2
6
+ for PORT in ` seq ${START_NODE} ${END_NODE} ` ; do
5
7
mkdir -p /nodes/$PORT
6
8
if [[ -e /redis.conf ]]; then
7
9
cp /redis.conf /nodes/$PORT /redis.conf
22
24
fi
23
25
echo 127.0.0.1:$PORT >> /nodes/nodemap
24
26
done
25
- echo yes | redis-cli --cluster create $( seq -f 127.0.0.1:%g 16379 16384 ) --cluster-replicas 1
27
+ echo yes | redis-cli --cluster create $( seq -f 127.0.0.1:%g ${START_NODE} ${END_NODE} ) --cluster-replicas 1
26
28
tail -f /redis.log
You can’t perform that action at this time.
0 commit comments