docker-compose.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. services:
  2. # SeaweedFS Master Server
  3. seaweedfs-master:
  4. image: chrislusf/seaweedfs:latest
  5. container_name: seaweedfs-master
  6. command: master -ip=seaweedfs-master -port=9333 -mdir=/data
  7. ports:
  8. - "9333:9333"
  9. volumes:
  10. - master-data:/data
  11. networks:
  12. - seaweedfs-rdma
  13. healthcheck:
  14. test: ["CMD", "curl", "-f", "http://localhost:9333/cluster/status"]
  15. interval: 10s
  16. timeout: 5s
  17. retries: 3
  18. start_period: 10s
  19. # SeaweedFS Volume Server
  20. seaweedfs-volume:
  21. image: chrislusf/seaweedfs:latest
  22. container_name: seaweedfs-volume
  23. command: volume -mserver=seaweedfs-master:9333 -ip=seaweedfs-volume -port=8080 -dir=/data
  24. ports:
  25. - "8080:8080"
  26. volumes:
  27. - volume-data:/data
  28. depends_on:
  29. seaweedfs-master:
  30. condition: service_healthy
  31. networks:
  32. - seaweedfs-rdma
  33. healthcheck:
  34. test: ["CMD", "curl", "-f", "http://localhost:8080/status"]
  35. interval: 10s
  36. timeout: 5s
  37. retries: 3
  38. start_period: 15s
  39. # Rust RDMA Engine
  40. rdma-engine:
  41. build:
  42. context: .
  43. dockerfile: Dockerfile.rdma-engine.simple
  44. container_name: rdma-engine
  45. environment:
  46. - RUST_LOG=debug
  47. - RDMA_SOCKET_PATH=/tmp/rdma-engine.sock
  48. volumes:
  49. - rdma-socket:/tmp
  50. # Note: hugepages mount commented out to avoid host system requirements
  51. # - /dev/hugepages:/dev/hugepages
  52. # Privileged mode for RDMA access (in production, use specific capabilities)
  53. privileged: true
  54. networks:
  55. - seaweedfs-rdma
  56. command: ["./rdma-engine-server", "--debug", "--ipc-socket", "/tmp/rdma-engine.sock"]
  57. healthcheck:
  58. test: ["CMD", "test", "-S", "/tmp/rdma-engine.sock"]
  59. interval: 5s
  60. timeout: 3s
  61. retries: 5
  62. start_period: 10s
  63. # Go RDMA Sidecar / Demo Server
  64. rdma-sidecar:
  65. build:
  66. context: .
  67. dockerfile: Dockerfile.sidecar
  68. container_name: rdma-sidecar
  69. ports:
  70. - "8081:8081"
  71. environment:
  72. - RDMA_SOCKET_PATH=/tmp/rdma-engine.sock
  73. - VOLUME_SERVER_URL=http://seaweedfs-volume:8080
  74. - DEBUG=true
  75. volumes:
  76. - rdma-socket:/tmp
  77. depends_on:
  78. rdma-engine:
  79. condition: service_healthy
  80. seaweedfs-volume:
  81. condition: service_healthy
  82. networks:
  83. - seaweedfs-rdma
  84. command: [
  85. "./demo-server",
  86. "--port", "8081",
  87. "--rdma-socket", "/tmp/rdma-engine.sock",
  88. "--volume-server", "http://seaweedfs-volume:8080",
  89. "--enable-rdma",
  90. "--debug"
  91. ]
  92. healthcheck:
  93. test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
  94. interval: 10s
  95. timeout: 5s
  96. retries: 3
  97. start_period: 15s
  98. # Test Client for Integration Testing
  99. test-client:
  100. build:
  101. context: .
  102. dockerfile: Dockerfile.test-client
  103. container_name: test-client
  104. environment:
  105. - RDMA_SOCKET_PATH=/tmp/rdma-engine.sock
  106. - SIDECAR_URL=http://rdma-sidecar:8081
  107. - SEAWEEDFS_MASTER=http://seaweedfs-master:9333
  108. - SEAWEEDFS_VOLUME=http://seaweedfs-volume:8080
  109. volumes:
  110. - rdma-socket:/tmp
  111. depends_on:
  112. rdma-sidecar:
  113. condition: service_healthy
  114. networks:
  115. - seaweedfs-rdma
  116. profiles:
  117. - testing
  118. command: ["tail", "-f", "/dev/null"] # Keep container running for manual testing
  119. # Integration Test Runner
  120. integration-tests:
  121. build:
  122. context: .
  123. dockerfile: Dockerfile.test-client
  124. container_name: integration-tests
  125. environment:
  126. - RDMA_SOCKET_PATH=/tmp/rdma-engine.sock
  127. - SIDECAR_URL=http://rdma-sidecar:8081
  128. - SEAWEEDFS_MASTER=http://seaweedfs-master:9333
  129. - SEAWEEDFS_VOLUME=http://seaweedfs-volume:8080
  130. volumes:
  131. - rdma-socket:/tmp
  132. - ./tests:/tests
  133. depends_on:
  134. rdma-sidecar:
  135. condition: service_healthy
  136. networks:
  137. - seaweedfs-rdma
  138. profiles:
  139. - testing
  140. command: ["/tests/run-integration-tests.sh"]
  141. volumes:
  142. master-data:
  143. driver: local
  144. volume-data:
  145. driver: local
  146. rdma-socket:
  147. driver: local
  148. networks:
  149. seaweedfs-rdma:
  150. driver: bridge