File tree Expand file tree Collapse file tree 6 files changed +108
-0
lines changed Expand file tree Collapse file tree 6 files changed +108
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
2+ {% block labels %}
3+ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+ {% endblock %}
5+
6+ {% block opensearch_header %}{% endblock %}
7+
8+ {% import "macros.j2" as macros with context %}
9+
10+ {{ macros.configure_user(name='opensearch', shell='/bin/bash', homedir='/usr/share/opensearch') }}
11+
12+ {% block opensearch_version %}
13+
14+ {% if base_arch == 'x86_64' %}
15+ {% set arch_os ='x64' %}
16+ {% elif base_arch == 'aarch64' %}
17+ {% set arch_os ='arm64' %}
18+ {% endif %}
19+
20+ ARG opensearch_version=2.3.0
21+ ARG opensearch_dashboards_url=https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/${opensearch_version}/opensearch-dashboards-${opensearch_version}-linux-{{ arch_os }}.tar.gz
22+ {% endblock %}
23+
24+ ARG OPENSEARCH_DASHBOARDS_HOME=/usr/share/opensearch-dashboards
25+
26+ RUN mkdir -p $OPENSEARCH_DASHBOARDS_HOME && \
27+ curl -o /tmp/opensearch-dashboards.tgz ${opensearch_dashboards_url} && \
28+ tar -xzpf /tmp/opensearch-dashboards.tgz -C $OPENSEARCH_DASHBOARDS_HOME --strip-components=1 && \
29+ rm /tmp/opensearch-dashboards.tgz
30+
31+ COPY extend_start.sh /usr/local/bin/kolla_extend_start
32+ RUN chmod 755 /usr/local/bin/kolla_extend_start
33+
34+ {% block opensearch_footer %}{% endblock %}
35+ {% block footer %}{% endblock %}
36+
37+ USER opensearch
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ ! -d " /var/log/kolla/opensearch" ]]; then
4+ mkdir -p /var/log/kolla/opensearch
5+ fi
6+ if [[ $( stat -c %a /var/log/kolla/opensearch) != " 755" ]]; then
7+ chmod 755 /var/log/kolla/opensearch
8+ fi
9+
10+ export DASHBOARDS_HOME=/usr/share/opensearch-dashboards
11+
12+ PLUGIN_LIST=$( $DASHBOARDS_HOME /bin/opensearch-dashboards-plugin list)
13+ if [[ " ${OPENSEARCH_DASHBOARDS_SECURITY_PLUGIN:- True} " == " False" ]]; then
14+ if [[ ${PLUGIN_LIST} =~ " securityDashboards" ]]; then
15+ $DASHBOARDS_HOME /bin/opensearch-dashboards-plugin remove securityDashboards
16+ fi
17+ fi
Original file line number Diff line number Diff line change 1+ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
2+ {% block labels %}
3+ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
4+ {% endblock %}
5+
6+ {% block opensearch_header %}{% endblock %}
7+
8+ {% import "macros.j2" as macros with context %}
9+
10+ {{ macros.configure_user(name='opensearch', shell='/bin/bash', homedir='/usr/share/opensearch') }}
11+
12+ {% block opensearch_version %}
13+
14+ {% if base_arch == 'x86_64' %}
15+ {% set arch_os ='x64' %}
16+ {% elif base_arch == 'aarch64' %}
17+ {% set arch_os ='arm64' %}
18+ {% endif %}
19+
20+ ARG opensearch_version=2.3.0
21+ ARG opensearch_url=https://artifacts.opensearch.org/releases/bundle/opensearch/${opensearch_version}/opensearch-${opensearch_version}-linux-{{ arch_os }}.tar.gz
22+ {% endblock %}
23+
24+ ARG OPENSEARCH_HOME=/usr/share/opensearch
25+
26+ RUN curl -o /tmp/opensearch.tgz ${opensearch_url} && \
27+ tar -xzpf /tmp/opensearch.tgz -C $OPENSEARCH_HOME --strip-components=1 && \
28+ rm /tmp/opensearch.tgz && \
29+ mkdir -p $OPENSEARCH_HOME/data && chown -R opensearch:opensearch $OPENSEARCH_HOME/data
30+
31+ COPY extend_start.sh /usr/local/bin/kolla_extend_start
32+ RUN chmod 755 /usr/local/bin/kolla_extend_start
33+
34+ {% block elasticsearch_footer %}{% endblock %}
35+ {% block footer %}{% endblock %}
36+
37+ USER opensearch
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ ! -d " /var/log/kolla/opensearch" ]]; then
4+ mkdir -p /var/log/kolla/opensearch
5+ fi
6+ if [[ $( stat -c %a /var/log/kolla/opensearch) != " 755" ]]; then
7+ chmod 755 /var/log/kolla/opensearch
8+ fi
Original file line number Diff line number Diff line change 6262 'logstash' ,
6363 'mariadb' ,
6464 'memcached' ,
65+ 'opensearch' ,
6566 'openvswitch' ,
6667 'proxysql' ,
6768 'qdrouterd' ,
953954 'letsencrypt-user' : {
954955 'uid' : 42488 ,
955956 'gid' : 42488 ,
957+ },
958+ 'opensearch-user' : {
959+ 'uid' : 42490 ,
960+ 'gid' : 42490 ,
956961 }
957962}
958963
Original file line number Diff line number Diff line change 1+ ---
2+ features :
3+ - |
4+ Adds OpenSearch and OpenSearch Dashboards images.
You can’t perform that action at this time.
0 commit comments