From d0c72b7b0a4b0f6813ef455026e1bc0d8bc192a3 Mon Sep 17 00:00:00 2001 From: Brendan Shephard Date: Mon, 9 Dec 2024 12:15:40 +1000 Subject: [PATCH] dnm - Containerfile repos Signed-off-by: Brendan Shephard --- bootc/Containerfile.centos9 | 20 ++---- .../node-exporter/node_exporter.image | 5 ++ .../quadlets/node-exporter/node_exporter.yaml | 66 +++++++++++++++++++ 3 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 bootc/embedded-services/quadlets/node-exporter/node_exporter.image create mode 100644 bootc/embedded-services/quadlets/node-exporter/node_exporter.yaml diff --git a/bootc/Containerfile.centos9 b/bootc/Containerfile.centos9 index 11ad06b..8c6e0d6 100644 --- a/bootc/Containerfile.centos9 +++ b/bootc/Containerfile.centos9 @@ -10,14 +10,17 @@ ARG PACKAGES="\ chrony \ cloud-init \ crudini \ + cronie \ crypto-policies-scripts \ device-mapper-multipath \ driverctl \ grubby \ + grub2-tools \ iproute-tc \ iptables-services \ iscsi-initiator-utils \ jq \ + libvirt \ lvm2 \ NetworkManager-ovs \ nftables \ @@ -36,26 +39,13 @@ ARG PACKAGES="\ ARG ENABLE_UNITS="openvswitch" -RUN dnf -y update && dnf -y install $PACKAGES && dnf clean all && systemctl enable $ENABLE_UNITS +RUN sudo dnf install centos-release-nfv-openvswitch centos-release-openstack-antelope -y && dnf -y install $PACKAGES && dnf clean all && systemctl enable $ENABLE_UNITS # Template systemd service for services COPY embedded-services/quadlets/systemd/service-template.kube /usr/share/containers/systemd/edpm-compute@.kube ## Service specific quadlets -COPY embedded-services/quadlets/ovn-controller/ovn_controller.yaml /usr/share/containers/systemd/ovn_controller.yaml -COPY embedded-services/quadlets/ovn-controller/ovn_controller.image /usr/share/containers/systemd/ovn_controller.image -COPY embedded-services/quadlets/iscsid/iscsid.yaml /usr/share/containers/systemd/iscsid.yaml -COPY embedded-services/quadlets/iscsid/iscsid.image /usr/share/containers/systemd/iscsid.image -COPY embedded-services/quadlets/nova_compute/nova_compute.yaml /usr/share/containers/systemd/nova_compute.yaml -COPY embedded-services/quadlets/nova_compute/nova_compute.image /usr/share/containers/systemd/nova_compute.image -COPY embedded-services/quadlets/ovn_metadata_agent/ovn_metadata_agent.yaml /usr/share/containers/systemd/ovn_metadata_agent.yaml -COPY embedded-services/quadlets/ovn_metadata_agent/ovn_metadata_agent.image /usr/share/containers/systemd/ovn_metadata_agent.image -COPY embedded-services/quadlets/logrotate_crond/logrotate_crond.yaml /usr/share/containers/systemd/logrotate_crond.yaml -COPY embedded-services/quadlets/logrotate_crond/logrotate_crond.image /usr/share/containers/systemd/logrotate_crond.image -COPY embedded-services/quadlets/multipathd/multipathd.yaml /usr/share/containers/systemd/multipathd.yaml -COPY embedded-services/quadlets/multipathd/multipathd.image /usr/share/containers/systemd/multipathd.image -COPY embedded-services/quadlets/ceilometer_agent_compute/ceilometer_agent_compute.yaml /usr/share/containers/systemd/ceilometer_agent_compute.yaml -COPY embedded-services/quadlets/ceilometer_agent_compute/ceilometer_agent_compute.image /usr/share/containers/systemd/ceilometer_agent_compute.image +COPY embedded-services/quadlets/ /usr/share/containers/systemd/ # Pre-cache containers for each service RUN podman pull quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified diff --git a/bootc/embedded-services/quadlets/node-exporter/node_exporter.image b/bootc/embedded-services/quadlets/node-exporter/node_exporter.image new file mode 100644 index 0000000..fefc68f --- /dev/null +++ b/bootc/embedded-services/quadlets/node-exporter/node_exporter.image @@ -0,0 +1,5 @@ +[install] +WantedBy=edpm-compute@ovn_controller.service + +[Image] +Image=quay.io/prometheus/node-exporter@sha256:39c642b2b337e38c18e80266fb14383754178202f40103646337722a594d984c diff --git a/bootc/embedded-services/quadlets/node-exporter/node_exporter.yaml b/bootc/embedded-services/quadlets/node-exporter/node_exporter.yaml new file mode 100644 index 0000000..790c898 --- /dev/null +++ b/bootc/embedded-services/quadlets/node-exporter/node_exporter.yaml @@ -0,0 +1,66 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + annotations: + bind-mount-options: /var/lib/openstack/healthchecks/node_exporter:z + labels: + app: nodeexporter-pod + name: node_exporter +spec: + containers: + - args: + - --web.config.file=/etc/node_exporter/node_exporter.yaml + - --collector.systemd + - --collector.systemd.unit-include=(edpm_.*|ovs.*|openvswitch|virt.*|rsyslog)\.service + - --web.disable-exporter-metrics + - --no-collector.dmi + - --no-collector.entropy + - --no-collector.thermal_zone + - --no-collector.time + - --no-collector.timex + - --no-collector.uname + - --no-collector.stat + - --no-collector.hwmon + - --no-collector.os + - --no-collector.selinux + - --no-collector.textfile + - --no-collector.powersupplyclass + - --no-collector.pressure + - --no-collector.rapl + env: + - name: OS_ENDPOINT_TYPE + value: internal + image: quay.io/prometheus/node-exporter@sha256:39c642b2b337e38c18e80266fb14383754178202f40103646337722a594d984c + name: node_exporter + securityContext: + privileged: true + procMount: Unmasked + volumeMounts: + - mountPath: /etc/node_exporter/node_exporter.yaml + name: var-lib-openstack-config-telemetry-node_exporter.yaml-host-0 + - mountPath: /etc/node_exporter/tls + name: var-lib-openstack-certs-telemetry-default-host-1 + - mountPath: /var/run/dbus/system_bus_socket + name: var-run-dbus-system_bus_socket-host-2 + - mountPath: /openstack + name: var-lib-openstack-healthchecks-node_exporter-host-3 + readOnly: true + hostNetwork: true + volumes: + - hostPath: + path: /var/lib/openstack/config/telemetry/node_exporter.yaml + type: File + name: var-lib-openstack-config-telemetry-node_exporter.yaml-host-0 + - hostPath: + path: /var/lib/openstack/certs/telemetry/default + type: Directory + name: var-lib-openstack-certs-telemetry-default-host-1 + - hostPath: + path: /var/run/dbus/system_bus_socket + type: File + name: var-run-dbus-system_bus_socket-host-2 + - hostPath: + path: /var/lib/openstack/healthchecks/node_exporter + type: Directory + name: var-lib-openstack-healthchecks-node_exporter-host-3