Skip to content

Commit 1a88c96

Browse files
committed
Merged branch master into master
2 parents 262816b + b8d6927 commit 1a88c96

File tree

6 files changed

+33
-17
lines changed

6 files changed

+33
-17
lines changed

elasticsearch/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MAINTAINER itzg
44

55
RUN apk -U add bash
66

7-
ENV ES_VERSION=5.1.1
7+
ENV ES_VERSION=5.1.2
88

99
ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz
1010
RUN cd /usr/share && \
@@ -15,8 +15,6 @@ EXPOSE 9200 9300
1515

1616
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
1717
DEFAULT_ES_USER=elasticsearch \
18-
DISCOVER_TRANSPORT_IP=eth0 \
19-
DISCOVER_HTTP_IP=eth0 \
2018
ES_JAVA_OPTS="-Xms1g -Xmx1g"
2119

2220
RUN adduser -S -s /bin/sh $DEFAULT_ES_USER

elasticsearch/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,16 @@ Using the Docker Compose file above, a value of `2` is appropriate when scaling
187187

188188
docker-compose scale master=3
189189

190-
## Auto transport/http discovery with Swarm Mode
190+
## Multiple Network Binding, such as Swarm Mode
191191

192-
When using Docker Swarm mode (starting with 1.12), the overlay and ingress network interfaces are assigned
193-
multiple IP addresses. As a result, it creates confusion for the transport publish logic even when using
194-
the special value `_eth0_`.
192+
When using Docker Swarm mode the container is presented with multiple ethernet
193+
devices. By default, all global, routable IP addresses are configured for
194+
Elasticsearch to use as `network.host`.
195195

196-
To resolve this, add
196+
That discovery can be overridden by providing a specific ethernet device name
197+
to `DISCOVER_TRANSPORT_IP` and/or `DISCOVER_HTTP_IP`, such as
197198

198199
-e DISCOVER_TRANSPORT_IP=eth0
199-
200-
replacing `eth0` with another interface within the container, if needed.
201-
202-
The same can be done for publish/binding of the http module by adding:
203-
204200
-e DISCOVER_HTTP_IP=eth2
205201

206202
## Heap size and other JVM options

elasticsearch/start

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ discoverIpFromLink() {
1919
OPTS="$OPTS -E $mode.host=$ip"
2020
}
2121

22+
discoverAllGlobalIps() {
23+
ips=`ipaddr show scope global|awk '$1 == "inet" { if (!match($2,"/32")) { gsub("/.*","",$2) ; addrs[length(addrs)] = $2 } } END { for (i in addrs) { if (i>0) printf "," ; printf addrs[i] } }'`
24+
OPTS="$OPTS -E network.host=$ips"
25+
}
26+
2227
setup_clustering() {
2328

2429
if [ -n "$CLUSTER" ]; then
@@ -112,8 +117,13 @@ OPTS="$OPTS \
112117
-E transport.tcp.port=9300 \
113118
-E http.port=9200"
114119

115-
discoverIpFromLink $DISCOVER_TRANSPORT_IP transport
116-
discoverIpFromLink $DISCOVER_HTTP_IP http
120+
discoverAllGlobalIps
121+
if [ "${DISCOVER_TRANSPORT_IP}" != "" ]; then
122+
discoverIpFromLink $DISCOVER_TRANSPORT_IP transport
123+
fi
124+
if [ "${DISCOVER_HTTP_IP}" != "" ]; then
125+
discoverIpFromLink $DISCOVER_HTTP_IP http
126+
fi
117127

118128
setup_personality
119129
setup_clustering

kibana/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM openjdk:8u111-jre
22

33
MAINTAINER itzg
44

5-
ENV KIBANA_VERSION 5.1.1
5+
ENV KIBANA_VERSION 5.1.2
66

77
ADD https://artifacts.elastic.co/downloads/kibana/kibana-${KIBANA_VERSION}-linux-x86_64.tar.gz /tmp/kibana.tgz
88

kibana/docker-compose-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '2'
2+
3+
services:
4+
es:
5+
build: ../elasticsearch
6+
ports:
7+
- "9200:9200"
8+
9+
kibana:
10+
build: .
11+
ports:
12+
- "5601:5601"

minecraft-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM java:8
1+
FROM openjdk:8-jre
22

33
MAINTAINER itzg
44

0 commit comments

Comments
 (0)