Merge pull request #34562 from Crassirostris/es-kibana-update

Automatic merge from submit-queue

Elasticsearch and Kibana update

```release-note
Updated Elasticsearch image from version 1.5.1 to version 2.4.1. Updated Kibana image from version 4.0.2 to version 4.6.1.
```

Updated es and kibana images. Made image versions match es/kibana versions they contain.

ref #19149
This commit is contained in:
Kubernetes Submit Queue 2016-10-17 03:04:33 -07:00 committed by GitHub
commit fd1fd2a14c
8 changed files with 69 additions and 30 deletions

View File

@ -16,28 +16,37 @@
# to work with Kubernetes logging. Inspired by the Dockerfile # to work with Kubernetes logging. Inspired by the Dockerfile
# dockerfile/elasticsearch # dockerfile/elasticsearch
FROM java:openjdk-7-jre FROM java:openjdk-8-jre
MAINTAINER Satnam Singh "satnam@google.com"
MAINTAINER Mik Vyatskov "vmik@google.com"
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV ELASTICSEARCH_VERSION 2.4.1
RUN apt-get update && \ RUN apt-get update \
apt-get install -y curl && \ && apt-get install -y curl \
apt-get clean && apt-get clean
RUN cd / && \ RUN set -x \
curl -O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.tar.gz && \ && cd / \
tar xf elasticsearch-1.5.2.tar.gz && \ && mkdir /elasticsearch \
rm elasticsearch-1.5.2.tar.gz && curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz \
&& tar xf elasticsearch-$ELASTICSEARCH_VERSION.tar.gz -C /elasticsearch --strip-components=1 \
&& rm elasticsearch-$ELASTICSEARCH_VERSION.tar.gz
RUN mkdir -p /elasticsearch-1.5.2/config/templates RUN mkdir -p /elasticsearch/config/templates
COPY template-k8s-logstash.json /elasticsearch/config/templates/template-k8s-logstash.json
COPY config /elasticsearch/config
COPY elasticsearch.yml /elasticsearch-1.5.2/config/elasticsearch.yml
COPY template-k8s-logstash.json /elasticsearch-1.5.2/config/templates/template-k8s-logstash.json
COPY run.sh / COPY run.sh /
COPY elasticsearch_logging_discovery / COPY elasticsearch_logging_discovery /
RUN useradd --no-create-home --user-group elasticsearch \
&& mkdir /data \
&& chown -R elasticsearch:elasticsearch /elasticsearch /elasticsearch_logging_discovery /run.sh /data
VOLUME ["/data"] VOLUME ["/data"]
EXPOSE 9200 9300 EXPOSE 9200 9300
CMD ["/run.sh"] CMD ["/bin/su", "-c", "/run.sh", "elasticsearch"]

View File

@ -16,7 +16,7 @@
# The current value of the tag to be used for building and # The current value of the tag to be used for building and
# pushing an image to gcr.io # pushing an image to gcr.io
TAG = 1.9 TAG = v2.4.1
build: elasticsearch_logging_discovery build: elasticsearch_logging_discovery
docker build -t gcr.io/google_containers/elasticsearch:$(TAG) . docker build -t gcr.io/google_containers/elasticsearch:$(TAG) .
@ -25,7 +25,7 @@ push:
gcloud docker -- push gcr.io/google_containers/elasticsearch:$(TAG) gcloud docker -- push gcr.io/google_containers/elasticsearch:$(TAG)
elasticsearch_logging_discovery: elasticsearch_logging_discovery:
go build elasticsearch_logging_discovery.go go build -a -ldflags "-w" elasticsearch_logging_discovery.go
clean: clean:
rm elasticsearch_logging_discovery rm elasticsearch_logging_discovery

View File

@ -1,8 +1,14 @@
cluster.name: kubernetes-logging cluster.name: kubernetes-logging
node.master: ${NODE_MASTER} node.master: ${NODE_MASTER}
node.data: ${NODE_DATA} node.data: ${NODE_DATA}
transport.tcp.port: ${TRANSPORT_PORT} transport.tcp.port: ${TRANSPORT_PORT}
http.port: ${HTTP_PORT} http.port: ${HTTP_PORT}
discovery.zen.ping.multicast.enabled: false
discovery.zen.minimum_master_nodes: 2
path.data: /data path.data: /data
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: ${MINIMUM_MASTER_NODES}
discovery.zen.ping.multicast.enabled: false

View File

@ -0,0 +1,15 @@
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

View File

@ -16,7 +16,10 @@
export NODE_MASTER=${NODE_MASTER:-true} export NODE_MASTER=${NODE_MASTER:-true}
export NODE_DATA=${NODE_DATA:-true} export NODE_DATA=${NODE_DATA:-true}
/elasticsearch_logging_discovery >> /elasticsearch-1.5.2/config/elasticsearch.yml
export HTTP_PORT=${HTTP_PORT:-9200} export HTTP_PORT=${HTTP_PORT:-9200}
export TRANSPORT_PORT=${TRANSPORT_PORT:-9300} export TRANSPORT_PORT=${TRANSPORT_PORT:-9300}
/elasticsearch-1.5.2/bin/elasticsearch export MINIMUM_MASTER_NODES=${MINIMUM_MASTER_NODES:-2}
/elasticsearch_logging_discovery >> /elasticsearch/config/elasticsearch.yml
/elasticsearch/bin/elasticsearch

View File

@ -15,21 +15,26 @@
# A Dockerfile for creating a Kibana container that is designed # A Dockerfile for creating a Kibana container that is designed
# to work with Kubernetes logging. # to work with Kubernetes logging.
FROM java:openjdk-7-jre FROM gcr.io/google_containers/ubuntu-slim:0.4
MAINTAINER Satnam Singh "satnam@google.com"
MAINTAINER Mik Vyatskov "vmik@google.com"
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV KIBANA_VERSION 4.6.1
RUN apt-get update && \ RUN apt-get update \
apt-get install -y curl && \ && apt-get install -y curl \
apt-get clean && apt-get clean
RUN cd / && \ RUN set -x \
curl -O https://download.elastic.co/kibana/kibana/kibana-4.0.2-linux-x64.tar.gz && \ && cd / \
tar xf kibana-4.0.2-linux-x64.tar.gz && \ && mkdir /kibana \
rm kibana-4.0.2-linux-x64.tar.gz && curl -O https://download.elastic.co/kibana/kibana/kibana-$KIBANA_VERSION-linux-x86_64.tar.gz \
&& tar xf kibana-$KIBANA_VERSION-linux-x86_64.tar.gz -C /kibana --strip-components=1 \
&& rm kibana-$KIBANA_VERSION-linux-x86_64.tar.gz
COPY run.sh /run.sh COPY run.sh /run.sh
EXPOSE 5601 EXPOSE 5601
CMD ["/run.sh"] CMD ["/run.sh"]

View File

@ -14,7 +14,7 @@
.PHONY: build push .PHONY: build push
TAG = 1.3 TAG = v4.6.1
build: build:
docker build -t gcr.io/google_containers/kibana:$(TAG) . docker build -t gcr.io/google_containers/kibana:$(TAG) .

View File

@ -16,4 +16,5 @@
export ELASTICSEARCH_URL=${ELASTICSEARCH_URL:-"http://localhost:9200"} export ELASTICSEARCH_URL=${ELASTICSEARCH_URL:-"http://localhost:9200"}
echo ELASTICSEARCH_URL=${ELASTICSEARCH_URL} echo ELASTICSEARCH_URL=${ELASTICSEARCH_URL}
/kibana-4.0.2-linux-x64/bin/kibana -e ${ELASTICSEARCH_URL}
/kibana/bin/kibana -e ${ELASTICSEARCH_URL}