Skip to content

Commit

Permalink
Merge pull request #1057 from jcantrill/vendor_es
Browse files Browse the repository at this point in the history
fix Dockerfile to use look aside cache
  • Loading branch information
openshift-merge-robot committed Apr 5, 2018
2 parents 62e264a + 20c7857 commit d0710f2
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 202 deletions.
4 changes: 4 additions & 0 deletions elasticsearch/.gitignore
@@ -0,0 +1,4 @@
/elasticsearch-5.5.2.rpm
/elasticsearch-cloud-kubernetes-5.5.2.zip
/elasticsearch-prometheus-exporter-5.5.2.0.zip
/openshift-elasticsearch-plugin-5.5.2.1.zip
60 changes: 35 additions & 25 deletions elasticsearch/Dockerfile
@@ -1,70 +1,80 @@
FROM rhel7.3:7.3-released
FROM rhel7:7-released

MAINTAINER OpenShift Development <dev@lists.openshift.redhat.com>

EXPOSE 9200
EXPOSE 9300
USER 0

ENV ES_CLOUD_K8S_VER=2.4.4.01 \
ES_CONF=/usr/share/java/elasticsearch/config \
ENV ES_CLOUD_K8S_VER=5.5.2 \
ES_CONF=/etc/elasticsearch/ \
ES_JAVA_OPTS="-Dmapper.allow_dots_in_name=true" \
ES_HOME=/usr/share/java/elasticsearch \
ES_HOME=/usr/share/elasticsearch \
ES_VER=5.5.2 \
HOME=/opt/app-root/src \
INSTANCE_RAM=512G \
JAVA_VER=1.8.0 \
NODE_QUORUM=1 \
OSE_ES_VER=2.4.4.20 \
PROMETHEUS_EXPORTER_VER=2.4.4.1 \
OSE_ES_VER=5.5.2.1 \
PROMETHEUS_EXPORTER_VER=5.5.2.0 \
PLUGIN_LOGLEVEL=INFO \
RECOVER_AFTER_NODES=1 \
RECOVER_EXPECTED_NODES=1 \
RECOVER_AFTER_TIME=5m \
RELEASE_STREAM=prod

ARG ES_CLOUD_K8S_VER=2.4.4.01
ARG OSE_ES_VER=2.4.4.16
ARG ES_CLOUD_K8S_VER=5.5.2
ARG OSE_ES_VER=5.5.2.1
ARG ES_CLOUD_K8S_URL
ARG OSE_ES_URL
ARG PROMETHEUS_EXPORTER_URL
ARG LOCAL_REPO

LABEL io.k8s.description="Elasticsearch container for EFK aggregated logging storage" \
io.k8s.display-name="Elasticsearch ${ES_VER}" \
io.openshift.expose-services="9200:https, 9300:https" \
io.openshift.tags="logging,elk,elasticsearch" \
com.redhat.component=logging-elasticsearch-docker \
architecture=x86_64 \
name="openshift3/logging-elasticsearch" \
version="v3.7.0" \
release="0.127.0.0"
ADD sources /tmp/lib/
WORKDIR /tmp/lib
RUN while read -r hash file ; do \
curl -s -o $file http://pkgs.devel.redhat.com/repo/containers/logging-elasticsearch5-container/$file/$hash/$file ; \
done <sources

RUN yum-config-manager --enable rhel-7-server-ose-3.7-rpms \
RUN if [ -n "${LOCAL_REPO}" ] ; then \
curl -s -o /etc/yum.repos.d/local.repo ${LOCAL_REPO} ; \
fi

RUN yum-config-manager --enable rhel-7-server-ose-3.8-rpms \
--enable rhel-7-server-extras-rpms && \
packages="elasticsearch-${ES_VER} \
elasticsearch-cloud-kubernetes \
packages="elasticsearch-${ES_VER}.rpm \
java-${JAVA_VER}-openjdk-headless \
openshift-elasticsearch-plugin \
PyYAML \
zip" && \
yum install -y --setopt=tsflags=nodocs ${packages} && \
rpm -V $packages && \
yum clean all


ADD sgconfig/ ${HOME}/sgconfig/
ADD index_templates/ ${ES_HOME}/index_templates/
ADD index_patterns/ ${ES_HOME}/index_patterns/
ADD kibana_ui_objects/ ${ES_HOME}/kibana_ui_objects/
ADD probe/ ${ES_HOME}/probe/
ADD lib/elasticsearch-prometheus-exporter/elasticsearch-prometheus-exporter-${PROMETHEUS_EXPORTER_VER}.zip /tmp/
ADD run.sh prep-install.${RELEASE_STREAM} install.sh ${HOME}/
COPY utils/** /usr/local/bin/
RUN ln -s /usr/local/bin/logging ${HOME}/logging

RUN ${HOME}/install.sh
RUN rm /tmp/elasticsearch-prometheus-exporter-${PROMETHEUS_EXPORTER_VER}.zip
RUN rm -r /tmp/lib

WORKDIR ${HOME}
USER 1000
CMD ["sh", "/opt/app-root/src/run.sh"]

LABEL \
io.k8s.description="Elasticsearch container for EFK aggregated logging storage" \
com.redhat.component="logging-elasticsearch-docker" \
vendor="Red Hat" \
name="openshift3/logging-elasticsearch" \
License="GPLv2+" \
io.k8s.display-name="Elasticsearch 5" \
version="v3.9.16" \
architecture="x86_64" \
release="1" \
io.openshift.expose-services="9200:https, 9300:https" \
io.openshift.tags="logging,elk,elasticsearch"

1 change: 1 addition & 0 deletions elasticsearch/Dockerfile.centos7
Expand Up @@ -40,6 +40,7 @@ ADD elasticsearch.repo /etc/yum.repos.d/elasticsearch.repo
RUN rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch && \
yum install -y --setopt=tsflags=nodocs --nogpgcheck \
java-${JAVA_VER}-openjdk-headless \
elasticsearch-${ES_VER} \
PyYAML && \
yum clean all

Expand Down
4 changes: 1 addition & 3 deletions elasticsearch/install.sh
Expand Up @@ -3,14 +3,12 @@
set -ex
set -o nounset

yum -y install https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VER}.rpm

source ${HOME}/prep-install.${RELEASE_STREAM}

echo "ES plugins: ${es_plugins[@]}"
for es_plugin in ${es_plugins[@]}
do
/usr/share/elasticsearch/bin/elasticsearch-plugin install -b $es_plugin
${ES_HOME}/bin/elasticsearch-plugin install -b $es_plugin
done


Expand Down
168 changes: 0 additions & 168 deletions elasticsearch/lib/elasticsearch-prometheus-exporter/README.md

This file was deleted.

Binary file not shown.
12 changes: 6 additions & 6 deletions elasticsearch/prep-install.prod
@@ -1,11 +1,11 @@
# prep the plugins we need
pushd /tmp/lib

es_plugins=()
for es_plugin in openshift-elasticsearch-plugin elasticsearch-cloud-kubernetes
for es_plugin in *.zip
do
es_plugin_file=/tmp/${es_plugin}.zip
pushd $es_plugin
zip -r $es_plugin_file .
popd
es_plugin_file=$(pwd)/${es_plugin}
es_plugins+=" file://${es_plugin_file}"
done
es_plugins+=" file:///tmp/elasticsearch-prometheus-exporter-${PROMETHEUS_EXPORTER_VER}.zip"

popd
4 changes: 4 additions & 0 deletions elasticsearch/sources
@@ -0,0 +1,4 @@
afa96795918b74817569b1bf925d9ca3 elasticsearch-5.5.2.rpm
5ad2d6ad71677e2a6ddbfa077c136415 elasticsearch-cloud-kubernetes-5.5.2.zip
682e404c5fe15acfe8f232307c04e00e elasticsearch-prometheus-exporter-5.5.2.0.zip
a5ae6829230983c6835f2c794f2719af openshift-elasticsearch-plugin-5.5.2.1.zip

0 comments on commit d0710f2

Please sign in to comment.