Skip to content

Commit 315b7df

Browse files
Merge pull request #1947 from multi-arch/master
Prepare for RHEL 8
2 parents e8231f8 + 7379018 commit 315b7df

File tree

3 files changed

+97
-3
lines changed

3 files changed

+97
-3
lines changed

elasticsearch/Dockerfile.rhel8

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM ubi8:latest
2+
3+
MAINTAINER OpenShift Development <[email protected]>
4+
5+
EXPOSE 9200
6+
EXPOSE 9300
7+
USER 0
8+
9+
ENV ES_PATH_CONF=/etc/elasticsearch/ \
10+
ES_HOME=/usr/share/elasticsearch \
11+
ES_VER=6.8.1.redhat-6 \
12+
HOME=/opt/app-root/src \
13+
INSTANCE_RAM=512G \
14+
JAVA_VER=1.8.0 \
15+
JAVA_HOME=/usr/lib/jvm/jre \
16+
NODE_QUORUM=1 \
17+
PROMETHEUS_EXPORTER_VER=6.8.1.0-redhat-1 \
18+
OPENDISTRO_VER=0.10.1.0-redhat-1 \
19+
PLUGIN_LOGLEVEL=INFO \
20+
RECOVER_AFTER_NODES=1 \
21+
RECOVER_EXPECTED_NODES=1 \
22+
RECOVER_AFTER_TIME=5m \
23+
DHE_TMP_KEY_SIZE=2048 \
24+
RELEASE_STREAM=origin
25+
26+
ARG MAVEN_REPO_URL=file:///artifacts/
27+
28+
RUN packages="java-${JAVA_VER}-openjdk-headless \
29+
python3 python3-pyyaml \
30+
hostname \
31+
openssl \
32+
zip \
33+
unzip \
34+
jq" && \
35+
yum install -y --setopt=tsflags=nodocs ${packages} && \
36+
rpm -V ${packages} && \
37+
alternatives --set python /usr/bin/python3 &&
38+
yum clean all
39+
40+
ADD extra-jvm.options install-es.sh /var/tmp
41+
COPY artifacts /artifacts
42+
RUN /var/tmp/install-es.sh
43+
44+
ADD sgconfig/ ${HOME}/sgconfig/
45+
ADD index_templates/ ${ES_HOME}/index_templates/
46+
ADD index_patterns/ ${ES_HOME}/index_patterns/
47+
ADD init/ ${ES_HOME}/init/
48+
ADD kibana_ui_objects/ ${ES_HOME}/kibana_ui_objects/
49+
ADD probe/ ${ES_HOME}/probe/
50+
ADD init.sh run.sh prep-install* install.sh ${HOME}/
51+
COPY utils/** /usr/local/bin/
52+
53+
ARG PROMETHEUS_EXPORTER_URL=${MAVEN_REPO_URL}org/elasticsearch/plugin/prometheus/prometheus-exporter/${PROMETHEUS_EXPORTER_VER}/prometheus-exporter-${PROMETHEUS_EXPORTER_VER}.zip
54+
ARG OPENDISTRO_URL=${MAVEN_REPO_URL}com/amazon/opendistroforelasticsearch/opendistro_security/${OPENDISTRO_VER}/opendistro_security-${OPENDISTRO_VER}.zip
55+
56+
RUN ${HOME}/install.sh && rm -rf /artifacts
57+
58+
WORKDIR ${HOME}
59+
USER 1000
60+
CMD ["sh", "/opt/app-root/src/run.sh"]

elasticsearch/utils/es_util_env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ get_security_conf_index() {
1111
local index=$( python -c 'import sys,yaml
1212
hsh = yaml.load(open(sys.argv[1]))
1313
if "searchguard" in hsh and "config_index_name" in hsh["searchguard"]:
14-
print hsh["searchguard"]["config_index_name"]
14+
print(hsh["searchguard"]["config_index_name"])
1515
elif "opendistro_security" in hsh and "config_index_name" in hsh["opendistro_security"]:
16-
print hsh["opendistro_security"]["config_index_name"]
16+
print(hsh["opendistro_security"]["config_index_name"])
1717
else:
18-
print "unknown_security_index"
18+
print("unknown_security_index")
1919
' $es_config_file )
2020
echo $index
2121
}

kibana/Dockerfile.rhel8

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM ubi8/nodejs-10:latest
2+
3+
MAINTAINER OpenShift Development <[email protected]>
4+
5+
EXPOSE 5601
6+
7+
ENV ELASTICSEARCH_URL=https://elasticsearch.openshift-logging.svc.cluster.local:9200 \
8+
HOME=/opt/app-root/src \
9+
KIBANA_CONF_DIR=${HOME}/config \
10+
KIBANA_VERSION=6.8.1 \
11+
NODE_ENV=production \
12+
RELEASE_STREAM=prod \
13+
container=oci \
14+
NODE_ENV=production \
15+
NODE_PATH=/usr/bin
16+
17+
ARG LOCAL_REPO
18+
19+
USER 0
20+
21+
COPY vendored_tar_src/kibana-oss-6.8.1 ${HOME}/
22+
COPY vendored_tar_src/opendistro_security_kibana_plugin-0.10.0.4/ ${HOME}/plugins/opendistro_security_kibana_plugin-0.10.0.4/
23+
24+
RUN chmod -R og+w ${HOME}/
25+
ADD probe/ /usr/share/kibana/probe/
26+
ADD kibana.yml ${KIBANA_CONF_DIR}/
27+
ADD run.sh utils ${HOME}/
28+
RUN sed -i -e 's/"node":.*/"node": "'$(${NODE_PATH}/node --version | sed 's/v//')'"/' package.json && \
29+
mkdir -p node && \
30+
ln -s ${NODE_PATH} node/bin
31+
RUN bin/kibana --optimize
32+
33+
WORKDIR ${HOME}
34+
CMD ["./run.sh"]

0 commit comments

Comments
 (0)