diff options
| author | Sylvain Baubeau <sbaubeau@redhat.com> | 2019-03-26 15:00:24 +0100 |
|---|---|---|
| committer | Mark Goddard <mark@stackhpc.com> | 2020-04-09 14:10:16 +0100 |
| commit | c56d68f4b5f500d4a4894995f30892313c3fd2da (patch) | |
| tree | d96bec94f8e3119ac2c27ba1486b1724278a94c8 /docker/elasticsearch6 | |
| parent | 2506a14dbd4c4c4ddb26871a0cad251b5718ca59 (diff) | |
| download | kolla-c56d68f4b5f500d4a4894995f30892313c3fd2da.tar.gz kolla-c56d68f4b5f500d4a4894995f30892313c3fd2da.zip | |
Add elasticsearch6 and kibana6 images
Elasticsearch and Kibana only support CentOS 8 from version 6.x, but in
Train Kolla uses ELK 5.x.
This change adds new elasticsearch6 and kibana6 images based on ELK 6.x
only for CentOS 7 and 8. This enables two things:
1. provide elasticsearch and kibana for CentOS 8 in Train
2. provide a migration path from CentOS 7 to 8 that does not involve a
simultaneous major upgrade, by first upgrading CentOS 7 to ELK 6.x.
The new images are based on the upgrade to 6.x in Ussuri in
I8b52b2630a72393bf4b9c7095fc67db6c36c27fa.
This includes a switch to start using oss tagged binaries. These
binaries contain only features that are available under the Apache 2.0
license.
Related: blueprint elasticsearch-kibana-version-upgrade
Co-authored-by: Dincer Celik <hello@dincercelik.com>
Change-Id: I8b52b2630a72393bf4b9c7095fc67db6c36c27fa
Diffstat (limited to 'docker/elasticsearch6')
| -rw-r--r-- | docker/elasticsearch6/Dockerfile.j2 | 33 | ||||
| -rw-r--r-- | docker/elasticsearch6/elasticsearch.repo | 6 | ||||
| -rw-r--r-- | docker/elasticsearch6/extend_start.sh | 8 |
3 files changed, 47 insertions, 0 deletions
diff --git a/docker/elasticsearch6/Dockerfile.j2 b/docker/elasticsearch6/Dockerfile.j2 new file mode 100644 index 000000000..07452707d --- /dev/null +++ b/docker/elasticsearch6/Dockerfile.j2 @@ -0,0 +1,33 @@ +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block elasticsearch_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.configure_user(name='elasticsearch', shell='/bin/bash', homedir='/usr/share/elasticsearch') }} + +{% set elasticsearch_packages = [ + 'java-11-openjdk-headless', + 'elasticsearch-oss', +] %} + +ENV JAVA_HOME /usr/lib/jvm/jre-11-openjdk/ +ENV ES_SKIP_SET_KERNEL_PARAMETERS true + +COPY elasticsearch.repo /etc/yum.repos.d/ + +{{ macros.install_packages(elasticsearch_packages | customizable("packages")) }} +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +# NOTE: By default the shell of the elasticsearch user is /bin/false. We have to +# change the shell to /bin/bash to be able to run elasticsearch as a non-root user. +# +# https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863 + +RUN chmod 755 /usr/local/bin/kolla_extend_start + +{% block elasticsearch_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER elasticsearch diff --git a/docker/elasticsearch6/elasticsearch.repo b/docker/elasticsearch6/elasticsearch.repo new file mode 100644 index 000000000..7172d13a8 --- /dev/null +++ b/docker/elasticsearch6/elasticsearch.repo @@ -0,0 +1,6 @@ +[elasticsearch-kibana-logstash-6.x] +name=ELK repository for 6.x packages +baseurl=https://artifacts.elastic.co/packages/oss-6.x/yum +gpgcheck=1 +gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch +enabled=1 diff --git a/docker/elasticsearch6/extend_start.sh b/docker/elasticsearch6/extend_start.sh new file mode 100644 index 000000000..b39f5b334 --- /dev/null +++ b/docker/elasticsearch6/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/elasticsearch" ]]; then + mkdir -p /var/log/kolla/elasticsearch +fi +if [[ $(stat -c %a /var/log/kolla/elasticsearch) != "755" ]]; then + chmod 755 /var/log/kolla/elasticsearch +fi |
