Last active
June 27, 2021 16:55
-
-
Save pascalandy/1771c666aab221a9be5ea4bb6dbce70b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.min.io/docs/minio-gateway-for-nas.html | |
# https://gist.github.com/pascalandy/1771c666aab221a9be5ea4bb6dbce70b | |
version: '3.7' | |
networks: | |
ntw_minio: | |
external: true | |
secrets: | |
secret_key: | |
external: true | |
access_key: | |
external: true | |
services: | |
minio1: | |
image: minio/minio:RELEASE.2020-01-25T02-50-51Z | |
hostname: minio1 | |
volumes: | |
- /mnt/clusterdata/minio/container/vol:/container/vol | |
ports: | |
- "9001:9000" | |
networks: | |
- ntw_minio | |
deploy: | |
restart_policy: | |
delay: 10s | |
max_attempts: 10 | |
window: 60s | |
placement: | |
constraints: | |
- node.labels.minio1==true | |
command: gateway nas /container/vol | |
secrets: | |
- secret_key | |
- access_key | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 | |
minio2: | |
image: minio/minio:RELEASE.2020-01-25T02-50-51Z | |
hostname: minio2 | |
volumes: | |
- /mnt/clusterdata/minio/container/vol:/container/vol | |
ports: | |
- "9002:9000" | |
networks: | |
- ntw_minio | |
deploy: | |
restart_policy: | |
delay: 10s | |
max_attempts: 10 | |
window: 60s | |
placement: | |
constraints: | |
- node.labels.minio2==true | |
command: gateway nas /container/vol | |
secrets: | |
- secret_key | |
- access_key | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 | |
minio3: | |
image: minio/minio:RELEASE.2020-01-25T02-50-51Z | |
hostname: minio3 | |
volumes: | |
- /mnt/clusterdata/minio/container/vol:/container/vol | |
ports: | |
- "9003:9000" | |
networks: | |
- ntw_minio | |
deploy: | |
restart_policy: | |
delay: 10s | |
max_attempts: 10 | |
window: 60s | |
placement: | |
constraints: | |
- node.labels.minio3==true | |
command: gateway nas /container/vol | |
secrets: | |
- secret_key | |
- access_key | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/pascalandy/1771c666aab221a9be5ea4bb6dbce70b | |
version: '3.7' | |
networks: | |
ntw_minio: | |
external: true | |
secrets: | |
secret_key: | |
external: true | |
access_key: | |
external: true | |
services: | |
minio1: | |
image: minio/minio:RELEASE.2020-01-25T02-50-51Z | |
hostname: minio1 | |
volumes: | |
- /mnt/clusterdata/minio/export1:/export1 | |
- /mnt/clusterdata/minio/export2:/export2 | |
ports: | |
- "9001:9000" | |
networks: | |
- ntw_minio | |
deploy: | |
restart_policy: | |
delay: 10s | |
max_attempts: 10 | |
window: 60s | |
placement: | |
constraints: | |
- node.labels.minio1==true | |
command: server http://minio{1...3}/export{1...2} | |
secrets: | |
- secret_key | |
- access_key | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 | |
minio2: | |
image: minio/minio:RELEASE.2020-01-25T02-50-51Z | |
hostname: minio2 | |
volumes: | |
- /mnt/clusterdata/minio/export1:/export1 | |
- /mnt/clusterdata/minio/export2:/export2 | |
ports: | |
- "9002:9000" | |
networks: | |
- ntw_minio | |
deploy: | |
restart_policy: | |
delay: 10s | |
max_attempts: 10 | |
window: 60s | |
placement: | |
constraints: | |
- node.labels.minio2==true | |
command: server http://minio{1...3}/export{1...2} | |
secrets: | |
- secret_key | |
- access_key | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 | |
minio3: | |
image: minio/minio:RELEASE.2020-01-25T02-50-51Z | |
hostname: minio3 | |
volumes: | |
- /mnt/clusterdata/minio/export1:/export1 | |
- /mnt/clusterdata/minio/export2:/export2 | |
ports: | |
- "9003:9000" | |
networks: | |
- ntw_minio | |
deploy: | |
restart_policy: | |
delay: 10s | |
max_attempts: 10 | |
window: 60s | |
placement: | |
constraints: | |
- node.labels.minio3==true | |
command: server http://minio{1...3}/export{1...2} | |
secrets: | |
- secret_key | |
- access_key | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
Minio (the solution) must sync data of a directory
/mnt/clusterdata/minio/container/vol
of my 3 nodes.Requirements / use case
/mnt/clusterdata/minio/container/vol
/mnt/clusterdata/minio/container/vol
/mnt/clusterdata/minio/container/vol/app1/bin
/mnt/clusterdata/minio/container/vol/app2/bin
/mnt/clusterdata/minio/container/vol/appN/bin
Gist
https://gist.github.com/pascalandy/1771c666aab221a9be5ea4bb6dbce70b
Cluster context
Minio must have a minimum of 4 drives. In our case, we run 6 drives on 3 nodes.
1) on
all
nodes:2) on node:
manager1
3) validate that files are synching
WIP: 2020-01-30_12h20
on node1:
on node2
on node3:
Official docs