From 8d0f2df13af7d5372d33057b139a8a9c68e5754f Mon Sep 17 00:00:00 2001 From: Jorge Niedbalski Date: Mon, 7 Jan 2019 12:43:32 -0300 Subject: [PATCH] [prometheus] Added openstack-exporter base image. This commit adds the base image for openstack-exporter [0]. The selected exporter is released for amd64 and arm64 architectures. [0] https://github.com/Linaro/openstack-exporter Change-Id: Ic785711421c6af9d3e7c67f01c57c660501fbcee Signed-off-by: Jorge Niedbalski --- .../Dockerfile.j2 | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 diff --git a/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 new file mode 100644 index 0000000000..137efa8667 --- /dev/null +++ b/docker/prometheus/prometheus-openstack-exporter/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block prometheus_openstack_exporter_header %}{% endblock %} + +{% block prometheus_openstack_exporter_repository_version %} +ENV prometheus_openstack_exporter_version=0.0.3 +{% endblock %} + +{% block prometheus_openstack_exporter_install %} +RUN curl -sSL -o /tmp/prometheus_openstack_exporter.tar.gz https://github.com/Linaro/openstack-exporter/releases/download/v${prometheus_openstack_exporter_version}/openstack-exporter-${prometheus_openstack_exporter_version}.linux-${prometheus_arch}.tar.gz \ + && tar xvf /tmp/prometheus_openstack_exporter.tar.gz -C /opt/ \ + && rm -f /tmp/prometheus_openstack_exporter.tar.gz \ + && ln -s /opt/openstack-exporter* /opt/openstack-exporter +{% endblock %} + +{% block prometheus_openstack_exporter_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER prometheus