kolla/docker/sensu/sensu-client/Dockerfile.j2
Steven Dake a729d132d6 Consume RDO packaged mariadb version
RDO packaged mariadb recieves far more testing and qualification
than any other mariadb package on CentOS.  Lets use that instead
of a hard-pinned old version of mariadb from mariadb.org.

This patch also upgrade MariaDB from 10.0 to 10.1.20 for
RHEL/CentOS/Oracle Linux.

Depends-On: I8374ac2219ad7880970cd789727d01af7cac1077
Depends-On: Ia2acb09e877a586243fc1acb49d8d140cf27d7b5
Co-Authored-By: Xinliang Liu <xinliang.liu@linaro.org>
Change-Id: I071362fc1b8d60199a77e2fe0475d2b4c3b5341b
2018-01-21 19:19:57 +01:00

81 lines
2.0 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}sensu-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block sensu_client_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set sensu_client_packages = [
'ceph-common',
'cyrus-sasl-devel',
'docker-client',
'gcc-c++',
'make',
'mariadb',
'ntp',
'osops-tools-monitoring-oschecks',
'python-pymongo',
'ruby-devel'
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set sensu_client_packages = [
'build-essential',
'ceph-common',
'inetutils-ping',
'libsasl2-dev',
'mysql-client',
'ntp',
'python-pymongo'
] %}
{% if base_distro in ['debian'] %}
{% set sensu_client_packages = sensu_client_packages + [
'docker-ce'
] %}
{% else %}
{% set sensu_client_packages = sensu_client_packages + [
'docker.io'
] %}
{% endif %}
{% else %}
RUN echo '{{ image_name }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{{ macros.install_packages(sensu_client_packages | customizable("packages")) }}
{% block sensu_clients_install %}
{% set sensu_plugins = [
'ceph',
'cpu-checks',
'disk-checks',
'dns',
'docker',
'elasticsearch',
'filesystem-checks',
'haproxy',
'http',
'io-checks',
'load-checks',
'memcached',
'memory-checks',
'mongodb',
'mysql',
'network-checks',
'ntp',
'openstack',
'process-checks',
'rabbitmq',
'redis',
'uptime-checks',
'vmstats'
] %}
RUN /opt/sensu/embedded/bin/gem install vmstat --no-rdoc --no-ri \
&& sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
{% endblock %}
{% block sensu_client_footer %}{% endblock %}
{% block footer %}{% endblock %}