
This should help improve stability overall, in exchange for slightly older package version. Cap all the sensu plugins to their known major version that works with the ruby interpreter shipped with the current version of rhel/centos/oraclelinux -- currently ruby 2.0. All sensu plugins use semantic versioning so we're assured they don't introduce breaking changes in the capped major version. Change-Id: Ic5ca679c40da3e466433b0e04f762d2bbffbf156 Closes-Bug: #1774123
85 lines
2.4 KiB
Django/Jinja
85 lines
2.4 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 %}
|
|
|
|
# Sensu plugins are all using semantic versioning.
|
|
# Let's cap them to the known major version that works with the ruby shipped on
|
|
# rhel/centos/oraclelinux (currently 2.0)
|
|
{% set sensu_plugins = [
|
|
'ceph:"~>1"',
|
|
'cpu-checks:"~>1"',
|
|
'disk-checks:"~>2"',
|
|
'dns:"~>1"',
|
|
'docker:"~>3"',
|
|
'elasticsearch:"~>1"',
|
|
'filesystem-checks:"~>1"',
|
|
'haproxy:"~>1"',
|
|
'http:"~>1"',
|
|
'io-checks:"~>1"',
|
|
'load-checks:"~>3"',
|
|
'memcached:"~>0"',
|
|
'memory-checks:"~>1"',
|
|
'mongodb:"~>0"',
|
|
'mysql:"~>2"',
|
|
'network-checks:"~>2"',
|
|
'ntp:"~>1"',
|
|
'openstack:"~>1"',
|
|
'process-checks:"~>2"',
|
|
'rabbitmq:"~>3"',
|
|
'redis:"~>2"',
|
|
'uptime-checks:"~>1"',
|
|
'vmstats:"~>1"'
|
|
] %}
|
|
|
|
# TODO(mandre) Use packaged sensu plugins from centos-opstools for binary distro
|
|
# http://cbs.centos.org/koji/search?match=glob&type=package&terms=*sensu*
|
|
RUN sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
|
|
{% endblock %}
|
|
|
|
{% block sensu_client_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|