raft_group_setup.tpl 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/bin/bash
  2. #############################################################################
  3. # Setting up the raft groups
  4. #
  5. # IPS:
  6. # ${node1}
  7. # ${node2}
  8. # ${node3}
  9. # ${node4}
  10. # ${node5}
  11. #
  12. # Run once from from any node
  13. #############################################################################
  14. # setup clusters
  15. redis-cli -h ${node1} -p 19901 raft.cluster init
  16. redis-cli -h ${node1} -p 19902 raft.cluster init
  17. redis-cli -h ${node1} -p 19903 raft.cluster init
  18. redis-cli -h ${node1} -p 19904 raft.cluster init
  19. redis-cli -h ${node2} -p 19905 raft.cluster init
  20. redis-cli -h ${node2} -p 19906 raft.cluster init
  21. redis-cli -h ${node2} -p 19907 raft.cluster init
  22. redis-cli -h ${node2} -p 19908 raft.cluster init
  23. redis-cli -h ${node3} -p 19909 raft.cluster init
  24. redis-cli -h ${node3} -p 19910 raft.cluster init
  25. redis-cli -h ${node3} -p 19911 raft.cluster init
  26. redis-cli -h ${node3} -p 19912 raft.cluster init
  27. # setup groups
  28. redis-cli -h ${node2} -p 19901 raft.cluster join ${node1}:19901
  29. redis-cli -h ${node3} -p 19901 raft.cluster join ${node1}:19901
  30. redis-cli -h ${node4} -p 19901 raft.cluster join ${node1}:19901
  31. redis-cli -h ${node5} -p 19901 raft.cluster join ${node1}:19901
  32. redis-cli -h ${node2} -p 19902 raft.cluster join ${node1}:19902
  33. redis-cli -h ${node3} -p 19902 raft.cluster join ${node1}:19902
  34. redis-cli -h ${node4} -p 19902 raft.cluster join ${node1}:19902
  35. redis-cli -h ${node5} -p 19902 raft.cluster join ${node1}:19902
  36. redis-cli -h ${node2} -p 19903 raft.cluster join ${node1}:19903
  37. redis-cli -h ${node3} -p 19903 raft.cluster join ${node1}:19903
  38. redis-cli -h ${node4} -p 19903 raft.cluster join ${node1}:19903
  39. redis-cli -h ${node5} -p 19903 raft.cluster join ${node1}:19903
  40. redis-cli -h ${node2} -p 19904 raft.cluster join ${node1}:19904
  41. redis-cli -h ${node3} -p 19904 raft.cluster join ${node1}:19904
  42. redis-cli -h ${node4} -p 19904 raft.cluster join ${node1}:19904
  43. redis-cli -h ${node5} -p 19904 raft.cluster join ${node1}:19904
  44. redis-cli -h ${node1} -p 19905 raft.cluster join ${node2}:19905
  45. redis-cli -h ${node3} -p 19905 raft.cluster join ${node2}:19905
  46. redis-cli -h ${node4} -p 19905 raft.cluster join ${node2}:19905
  47. redis-cli -h ${node5} -p 19905 raft.cluster join ${node2}:19905
  48. redis-cli -h ${node1} -p 19906 raft.cluster join ${node2}:19906
  49. redis-cli -h ${node3} -p 19906 raft.cluster join ${node2}:19906
  50. redis-cli -h ${node4} -p 19906 raft.cluster join ${node2}:19906
  51. redis-cli -h ${node5} -p 19906 raft.cluster join ${node2}:19906
  52. redis-cli -h ${node1} -p 19907 raft.cluster join ${node2}:19907
  53. redis-cli -h ${node3} -p 19907 raft.cluster join ${node2}:19907
  54. redis-cli -h ${node4} -p 19907 raft.cluster join ${node2}:19907
  55. redis-cli -h ${node5} -p 19907 raft.cluster join ${node2}:19907
  56. redis-cli -h ${node1} -p 19908 raft.cluster join ${node2}:19908
  57. redis-cli -h ${node3} -p 19908 raft.cluster join ${node2}:19908
  58. redis-cli -h ${node4} -p 19908 raft.cluster join ${node2}:19908
  59. redis-cli -h ${node5} -p 19908 raft.cluster join ${node2}:19908
  60. redis-cli -h ${node1} -p 19909 raft.cluster join ${node3}:19909
  61. redis-cli -h ${node2} -p 19909 raft.cluster join ${node3}:19909
  62. redis-cli -h ${node4} -p 19909 raft.cluster join ${node3}:19909
  63. redis-cli -h ${node5} -p 19909 raft.cluster join ${node3}:19909
  64. redis-cli -h ${node1} -p 19910 raft.cluster join ${node3}:19910
  65. redis-cli -h ${node2} -p 19910 raft.cluster join ${node3}:19910
  66. redis-cli -h ${node4} -p 19910 raft.cluster join ${node3}:19910
  67. redis-cli -h ${node5} -p 19910 raft.cluster join ${node3}:19910
  68. redis-cli -h ${node1} -p 19911 raft.cluster join ${node3}:19911
  69. redis-cli -h ${node2} -p 19911 raft.cluster join ${node3}:19911
  70. redis-cli -h ${node4} -p 19911 raft.cluster join ${node3}:19911
  71. redis-cli -h ${node5} -p 19911 raft.cluster join ${node3}:19911
  72. redis-cli -h ${node1} -p 19912 raft.cluster join ${node3}:19912
  73. redis-cli -h ${node2} -p 19912 raft.cluster join ${node3}:19912
  74. redis-cli -h ${node4} -p 19912 raft.cluster join ${node3}:19912
  75. redis-cli -h ${node5} -p 19912 raft.cluster join ${node3}:19912