File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Gemfile.lock
7
7
/.yardoc
8
8
/coverage /*
9
9
/doc /
10
+ /examples /sentinel /sentinel.conf
10
11
/nohup.out
11
12
/pkg /*
12
13
/rdsrv
Original file line number Diff line number Diff line change
1
+ sentinel monitor master2 127.0.0.1 6381 2
2
+ sentinel down-after-milliseconds master2 10000
3
+ sentinel parallel-syncs master2 5
4
+ sentinel config-epoch master2 0
5
+
6
+ sentinel leader-epoch master2 0
7
+ sentinel known-slave master2 127.0.0.1 63810
8
+ sentinel known-slave master2 127.0.0.1 63801
9
+ sentinel known-sentinel master2 127.0.0.1 26379 d2ea5375967f2b992955679c5832f0c779f50171
10
+ # Generated by CONFIG REWRITE
11
+ port 26379
12
+ dir "/Users/jano/code/redis-rb"
13
+ sentinel known-sentinel master2 127.0.0.1 26380 4748647f7aa0ad1d6a3faa978a2829e88436ddb8
14
+ sentinel monitor master1 127.0.0.1 6380 2
15
+ sentinel down-after-milliseconds master1 60000
16
+
17
+ sentinel config-epoch master1 0
18
+ sentinel leader-epoch master1 0
19
+ sentinel known-slave master1 127.0.0.1 63800
20
+ sentinel known-slave master1 127.0.0.1 63801
21
+ sentinel known-sentinel master1 127.0.0.1 26379 d2ea5375967f2b992955679c5832f0c779f50171
22
+ sentinel known-sentinel master1 127.0.0.1 26380 4748647f7aa0ad1d6a3faa978a2829e88436ddb8
23
+ sentinel current-epoch 0
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env ruby
2
+
3
+ at_exit do
4
+ pids . each do |pid |
5
+ Process . kill ( :INT , pid )
6
+ end
7
+
8
+ Process . waitall
9
+ end
10
+
11
+ pids = [ ]
12
+
13
+ # Masters
14
+ pids << spawn ( "redis-server --port 6380" )
15
+ pids << spawn ( "redis-server --port 6381" )
16
+
17
+ # Slaves of Master 1
18
+ pids << spawn ( "redis-server --port 63800 --slaveof 127.0.0.1 6380" )
19
+ pids << spawn ( "redis-server --port 63801 --slaveof 127.0.0.1 6380" )
20
+
21
+ # Slaves of Master 2
22
+ pids << spawn ( "redis-server --port 63810 --slaveof 127.0.0.1 6381" )
23
+ pids << spawn ( "redis-server --port 63811 --slaveof 127.0.0.1 6381" )
24
+
25
+ # Sentinels
26
+ pids << spawn ( "redis-server sentinel/sentinel.conf --sentinel --port 26379" )
27
+ pids << spawn ( "redis-server sentinel/sentinel.conf --sentinel --port 26380" )
28
+
29
+ Process . waitall
You can’t perform that action at this time.
0 commit comments