Skip to content

Commit 5c14c30

Browse files
committed
[es] Include docker stack deploy instructions
1 parent 788d06c commit 5c14c30

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

elasticsearch/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ and then check the cluster health, such as http://192.168.99.100:9200/_cluster/h
5454
"unassigned_shards" : 0
5555
}
5656

57+
If you have a Docker Swarm cluster already initialized you can download this
58+
[docker-compose.yml](https://raw.githubusercontent.com/itzg/dockerfiles/master/elasticsearch/docker-compose.yml)
59+
and deploy a cluster using:
60+
61+
docker stack deploy -c docker-compose.yml es
62+
63+
With a `docker service ls` you can confirm 1 master, 2 data, and 1 gateway nodes are running:
64+
65+
```
66+
ID NAME MODE REPLICAS IMAGE
67+
9nwnno8hbqgk es_kibana replicated 1/1 kibana:latest
68+
f5x7nipwmvkr es_gateway replicated 1/1 es
69+
om8rly2yxylw es_data replicated 2/2 es
70+
tdvfilj370yn es_master replicated 1/1 es
71+
```
72+
73+
As you can see, there is also a Kibana instance included and available at port 5601.
74+
5775
# Configuration Summary
5876

5977
## Ports

elasticsearch/docker-compose.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@ version: '3'
22

33
services:
44
master:
5-
image: es
5+
image: itzg/elasticsearch
66
environment:
77
TYPE: MASTER
88
UNICAST_HOSTS: master
9-
MIN_MASTERS: 2
9+
MIN_MASTERS: 1
1010
deploy:
11-
replicas: 3
11+
replicas: 1
1212
update_config:
1313
parallelism: 1
1414
data:
15-
image: es
15+
image: itzg/elasticsearch
1616
environment:
1717
TYPE: DATA
1818
UNICAST_HOSTS: master
1919
deploy:
2020
replicas: 2
2121
update_config:
2222
parallelism: 1
23+
delay: 60s
2324
gateway:
24-
image: es
25+
image: itzg/elasticsearch
2526
ports:
2627
- "9200:9200"
2728
- "9300:9300"

0 commit comments

Comments
 (0)