With this PR, liveness check responds with 200 OK with "server-not- initialized" header while objectLayer gets initialized. The header is removed as objectLayer is initialized. This is to allow MinIO distributed cluster to get started when running on an orchestration platforms like Docker Swarm. This PR also updates sample Swarm yaml files to use correct values for healthcheck fields. Fixes #8140
140 lines
3.4 KiB
YAML
140 lines
3.4 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
minio1:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
hostname: minio1
|
|
volumes:
|
|
- minio1-data:/export
|
|
ports:
|
|
- "9001:9000"
|
|
networks:
|
|
# On the internal you are exposed as minio1/2/3/4 by default
|
|
internal: {}
|
|
minio_distributed:
|
|
aliases:
|
|
- minio-cluster
|
|
environment:
|
|
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
|
|
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
deploy:
|
|
restart_policy:
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 60s
|
|
placement:
|
|
constraints:
|
|
- node.labels.minio1==true
|
|
command: server http://minio{1...4}/export
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
minio2:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
hostname: minio2
|
|
volumes:
|
|
- minio2-data:/export
|
|
ports:
|
|
- "9002:9000"
|
|
networks:
|
|
# On the internal you are exposed as minio1/2/3/4 by default
|
|
internal: {}
|
|
minio_distributed:
|
|
aliases:
|
|
- minio-cluster
|
|
environment:
|
|
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
|
|
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
deploy:
|
|
restart_policy:
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 60s
|
|
placement:
|
|
constraints:
|
|
- node.labels.minio2==true
|
|
command: server http://minio{1...4}/export
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
minio3:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
hostname: minio3
|
|
volumes:
|
|
- minio3-data:/export
|
|
ports:
|
|
- "9003:9000"
|
|
networks:
|
|
# On the internal you are exposed as minio1/2/3/4 by default
|
|
internal: {}
|
|
minio_distributed:
|
|
aliases:
|
|
- minio-cluster
|
|
environment:
|
|
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
|
|
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
deploy:
|
|
restart_policy:
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 60s
|
|
placement:
|
|
constraints:
|
|
- node.labels.minio3==true
|
|
command: server http://minio{1...4}/export
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 1m30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
minio4:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
hostname: minio4
|
|
volumes:
|
|
- minio4-data:/export
|
|
ports:
|
|
- "9004:9000"
|
|
networks:
|
|
# On the internal you are exposed as minio1/2/3/4 by default
|
|
internal: {}
|
|
minio_distributed:
|
|
aliases:
|
|
- minio-cluster
|
|
environment:
|
|
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
|
|
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
deploy:
|
|
restart_policy:
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 60s
|
|
placement:
|
|
constraints:
|
|
- node.labels.minio4==true
|
|
command: server http://minio{1...4}/export
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
volumes:
|
|
minio1-data:
|
|
|
|
minio2-data:
|
|
|
|
minio3-data:
|
|
|
|
minio4-data:
|
|
|
|
networks:
|
|
minio_distributed:
|
|
driver: overlay
|
|
internal: {}
|