setup-raft-cluster 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. #!/bin/bash -ex
  2. #####################################################################
  3. # Change the following lines to match your IP addresses
  4. PRIMARY_NODE="10.161.0.40"
  5. NODE1="10.161.27.159"
  6. NODE2="10.161.27.159"
  7. #####################################################################
  8. # Data Information:
  9. #####################################################################
  10. # Primary Node: ${PRIMARY_NODE}
  11. # Other Nodes: ${NODE1},${NODE2}
  12. # Ports:
  13. # - {"port": 19901, "start-hslot": 0, "end-hslot": 1365}
  14. # - {"port": 19902, "start-hslot": 1366, "end-hslot": 2730}
  15. # - {"port": 19903, "start-hslot": 2731, "end-hslot": 4096}
  16. # - {"port": 19904, "start-hslot": 4097, "end-hslot": 5460}
  17. # - {"port": 19905, "start-hslot": 5461, "end-hslot": 6826}
  18. # - {"port": 19906, "start-hslot": 6827, "end-hslot": 8191}
  19. # - {"port": 19907, "start-hslot": 8192, "end-hslot": 9557}
  20. # - {"port": 19908, "start-hslot": 9558, "end-hslot": 10921}
  21. # - {"port": 19909, "start-hslot": 10922, "end-hslot": 12287}
  22. # - {"port": 19910, "start-hslot": 12288, "end-hslot": 13651}
  23. # - {"port": 19911, "start-hslot": 13652, "end-hslot": 15017}
  24. # - {"port": 19912, "start-hslot": 15018, "end-hslot": 16383}
  25. #####################################################################
  26. # Raft Group Setups!!
  27. echo "Setting up Raft Groups - port 19901"
  28. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 raft.cluster init
  29. /usr/local/bin/redis-cli -h ${NODE1} -p 19901 raft.cluster join ${PRIMARY_NODE}:19901
  30. /usr/local/bin/redis-cli -h ${NODE2} -p 19901 raft.cluster join ${PRIMARY_NODE}:19901
  31. echo "Setting up Raft Groups - port 19902"
  32. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 raft.cluster init
  33. /usr/local/bin/redis-cli -h ${NODE1} -p 19902 raft.cluster join ${PRIMARY_NODE}:19902
  34. /usr/local/bin/redis-cli -h ${NODE2} -p 19902 raft.cluster join ${PRIMARY_NODE}:19902
  35. echo "Setting up Raft Groups - port 19903"
  36. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 raft.cluster init
  37. /usr/local/bin/redis-cli -h ${NODE1} -p 19903 raft.cluster join ${PRIMARY_NODE}:19903
  38. /usr/local/bin/redis-cli -h ${NODE2} -p 19903 raft.cluster join ${PRIMARY_NODE}:19903
  39. echo "Setting up Raft Groups - port 19904"
  40. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 raft.cluster init
  41. /usr/local/bin/redis-cli -h ${NODE1} -p 19904 raft.cluster join ${PRIMARY_NODE}:19904
  42. /usr/local/bin/redis-cli -h ${NODE2} -p 19904 raft.cluster join ${PRIMARY_NODE}:19904
  43. echo "Setting up Raft Groups - port 19905"
  44. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 raft.cluster init
  45. /usr/local/bin/redis-cli -h ${NODE1} -p 19905 raft.cluster join ${PRIMARY_NODE}:19905
  46. /usr/local/bin/redis-cli -h ${NODE2} -p 19905 raft.cluster join ${PRIMARY_NODE}:19905
  47. echo "Setting up Raft Groups - port 19906"
  48. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 raft.cluster init
  49. /usr/local/bin/redis-cli -h ${NODE1} -p 19906 raft.cluster join ${PRIMARY_NODE}:19906
  50. /usr/local/bin/redis-cli -h ${NODE2} -p 19906 raft.cluster join ${PRIMARY_NODE}:19906
  51. echo "Setting up Raft Groups - port 19907"
  52. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 raft.cluster init
  53. /usr/local/bin/redis-cli -h ${NODE1} -p 19907 raft.cluster join ${PRIMARY_NODE}:19907
  54. /usr/local/bin/redis-cli -h ${NODE2} -p 19907 raft.cluster join ${PRIMARY_NODE}:19907
  55. echo "Setting up Raft Groups - port 19908"
  56. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 raft.cluster init
  57. /usr/local/bin/redis-cli -h ${NODE1} -p 19908 raft.cluster join ${PRIMARY_NODE}:19908
  58. /usr/local/bin/redis-cli -h ${NODE2} -p 19908 raft.cluster join ${PRIMARY_NODE}:19908
  59. echo "Setting up Raft Groups - port 19909"
  60. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 raft.cluster init
  61. /usr/local/bin/redis-cli -h ${NODE1} -p 19909 raft.cluster join ${PRIMARY_NODE}:19909
  62. /usr/local/bin/redis-cli -h ${NODE2} -p 19909 raft.cluster join ${PRIMARY_NODE}:19909
  63. echo "Setting up Raft Groups - port 19910"
  64. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 raft.cluster init
  65. /usr/local/bin/redis-cli -h ${NODE1} -p 19910 raft.cluster join ${PRIMARY_NODE}:19910
  66. /usr/local/bin/redis-cli -h ${NODE2} -p 19910 raft.cluster join ${PRIMARY_NODE}:19910
  67. echo "Setting up Raft Groups - port 19911"
  68. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 raft.cluster init
  69. /usr/local/bin/redis-cli -h ${NODE1} -p 19911 raft.cluster join ${PRIMARY_NODE}:19911
  70. /usr/local/bin/redis-cli -h ${NODE2} -p 19911 raft.cluster join ${PRIMARY_NODE}:19911
  71. echo "Setting up Raft Groups - port 19912"
  72. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 raft.cluster init
  73. /usr/local/bin/redis-cli -h ${NODE1} -p 19912 raft.cluster join ${PRIMARY_NODE}:19912
  74. /usr/local/bin/redis-cli -h ${NODE2} -p 19912 raft.cluster join ${PRIMARY_NODE}:19912
  75. #####################################################################
  76. # Sleep until raft cluster is created
  77. echo "Waiting for Raft to stabilize"
  78. sleep 10
  79. #####################################################################
  80. # Set up Shard Clusters
  81. echo "Setting up Shard Clusters"
  82. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  83. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  84. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  85. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  86. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  87. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  88. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  89. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  90. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  91. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  92. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19901 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  93. echo "Setting up Shard Clusters"
  94. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  95. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  96. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  97. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  98. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  99. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  100. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  101. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  102. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  103. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  104. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19902 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  105. echo "Setting up Shard Clusters"
  106. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  107. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  108. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  109. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  110. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  111. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  112. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  113. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  114. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  115. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  116. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19903 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  117. echo "Setting up Shard Clusters"
  118. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  119. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  120. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  121. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  122. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  123. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  124. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  125. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  126. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  127. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  128. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19904 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  129. echo "Setting up Shard Clusters"
  130. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  131. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  132. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  133. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  134. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  135. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  136. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  137. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  138. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  139. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  140. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19905 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  141. echo "Setting up Shard Clusters"
  142. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  143. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  144. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  145. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  146. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  147. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  148. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  149. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  150. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  151. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  152. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19906 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  153. echo "Setting up Shard Clusters"
  154. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  155. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  156. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  157. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  158. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  159. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  160. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  161. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  162. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  163. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  164. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19907 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  165. echo "Setting up Shard Clusters"
  166. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  167. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  168. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  169. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  170. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  171. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  172. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  173. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  174. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  175. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  176. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19908 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  177. echo "Setting up Shard Clusters"
  178. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  179. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  180. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  181. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  182. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  183. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  184. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  185. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  186. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  187. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  188. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19909 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  189. echo "Setting up Shard Clusters"
  190. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  191. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  192. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  193. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  194. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  195. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  196. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  197. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  198. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  199. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911
  200. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19910 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  201. echo "Setting up Shard Clusters"
  202. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  203. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  204. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  205. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  206. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  207. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  208. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  209. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  210. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  211. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  212. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19911 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19912
  213. echo "Setting up Shard Clusters"
  214. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19901
  215. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19902
  216. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19903
  217. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19904
  218. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19905
  219. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19906
  220. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19907
  221. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19908
  222. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19909
  223. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19910
  224. /usr/local/bin/redis-cli -h ${PRIMARY_NODE} -p 19912 RAFT.SHARDGROUP LINK ${PRIMARY_NODE}:19911