Browse Source

update tester to build the failover tester script

Chris Mague 4 years ago
parent
commit
f2ae8b4414
3 changed files with 22 additions and 14 deletions
  1. 7 0
      ansible/tester.yml
  2. 14 13
      packaging/setup-raft-cluster
  3. 1 1
      packaging/systemd_redis.example

+ 7 - 0
ansible/tester.yml

@@ -131,6 +131,13 @@
         state: absent
       notify:
         - restart_nginx
+    - name: Add Golang PPA
+      apt_repository:
+        repo: 'ppa:longsleep/golang-backports'
+        state: present
+    - name: Install Go
+      package:
+        name: golang
 
 
   roles:

+ 14 - 13
packaging/setup-raft-cluster

@@ -12,19 +12,20 @@ NODE2="10.161.27.159"
 #####################################################################
 # Primary Node: ${PRIMARY_NODE}
 # Other Nodes:  ${NODE1},${NODE2}
-# Raft Instance Ports: 
-#   - 19901
-#   - 19902
-#   - 19903
-#   - 19904
-#   - 19905
-#   - 19906
-#   - 19907
-#   - 19908
-#   - 19909
-#   - 19910
-#   - 19911
-#   - 19912
+# Ports:
+# - {"port": 19901, "start-hslot": 0,     "end-hslot": 1365}
+# - {"port": 19902, "start-hslot": 1366,  "end-hslot": 2730}
+# - {"port": 19903, "start-hslot": 2731,  "end-hslot": 4096}
+# - {"port": 19904, "start-hslot": 4097,  "end-hslot": 5460}
+# - {"port": 19905, "start-hslot": 5461,  "end-hslot": 6826}
+# - {"port": 19906, "start-hslot": 6827,  "end-hslot": 8191}
+# - {"port": 19907, "start-hslot": 8192,  "end-hslot": 9557}
+# - {"port": 19908, "start-hslot": 9558,  "end-hslot": 10921}
+# - {"port": 19909, "start-hslot": 10922, "end-hslot": 12287}
+# - {"port": 19910, "start-hslot": 12288, "end-hslot": 13651}
+# - {"port": 19911, "start-hslot": 13652, "end-hslot": 15017}
+# - {"port": 19912, "start-hslot": 15018, "end-hslot": 16383}
+
 
 #####################################################################
 # Raft Group Setups!!

+ 1 - 1
packaging/systemd_redis.example

@@ -8,7 +8,7 @@ WorkingDirectory=/opt/cpredis
 Type=simple
 LimitNOFILE=65535
 User=redis
-ExecStart=/usr/local/bin/redis-server --port 19901 --protected-mode no --dbfilename 19901-redis.rdb --loadmodule /usr/local/share/redisraft/redisraft.so addr=CHANGEME:19901 raft-log-fsync=no follower-proxy=no raftize-all-commands=yes cluster-start-hslot=0 cluster-end-hslot=16383 raft-log-filename=19901-raftlog.db cluster-mode=yes
+ExecStart=/usr/local/bin/redis-server --port 19901 --protected-mode no --dbfilename 19901-redis.rdb --loadmodule /usr/local/share/redisraft/redisraft.so addr=CHANGEME:19901 raft-log-fsync=no follower-proxy=no raftize-all-commands=yes cluster-start-hslot=0 cluster-end-hslot=1365 raft-log-filename=19901-raftlog.db cluster-mode=yes
 StandardOutput=file:/var/log/cpredis/redis-19901.log
 StandardError=file:/var/log/cpredis/redis-19901-error.log