
The 4.0.0 release of the mailer plugin requires Ruby 2.3+, which is not avaiable in CentOS/RHEL7. Pin it to the 3.0.0 release, which is supported. While we're here, also pin the slack plugin. Both use the pessimistic version operator, as used in the sensu-client image. Change-Id: Idac8cb696c81c7413a3da79b4868f556ef36fc8d Closes-Bug: #1820594
41 lines
1.1 KiB
Django/Jinja
41 lines
1.1 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}sensu-base:{{ tag }}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
|
|
{% block sensu_server_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if base_package_type == 'rpm' %}
|
|
{% set sensu_server_packages = [
|
|
'cyrus-sasl-devel',
|
|
'gcc-c++',
|
|
'make',
|
|
'ruby-devel'
|
|
] %}
|
|
{% elif base_package_type == 'deb' %}
|
|
{% set sensu_server_packages = [
|
|
'build-essential',
|
|
'libsasl2-dev'
|
|
] %}
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(sensu_server_packages | customizable("packages")) }}
|
|
|
|
{% block sensu_server_plugins_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 = [
|
|
'mailer:"~>3"',
|
|
'slack:"~>3"'
|
|
] %}
|
|
|
|
RUN sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
|
|
{% endblock %}
|
|
|
|
{% block sensu_server_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER sensu
|