diff options
| author | Doug Szumski <doug@stackhpc.com> | 2020-06-17 13:44:17 +0000 |
|---|---|---|
| committer | Doug Szumski <doug@stackhpc.com> | 2020-06-25 17:04:53 +0100 |
| commit | 5be5a4e6f7ac703a1f0de174e4e9276dc9af96b8 (patch) | |
| tree | 1a5d1c14ce3d461ce6332a9981e33e9232949d90 | |
| parent | 47df05074204b87805986c7e9ae6743e3dce28db (diff) | |
| download | kolla-5be5a4e6f7ac703a1f0de174e4e9276dc9af96b8.tar.gz kolla-5be5a4e6f7ac703a1f0de174e4e9276dc9af96b8.zip | |
Add Logstash 6 for Monasca on Centos 8
On Centos 8 we have Elasticsearch and Kibana 6, but Logstash (used by
Monasca) is stuck on 2 which is not compatible. See the product
compatibility matrix [1]. This adds Logstash 6, so that Monasca
can use the full ELK 6 stack on Centos 8.
Note that Monasca doesn't officially support ELK 6, but it does work.
[1] https://www.elastic.co/support/matrix#matrix_compatibility
Partial-Bug: #1884090
Change-Id: Id6f79e301cc109a029913f5628bab1848c138e7f
| -rw-r--r-- | docker/logstash6/Dockerfile.j2 | 29 | ||||
| -rw-r--r-- | docker/logstash6/elasticsearch.repo | 6 | ||||
| -rw-r--r-- | docker/logstash6/extend_start.sh | 8 | ||||
| -rwxr-xr-x | kolla/image/build.py | 2 | ||||
| -rw-r--r-- | releasenotes/notes/add-logstash6-7418a88dc5cb88eb.yaml | 5 |
5 files changed, 50 insertions, 0 deletions
diff --git a/docker/logstash6/Dockerfile.j2 b/docker/logstash6/Dockerfile.j2 new file mode 100644 index 000000000..7368f58b2 --- /dev/null +++ b/docker/logstash6/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +{% endblock %} + +{% block logstash_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.configure_user(name='logstash', shell='/bin/bash', homedir='/usr/share/logstash') }} + +ENV JAVA_HOME /usr/lib/jvm/jre-11-openjdk/ + +{% set logstash_packages = [ + 'java-11-openjdk-headless', + 'logstash-oss', +] %} + +COPY elasticsearch.repo /etc/yum.repos.d/ + +{{ macros.install_packages(logstash_packages | customizable("packages")) }} +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN chmod 755 /usr/local/bin/kolla_extend_start + +{% block logstash_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER logstash diff --git a/docker/logstash6/elasticsearch.repo b/docker/logstash6/elasticsearch.repo new file mode 100644 index 000000000..7172d13a8 --- /dev/null +++ b/docker/logstash6/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/logstash6/extend_start.sh b/docker/logstash6/extend_start.sh new file mode 100644 index 000000000..99152b1b5 --- /dev/null +++ b/docker/logstash6/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/logstash" ]]; then + mkdir -p /var/log/kolla/logstash +fi +if [[ $(stat -c %a /var/log/kolla/logstash) != "755" ]]; then + chmod 755 /var/log/kolla/logstash +fi diff --git a/kolla/image/build.py b/kolla/image/build.py index 54f40e308..2a30bad12 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -174,6 +174,7 @@ UNBUILDABLE_IMAGES = { # Debian 'buster' "cyborg-base", "elasticsearch6", # Only required for CentOS 8 migration. + "logstash6", # Only required for CentOS 8 migration. "kibana6", # Only required for CentOS 8 migration. "monasca-grafana", # FIXME(hrw): some ssl issues to fix "mongodb", @@ -187,6 +188,7 @@ UNBUILDABLE_IMAGES = { 'ubuntu': { "cyborg-base", "elasticsearch6", # Only required for CentOS 8 migration. + "logstash6", # Only required for CentOS 8 migration. "kibana6", # Only required for CentOS 8 migration. "qdrouterd", # There is no qdrouterd package for ubuntu bionic "rabbitmq-3.7.24", # Required only for CentOS 7 to 8 migration diff --git a/releasenotes/notes/add-logstash6-7418a88dc5cb88eb.yaml b/releasenotes/notes/add-logstash6-7418a88dc5cb88eb.yaml new file mode 100644 index 000000000..2ab652f59 --- /dev/null +++ b/releasenotes/notes/add-logstash6-7418a88dc5cb88eb.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The Logstash image has been upgraded from Logstash 2 to Logstash 6 for + Centos 7 and Centos 8 only. |
