Adding Notes on Swarm Network Aliases (#8054)

master
Cary FitzHugh 5 years ago committed by Nitish Tiwari
parent 5a28ef0d47
commit a0715f3b59
  1. 6
      docs/orchestration/docker-swarm/README.md
  2. 27
      docs/orchestration/docker-swarm/docker-compose.yaml

@ -71,6 +71,12 @@ docker volume prune
```
This will remove all the volumes not associated with any container.
## 5. Accessing MinIO services
The services are exposed, by default, on the internal overlay network by their services names (minio1, minio2, ...).
The docker-compose.yml file also exposes the MinIO services behind a single alias on the minio_distributed network.
Services in the Swarm which are attached to that network can interact with the host "minio-cluster" instead of individual services' hostnames. This provides a simple way to loosely load balance across all the MinIO services in the Swarm as well as simplifies configuration and management.
### Notes

@ -1,4 +1,4 @@
version: '3'
version: '3.7'
services:
minio1:
@ -9,7 +9,11 @@ services:
ports:
- "9001:9000"
networks:
- minio_distributed
# 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
@ -31,7 +35,11 @@ services:
ports:
- "9002:9000"
networks:
- minio_distributed
# 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
@ -53,7 +61,11 @@ services:
ports:
- "9003:9000"
networks:
- minio_distributed
# 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
@ -75,7 +87,11 @@ services:
ports:
- "9004:9000"
networks:
- minio_distributed
# 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
@ -101,3 +117,4 @@ volumes:
networks:
minio_distributed:
driver: overlay
internal: {}

Loading…
Cancel
Save