Add ironic-prometheus-exporter
This commit adds the ironic-prometheus-exporter, following the conventions used by the previously integrated exporters. '[The] Ironic Prometheus Exporter is a Tool to expose hardware sensor data in the Prometheus format through an HTTP endpoint.'[0] [0] https://opendev.org/openstack/ironic-prometheus-exporter Change-Id: If833f1f4a33c27cdc941dcc7cd5bbb06b26e1eaf
This commit is contained in:

committed by
Michal Nasiadka

parent
1357391488
commit
f54fb018b0
@@ -46,7 +46,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
'ironic-staging-drivers',
|
'ironic-staging-drivers',
|
||||||
] %}
|
] %}
|
||||||
|
|
||||||
RUN {{ macros.install_pip(ironic_conductor_pip_packages | customizable("pip_packages")) }}
|
{% set ironic_conductor_plugins_pip_packages = [
|
||||||
|
'/plugins/*'
|
||||||
|
] %}
|
||||||
|
|
||||||
|
ADD plugins-archive /
|
||||||
|
RUN {{ macros.install_pip(ironic_conductor_pip_packages | customizable("pip_packages")) }} \
|
||||||
|
&& if [ "$(ls /plugins)" ]; then \
|
||||||
|
{{ macros.install_pip(ironic_conductor_plugins_pip_packages) }}; \
|
||||||
|
fi
|
||||||
|
|
||||||
{{ macros.install_packages(ironic_conductor_packages | customizable("packages")) }}
|
{{ macros.install_packages(ironic_conductor_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
41
docker/ironic/ironic-prometheus-exporter/Dockerfile.j2
Normal file
41
docker/ironic/ironic-prometheus-exporter/Dockerfile.j2
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
FROM {{ namespace }}/{{ image_prefix }}ironic-conductor:{{ tag }}
|
||||||
|
{% block labels %}
|
||||||
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
{% block ironic_prometheus_exporter_header %}{% endblock %}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
|
{% if base_package_type == 'rpm' %}
|
||||||
|
|
||||||
|
{% set ironic_prometheus_exporter_packages = [
|
||||||
|
'httpd',
|
||||||
|
'mod_ssl',
|
||||||
|
'python3-mod_wsgi'
|
||||||
|
] %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(ironic_prometheus_exporter_packages | customizable("packages")) }}
|
||||||
|
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
|
||||||
|
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
|
||||||
|
|
||||||
|
{% elif base_package_type == 'deb' %}
|
||||||
|
{% set ironic_prometheus_exporter_packages = [
|
||||||
|
'apache2',
|
||||||
|
'libapache2-mod-wsgi-py3'
|
||||||
|
] %}
|
||||||
|
|
||||||
|
{{ macros.install_packages(ironic_prometheus_exporter_packages | customizable("packages")) }}
|
||||||
|
RUN echo > /etc/apache2/ports.conf
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
ENV IRONIC_CONFIG /etc/ironic/ironic.conf
|
||||||
|
|
||||||
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||||
|
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||||
|
|
||||||
|
{% block ironic_prometheus_exporter_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
3
docker/ironic/ironic-prometheus-exporter/extend_start.sh
Normal file
3
docker/ironic/ironic-prometheus-exporter/extend_start.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /usr/local/bin/kolla_httpd_setup
|
@@ -172,6 +172,11 @@ SOURCES = {
|
|||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('$tarballs_base/openstack/ironic-inspector/'
|
'location': ('$tarballs_base/openstack/ironic-inspector/'
|
||||||
'ironic-inspector-${openstack_branch}.tar.gz')},
|
'ironic-inspector-${openstack_branch}.tar.gz')},
|
||||||
|
'ironic-conductor-plugin-prometheus-exporter': {
|
||||||
|
'type': 'url',
|
||||||
|
'location': (
|
||||||
|
'$tarballs_base/openstack/ironic-prometheus-exporter/'
|
||||||
|
'ironic-prometheus-exporter-${openstack_branch}.tar.gz')},
|
||||||
'keystone-base': {
|
'keystone-base': {
|
||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('$tarballs_base/openstack/keystone/'
|
'location': ('$tarballs_base/openstack/keystone/'
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds an image and further support for the ironic-prometheus-exporter, 'a
|
||||||
|
Tool to expose hardware sensor data in the Prometheus format through an HTTP
|
||||||
|
endpoint'.
|
||||||
|
See https://opendev.org/openstack/ironic-prometheus-exporter for more details
|
||||||
|
about the exporter.
|
Reference in New Issue
Block a user