kolla/docker/collectd/Dockerfile.j2
Matthias Runge 3af9151c5a Add more collectd plugins to the container
Since collectd exists in both centos-opstools and also in
EPEL, we disable EPEL for collectd building.

Change-Id: I2428aea0265b1dcd050f63ea3949c112407d5d04
2017-09-19 19:22:15 +02:00

46 lines
1.2 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block collectd_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='collectd') }}
{% set collectd_packages = [
'collectd'
] %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set collectd_packages = collectd_packages + [
'collectd-apache',
'collectd-ceph',
'collectd-disk',
'collectd-python',
'collectd-virt'
] %}
{% if base_arch =='x86_64' %}
{% set collectd_packages = collectd_packages + [
'collectd-turbostat',
'collectd-hugepages'
] %}
{% endif %}
# make sure, collectd is pulled from centos-opstools
RUN yum-config-manager --disable epel
{% endif %}
{{ macros.install_packages(collectd_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& chown -R collectd /var/lib/collectd \
&& chown -R collectd /etc/collectd* \
&& chown -R collectd /var/run/
{% block collectd_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER collectd