Skip to content

Commit

Permalink
Contexts for 7.2.0 (#15)
Browse files Browse the repository at this point in the history
This commit was created by the elastic-dockerfiles-publisher.
  • Loading branch information
elasticmachine authored and mgreau committed Jun 25, 2019
1 parent 233d532 commit b0c83e7
Show file tree
Hide file tree
Showing 11 changed files with 120 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ visiting [Elastic Community](https://www.elastic.co/community).


This software is governed by the [Elastic
License](https://github.com/elastic/elasticsearch/blob/7.1/licenses/ELASTIC-LICENSE.txt),
License](https://github.com/elastic/elasticsearch/blob/7.2/licenses/ELASTIC-LICENSE.txt),
and includes the full set of [free
features](https://www.elastic.co/subscriptions).

View the detailed release notes
[here](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/es-release-notes.html).
[here](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/es-release-notes.html).
10 changes: 4 additions & 6 deletions elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ FROM centos:7 AS builder

ENV PATH /usr/share/elasticsearch/bin:$PATH

RUN yum install -y unzip which

RUN groupadd -g 1000 elasticsearch && \
adduser -u 1000 -g 1000 -d /usr/share/elasticsearch elasticsearch

WORKDIR /usr/share/elasticsearch

RUN cd /opt && curl --retry 8 -s -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.1-linux-x86_64.tar.gz && cd -
COPY elasticsearch-7.2.0-linux-x86_64.tar.gz /opt/

RUN tar zxf /opt/elasticsearch-7.1.1-linux-x86_64.tar.gz --strip-components=1
RUN tar zxf /opt/elasticsearch-7.2.0-linux-x86_64.tar.gz --strip-components=1
RUN grep ES_DISTRIBUTION_TYPE=tar /usr/share/elasticsearch/bin/elasticsearch-env \
&& sed -ie 's/ES_DISTRIBUTION_TYPE=tar/ES_DISTRIBUTION_TYPE=docker/' /usr/share/elasticsearch/bin/elasticsearch-env
RUN mkdir -p config data logs
Expand All @@ -42,7 +40,7 @@ FROM centos:7
ENV ELASTIC_CONTAINER true

RUN for iter in {1..10}; do yum update -y && \
yum install -y nc unzip wget which && \
yum install -y nc && \
yum clean all && exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; done; \
(exit $exit_code)

Expand Down Expand Up @@ -74,7 +72,7 @@ EXPOSE 9200 9300
LABEL org.label-schema.schema-version="1.0" \
org.label-schema.vendor="Elastic" \
org.label-schema.name="elasticsearch" \
org.label-schema.version="7.1.1" \
org.label-schema.version="7.2.0" \
org.label-schema.url="https://www.elastic.co/products/elasticsearch" \
org.label-schema.vcs-url="https://github.com/elastic/elasticsearch" \
license="Elastic License"
Expand Down
6 changes: 3 additions & 3 deletions kibana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# Extract Kibana and make various file manipulations.
################################################################################
FROM centos:7 AS prep_files
RUN cd /opt && curl --retry 8 -s -L -O https://artifacts.elastic.co/downloads/kibana/kibana-7.1.1-linux-x86_64.tar.gz && cd -
RUN cd /opt && curl --retry 8 -s -L -O https://artifacts.elastic.co/downloads/kibana/kibana-7.2.0-linux-x86_64.tar.gz && cd -
RUN mkdir /usr/share/kibana
WORKDIR /usr/share/kibana
RUN tar --strip-components=1 -zxf /opt/kibana-7.1.1-linux-x86_64.tar.gz
RUN tar --strip-components=1 -zxf /opt/kibana-7.2.0-linux-x86_64.tar.gz
# Ensure that group permissions are the same as user permissions.
# This will help when relying on GID-0 to run Kibana, rather than UID-1000.
# OpenShift does this, for example.
Expand Down Expand Up @@ -50,6 +50,6 @@ RUN chmod g+ws /usr/share/kibana && find /usr/share/kibana -gid 0 -and -not -per
RUN groupadd --gid 1000 kibana && useradd --uid 1000 --gid 1000 --home-dir /usr/share/kibana --no-create-home kibana
USER kibana

LABEL org.label-schema.schema-version="1.0" org.label-schema.vendor="Elastic" org.label-schema.name="kibana" org.label-schema.version="7.1.1" org.label-schema.url="https://www.elastic.co/products/kibana" org.label-schema.vcs-url="https://github.com/elastic/kibana" license="Elastic License"
LABEL org.label-schema.schema-version="1.0" org.label-schema.vendor="Elastic" org.label-schema.name="kibana" org.label-schema.version="7.2.0" org.label-schema.url="https://www.elastic.co/products/kibana" org.label-schema.vcs-url="https://github.com/elastic/kibana" license="Elastic License"

CMD ["/usr/local/bin/kibana-docker"]
59 changes: 59 additions & 0 deletions logstash/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This Dockerfile was generated from templates/Dockerfile.j2
FROM centos:7

# Install Java and the "which" command, which is needed by Logstash's shell
# scripts.
RUN yum update -y && yum install -y java-11-openjdk-devel which && \
yum clean all

# Provide a non-root user to run the process.
RUN groupadd --gid 1000 logstash && \
adduser --uid 1000 --gid 1000 \
--home-dir /usr/share/logstash --no-create-home \
logstash

# Add Logstash itself.
RUN curl -Lo - https://artifacts.elastic.co/downloads/logstash/logstash-7.2.0.tar.gz | \
tar zxf - -C /usr/share && \
mv /usr/share/logstash-7.2.0 /usr/share/logstash && \
chown --recursive logstash:logstash /usr/share/logstash/ && \
chown -R logstash:root /usr/share/logstash && \
chmod -R g=u /usr/share/logstash && \
find /usr/share/logstash -type d -exec chmod g+s {} \; && \
ln -s /usr/share/logstash /opt/logstash

WORKDIR /usr/share/logstash

ENV ELASTIC_CONTAINER true
ENV PATH=/usr/share/logstash/bin:$PATH

# Provide a minimal configuration, so that simple invocations will provide
# a good experience.
ADD config/pipelines.yml config/pipelines.yml
ADD config/logstash-full.yml config/logstash.yml
ADD config/log4j2.properties config/
ADD pipeline/default.conf pipeline/logstash.conf
RUN chown --recursive logstash:root config/ pipeline/

# Ensure Logstash gets a UTF-8 locale by default.
ENV LANG='en_US.UTF-8' LC_ALL='en_US.UTF-8'

# Place the startup wrapper script.
ADD bin/docker-entrypoint /usr/local/bin/
RUN chmod 0755 /usr/local/bin/docker-entrypoint

USER 1000

ADD env2yaml/env2yaml /usr/local/bin/

EXPOSE 9600 5044


LABEL org.label-schema.schema-version="1.0" \
org.label-schema.vendor="Elastic" \
org.label-schema.name="logstash" \
org.label-schema.version="7.2.0" \
org.label-schema.url="https://www.elastic.co/products/logstash" \
org.label-schema.vcs-url="https://github.com/elastic/logstash" \
license="Elastic License"
ENTRYPOINT ["/usr/local/bin/docker-entrypoint"]
15 changes: 15 additions & 0 deletions logstash/bin/docker-entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e

# Map environment variables to entries in logstash.yml.
# Note that this will mutate logstash.yml in place if any such settings are found.
# This may be undesirable, especially if logstash.yml is bind-mounted from the
# host system.
env2yaml /usr/share/logstash/config/logstash.yml

export LS_JAVA_OPTS="-Dls.cgroup.cpuacct.path.override=/ -Dls.cgroup.cpu.path.override=/ $LS_JAVA_OPTS"

if [[ -z $1 ]] || [[ ${1:0:1} == '-' ]] ; then
exec logstash "$@"
else
exec "$@"
fi
16 changes: 16 additions & 0 deletions logstash/config/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
status = error
name = LogstashPropertiesConfig

appender.console.type = Console
appender.console.name = plain_console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n

appender.json_console.type = Console
appender.json_console.name = json_console
appender.json_console.layout.type = JSONLayout
appender.json_console.layout.compact = true
appender.json_console.layout.eventEol = true

rootLogger.level = ${sys:ls.log.level}
rootLogger.appenderRef.console.ref = ${sys:ls.log.format}_console
2 changes: 2 additions & 0 deletions logstash/config/logstash-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
http.host: "0.0.0.0"
xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch:9200" ]
1 change: 1 addition & 0 deletions logstash/config/logstash-oss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http.host: "0.0.0.0"
6 changes: 6 additions & 0 deletions logstash/config/pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is where you define your pipelines. You can define multiple.
# For more information on multiple pipelines, see the documentation:
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html

- pipeline.id: main
path.config: "/usr/share/logstash/pipeline"
Binary file added logstash/env2yaml/env2yaml
Binary file not shown.
12 changes: 12 additions & 0 deletions logstash/pipeline/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
input {
beats {
port => 5044
}
}

output {
stdout {
codec => rubydebug
}
}

0 comments on commit b0c83e7

Please sign in to comment.