c0aee4adb6
notice that the td-agent command got renamed to fluentd.
see also the upgrade notes at[0].
for more details, refer to the changelog[1].
[0]: https://web.archive.org/web/20231006084137/https://www.fluentd.org/blog/upgrade-td-agent-v4-to-v5
[1]: b4b7017c09/CHANGELOG.md (release-v500---20230729)
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/901509
Change-Id: I5e95363c6c180e330945fe3d98e97c7049bbd6f7
Signed-off-by: Sven Kieske <kieske@osism.tech>
61 lines
1.6 KiB
Django/Jinja
61 lines
1.6 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
|
|
|
{% set fluentd_user = 'fluentd' %}
|
|
|
|
{% block labels %}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" fluentd_binary="fluentd" fluentd_user="{{ fluentd_user }}"
|
|
{% endblock %}
|
|
|
|
{% block fluentd_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{{ macros.enable_extra_repos(['fluentd']) }}
|
|
|
|
{% if base_package_type == 'rpm' %}
|
|
|
|
{% set fluentd_packages = [
|
|
'gcc-c++',
|
|
'make',
|
|
'fluent-package',
|
|
] %}
|
|
|
|
{% elif base_package_type == 'deb' %}
|
|
|
|
{% set fluentd_packages = [
|
|
'g++',
|
|
'make',
|
|
'fluent-package',
|
|
] %}
|
|
|
|
{% endif %}
|
|
|
|
{{ macros.configure_user(name=fluentd_user, groups='mysql') }}
|
|
|
|
COPY fluentd_sudoers /etc/sudoers.d/kolla_fluentd_sudoers
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
|
|
{{ macros.install_packages(fluentd_packages | customizable("packages")) }} \
|
|
&& chmod 440 /etc/sudoers.d/kolla_fluentd_sudoers \
|
|
&& mkdir -p /etc/{{ fluentd_user }} \
|
|
&& mkdir -p /var/run/{{ fluentd_user }} \
|
|
&& chown -R {{ fluentd_user }}: /var/run/{{ fluentd_user }} \
|
|
&& chmod 644 /usr/local/bin/kolla_extend_start
|
|
|
|
{% block fluentd_plugins_install %}
|
|
|
|
{% set fluentd_plugins = [
|
|
'fluent-plugin-grok-parser',
|
|
'fluent-plugin-prometheus',
|
|
'fluent-plugin-rewrite-tag-filter',
|
|
] %}
|
|
|
|
{{ macros.install_fluent_plugins(fluentd_plugins | customizable("plugins")) }}
|
|
|
|
{% endblock %}
|
|
|
|
{% block fluentd_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER {{ fluentd_user }}
|