Guest User

Untitled

a guest
Oct 23rd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. version: '2'
  2. services:
  3.  
  4. consul_server_1:
  5. image: consul
  6. ports:
  7. - '8510:8500'
  8. - '8610:8600'
  9. volumes:
  10. - /etc/timezone:/etc/timezone
  11. - /etc/localtime:/etc/localtime
  12. - ./etc/consul.d:/etc/consul.d
  13. command: [
  14. 'consul',
  15. 'agent',
  16. '-server',
  17. '-node=kallen-1',
  18. '-client=0.0.0.0',
  19. '-bind={{ GetInterfaceIP "eth0" }}',
  20. '-bootstrap-expect=3',
  21. '-data-dir=/tmp/consul/data',
  22. '-enable-script-checks=true',
  23. '-config-dir=/etc/consul.d',
  24. '-retry-join=consul_server_1:8301',
  25. '-ui'
  26. ]
  27. hostname: 'consul_server_1'
  28. #links:
  29. #- consul_server2
  30.  
  31. consul_server_2:
  32. image: consul
  33. ports:
  34. - '8520:8500'
  35. - '8620:8600'
  36. volumes:
  37. - /etc/timezone:/etc/timezone
  38. - /etc/localtime:/etc/localtime
  39. - ./etc/consul.d:/etc/consul.d
  40. command: [
  41. 'consul',
  42. 'agent',
  43. '-server',
  44. '-node=kallen-2',
  45. '-client=0.0.0.0',
  46. '-bind={{ GetInterfaceIP "eth0" }}',
  47. '-bootstrap-expect=3',
  48. '-data-dir=/tmp/consul/data',
  49. '-enable-script-checks=true',
  50. '-config-dir=/etc/consul.d',
  51. '-retry-join=consul_server_1:8301',
  52. #'-ui'
  53. ]
  54. hostname: 'consul_server_2'
  55. links:
  56. - consul_server_1
  57.  
  58. consul_server_3:
  59. image: consul
  60. ports:
  61. - '8530:8500'
  62. - '8630:8600'
  63. volumes:
  64. - /etc/timezone:/etc/timezone
  65. - /etc/localtime:/etc/localtime
  66. - ./etc/consul.d:/etc/consul.d
  67. command: [
  68. 'consul',
  69. 'agent',
  70. '-server',
  71. '-node=kallen-3',
  72. '-client=0.0.0.0',
  73. '-bind={{ GetInterfaceIP "eth0" }}',
  74. '-bootstrap-expect=3',
  75. '-data-dir=/tmp/consul/data',
  76. '-enable-script-checks=true',
  77. '-config-dir=/etc/consul.d',
  78. '-retry-join=consul_server_1:8301',
  79. #'-ui'
  80. ]
  81. hostname: 'consul_server_3'
  82. links:
  83. - consul_server_1
  84.  
  85. consul_agent_1:
  86. image: consul
  87. ports:
  88. - '8540:8500'
  89. - '8640:8600'
  90. volumes:
  91. - /etc/timezone:/etc/timezone
  92. - /etc/localtime:/etc/localtime
  93. - ./etc/consul.d:/etc/consul.d
  94. command: [
  95. 'consul',
  96. 'agent',
  97. '-node=kallen-4',
  98. '-client=0.0.0.0',
  99. '-bind={{ GetInterfaceIP "eth0" }}',
  100. '-data-dir=/tmp/consul/data',
  101. '-enable-script-checks=true',
  102. '-config-dir=/etc/consul.d',
  103. '-retry-join=consul_server_1:8301',
  104. '-ui'
  105. ]
  106. hostname: 'consul_agent_1'
  107. links:
  108. - consul_server_1
  109.  
  110. consul_agent_2:
  111. image: consul
  112. ports:
  113. - '8550:8500'
  114. - '8650:8600'
  115. volumes:
  116. - /etc/timezone:/etc/timezone
  117. - /etc/localtime:/etc/localtime
  118. - ./etc/consul.d:/etc/consul.d
  119. command: [
  120. 'consul',
  121. 'agent',
  122. '-node=kallen-5',
  123. '-client=0.0.0.0',
  124. '-bind={{ GetInterfaceIP "eth0" }}',
  125. '-data-dir=/tmp/consul/data',
  126. '-enable-script-checks=true',
  127. '-config-dir=/etc/consul.d',
  128. '-retry-join=consul_server_1:8301',
  129. '-ui'
  130. ]
  131. hostname: 'consul_agent_2'
  132. links:
  133. - consul_server_1
  134.  
  135. consul_agent_3:
  136. image: consul
  137. ports:
  138. - '8560:8500'
  139. - '8660:8600'
  140. volumes:
  141. - /etc/timezone:/etc/timezone
  142. - /etc/localtime:/etc/localtime
  143. - ./etc/consul.d:/etc/consul.d
  144. command: [
  145. 'consul',
  146. 'agent',
  147. '-node=kallen-6',
  148. '-client=0.0.0.0',
  149. '-bind={{ GetInterfaceIP "eth0" }}',
  150. '-data-dir=/tmp/consul/data',
  151. '-enable-script-checks=true',
  152. '-config-dir=/etc/consul.d',
  153. '-retry-join=consul_server_1:8301',
  154. '-ui'
  155. ]
  156. hostname: 'consul_agent_3'
  157. links:
  158. - consul_server_1
Add Comment
Please, Sign In to add comment