Add Opensearch image(s)
Handles x86-64 and aarch64 targets. Change-Id: I70e2bb1d2744d38e08f5a9a79ab6a7265ebf24c9
This commit is contained in:
parent
823329304a
commit
abfb5713ae
37
docker/opensearch/opensearch-dashboards/Dockerfile.j2
Normal file
37
docker/opensearch/opensearch-dashboards/Dockerfile.j2
Normal file
@ -0,0 +1,37 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
||||
{% block labels %}
|
||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||
{% endblock %}
|
||||
|
||||
{% block opensearch_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{{ macros.configure_user(name='opensearch', shell='/bin/bash', homedir='/usr/share/opensearch') }}
|
||||
|
||||
{% block opensearch_version %}
|
||||
|
||||
{% if base_arch == 'x86_64' %}
|
||||
{% set arch_os='x64' %}
|
||||
{% elif base_arch == 'aarch64' %}
|
||||
{% set arch_os='arm64' %}
|
||||
{% endif %}
|
||||
|
||||
ARG opensearch_version=2.3.0
|
||||
ARG opensearch_dashboards_url=https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/${opensearch_version}/opensearch-dashboards-${opensearch_version}-linux-{{ arch_os }}.tar.gz
|
||||
{% endblock %}
|
||||
|
||||
ARG OPENSEARCH_DASHBOARDS_HOME=/usr/share/opensearch-dashboards
|
||||
|
||||
RUN mkdir -p $OPENSEARCH_DASHBOARDS_HOME && \
|
||||
curl -o /tmp/opensearch-dashboards.tgz ${opensearch_dashboards_url} && \
|
||||
tar -xzpf /tmp/opensearch-dashboards.tgz -C $OPENSEARCH_DASHBOARDS_HOME --strip-components=1 && \
|
||||
rm /tmp/opensearch-dashboards.tgz
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
{% block opensearch_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
USER opensearch
|
17
docker/opensearch/opensearch-dashboards/extend_start.sh
Normal file
17
docker/opensearch/opensearch-dashboards/extend_start.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/opensearch" ]]; then
|
||||
mkdir -p /var/log/kolla/opensearch
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/opensearch) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/opensearch
|
||||
fi
|
||||
|
||||
export DASHBOARDS_HOME=/usr/share/opensearch-dashboards
|
||||
|
||||
PLUGIN_LIST=$($DASHBOARDS_HOME/bin/opensearch-dashboards-plugin list)
|
||||
if [[ "${OPENSEARCH_DASHBOARDS_SECURITY_PLUGIN:-True}" == "False" ]]; then
|
||||
if [[ ${PLUGIN_LIST} =~ "securityDashboards" ]]; then
|
||||
$DASHBOARDS_HOME/bin/opensearch-dashboards-plugin remove securityDashboards
|
||||
fi
|
||||
fi
|
37
docker/opensearch/opensearch/Dockerfile.j2
Normal file
37
docker/opensearch/opensearch/Dockerfile.j2
Normal file
@ -0,0 +1,37 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
||||
{% block labels %}
|
||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||
{% endblock %}
|
||||
|
||||
{% block opensearch_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{{ macros.configure_user(name='opensearch', shell='/bin/bash', homedir='/usr/share/opensearch') }}
|
||||
|
||||
{% block opensearch_version %}
|
||||
|
||||
{% if base_arch == 'x86_64' %}
|
||||
{% set arch_os='x64' %}
|
||||
{% elif base_arch == 'aarch64' %}
|
||||
{% set arch_os='arm64' %}
|
||||
{% endif %}
|
||||
|
||||
ARG opensearch_version=2.3.0
|
||||
ARG opensearch_url=https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearch_version}/opensearch-${opensearch_version}-linux-{{ arch_os }}.tar.gz
|
||||
{% endblock %}
|
||||
|
||||
ARG OPENSEARCH_HOME=/usr/share/opensearch
|
||||
|
||||
RUN curl -o /tmp/opensearch.tgz ${opensearch_url} && \
|
||||
tar -xzpf /tmp/opensearch.tgz -C $OPENSEARCH_HOME --strip-components=1 && \
|
||||
rm /tmp/opensearch.tgz && \
|
||||
mkdir -p $OPENSEARCH_HOME/data && chown -R opensearch:opensearch $OPENSEARCH_HOME/data
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
{% block elasticsearch_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
USER opensearch
|
8
docker/opensearch/opensearch/extend_start.sh
Normal file
8
docker/opensearch/opensearch/extend_start.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/opensearch" ]]; then
|
||||
mkdir -p /var/log/kolla/opensearch
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/opensearch) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/opensearch
|
||||
fi
|
@ -64,6 +64,7 @@ _PROFILE_OPTS = [
|
||||
'logstash',
|
||||
'mariadb',
|
||||
'memcached',
|
||||
'opensearch',
|
||||
'openvswitch',
|
||||
'proxysql',
|
||||
'rabbitmq',
|
||||
|
@ -329,5 +329,9 @@ USERS = {
|
||||
'venus-user': {
|
||||
'uid': 42489,
|
||||
'gid': 42489,
|
||||
},
|
||||
'opensearch-user': {
|
||||
'uid': 42490,
|
||||
'gid': 42490,
|
||||
}
|
||||
}
|
||||
|
4
releasenotes/notes/opensearch-f3a7b8bfc86a16f6.yaml
Normal file
4
releasenotes/notes/opensearch-f3a7b8bfc86a16f6.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds OpenSearch and OpenSearch Dashboards images.
|
Loading…
Reference in New Issue
Block a user