Docs fix for restart issue with orchestrated minio stack (#6606) (#6613)

master
Mariska Hoogenboom 6 years ago committed by Nitish Tiwari
parent 83d8e01c81
commit fae284d6b9
  1. 13
      docs/orchestration/docker-swarm/README.md
  2. 16
      docs/orchestration/docker-swarm/docker-compose-secrets.yaml
  3. 16
      docs/orchestration/docker-swarm/docker-compose.yaml

@ -34,6 +34,19 @@ echo "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" | docker secret create secret_ke
## 4. Deploy distributed Minio services
The example Minio stack uses 4 Docker volumes, which are created automatically by deploying the stack. We have to make sure that the services in the stack are always (re)started on the same node, where the service is deployed the first time.
Otherwise Docker will create a new volume upon restart of the service on another Docker node, which is not in sync with the other volumes and the stack will fail to start healthy.
Before deploying the stack, add labels to the Docker nodes where you want the minio services to run:
```
docker node update --label-add minio1=true <DOCKER-NODE1>
docker node update --label-add minio2=true <DOCKER-NODE2>
docker node update --label-add minio3=true <DOCKER-NODE3>
docker node update --label-add minio4=true <DOCKER-NODE4>
```
It is possible to run more than one minio service on one Docker Node. Set the labels accordingly.
Download the [Docker Compose file](https://github.com/minio/minio/blob/master/docs/orchestration/docker-swarm/docker-compose-secrets.yaml?raw=true) on your Swarm master. Then execute the command
```shell

@ -3,6 +3,7 @@ version: '3.1'
services:
minio1:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio1
volumes:
- minio1-data:/export
ports:
@ -14,6 +15,9 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio1==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
secrets:
- secret_key
@ -21,6 +25,7 @@ services:
minio2:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio2
volumes:
- minio2-data:/export
ports:
@ -32,6 +37,9 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio2==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
secrets:
- secret_key
@ -39,6 +47,7 @@ services:
minio3:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio3
volumes:
- minio3-data:/export
ports:
@ -50,6 +59,9 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio3==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
secrets:
- secret_key
@ -57,6 +69,7 @@ services:
minio4:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio4
volumes:
- minio4-data:/export
ports:
@ -68,6 +81,9 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio4==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
secrets:
- secret_key

@ -3,6 +3,7 @@ version: '3'
services:
minio1:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio1
volumes:
- minio1-data:/export
ports:
@ -17,10 +18,14 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio1==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
minio2:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio2
volumes:
- minio2-data:/export
ports:
@ -35,10 +40,14 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio2==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
minio3:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio3
volumes:
- minio3-data:/export
ports:
@ -53,10 +62,14 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio3==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
minio4:
image: minio/minio:RELEASE.2018-10-06T00-15-16Z
hostname: minio4
volumes:
- minio4-data:/export
ports:
@ -71,6 +84,9 @@ services:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio4==true
command: server http://minio1/export http://minio2/export http://minio3/export http://minio4/export
volumes:

Loading…
Cancel
Save