kolla/docker/sensu/sensu-server/Dockerfile.j2
Mathias Ewald ed29f8730d Add sensu images
Add sensu yum repository to base image

Create images for sensu-server, sensu-api and sensu-client processes

Install a basic set of handler plugins into server image

Install a basic set of sensu plugins into client image

Change-Id: I0b88133080c58070c24ed90059315366b64034c6
2017-12-14 09:25:08 +00:00

38 lines
965 B
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_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set sensu_server_packages = [
'cyrus-sasl-devel',
'gcc-c++',
'make',
'ruby-devel'
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set sensu_server_packages = [
'build-essential',
'libsasl2-dev'
] %}
{% endif %}
{{ macros.install_packages(sensu_server_packages | customizable("packages")) }}
{% block sensu_server_plugins_install %}
{% set sensu_plugins = [
'mailer',
'slack'
] %}
RUN sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }}
{% endblock %}
{% block sensu_server_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER sensu