[es] Include docker stack deploy instructions

This commit is contained in:
Geoff Bourne 2017-02-02 20:48:17 -06:00
parent 788d06c086
commit 5c14c30a78
2 changed files with 24 additions and 5 deletions

View File

@ -54,6 +54,24 @@ and then check the cluster health, such as http://192.168.99.100:9200/_cluster/h
"unassigned_shards" : 0
}
If you have a Docker Swarm cluster already initialized you can download this
[docker-compose.yml](https://raw.githubusercontent.com/itzg/dockerfiles/master/elasticsearch/docker-compose.yml)
and deploy a cluster using:
docker stack deploy -c docker-compose.yml es
With a `docker service ls` you can confirm 1 master, 2 data, and 1 gateway nodes are running:
```
ID NAME MODE REPLICAS IMAGE
9nwnno8hbqgk es_kibana replicated 1/1 kibana:latest
f5x7nipwmvkr es_gateway replicated 1/1 es
om8rly2yxylw es_data replicated 2/2 es
tdvfilj370yn es_master replicated 1/1 es
```
As you can see, there is also a Kibana instance included and available at port 5601.
# Configuration Summary
## Ports

View File

@ -2,17 +2,17 @@ version: '3'
services:
master:
image: es
image: itzg/elasticsearch
environment:
TYPE: MASTER
UNICAST_HOSTS: master
MIN_MASTERS: 2
MIN_MASTERS: 1
deploy:
replicas: 3
replicas: 1
update_config:
parallelism: 1
data:
image: es
image: itzg/elasticsearch
environment:
TYPE: DATA
UNICAST_HOSTS: master
@ -20,8 +20,9 @@ services:
replicas: 2
update_config:
parallelism: 1
delay: 60s
gateway:
image: es
image: itzg/elasticsearch
ports:
- "9200:9200"
- "9300:9300"