Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

! DEPRECATED !

This code is in the process of migrating into the RHOSO EDPM Ansible repo. Currently it exists on a fork for testing pending preparations for downstream delivery, here: https://github.com/rhos-vaf/edpm-ansible/tree/rhos-vaf/roles/edpm_telemetry_accel_exporters

This repo should be ready to be archived.

! DEPRECATED !

NVIDIA DCGM Exporter Ansible Role

This Ansible role installs and configures the NVIDIA DCGM Exporter for GPU monitoring and metrics collection.

Requirements

  • Ansible 2.14 or higher
  • Target systems must have:
    • Podman installed
    • Network access to pull container images

Role Variables

Variable Default Description
dcgm_exporter_nvidia_repo_url "https://developer.download.nvidia.com/compute/cuda/repos/rhel9" Base URL for NVIDIA repo
dcgm_exporter_image_tag "4.3.1-4.4.0-ubi9" Container image tag for the DCGM Exporter
dcgm_exporter_libnvidia_container_toolkit_version_release "1.17.8-1" Version of the NVIDIA Container Tools RPM to install
dcgm_exporter_nvidia_driver_module_version "open-dkms" NVIDIA Driver version to install if not already present

Dependencies

None.

Example Playbook

---
- hosts: gpu_servers
  roles:
    - nvidia-dcgm-exporter

With custom image tag:

---
- hosts: gpu_servers
  vars:
    dcgm_exporter_image_tag: "4.3.1-4.4.0-ubi9"
  roles:
    - nvidia-dcgm-exporter

What This Role Does

  1. Installs NVIDIA Driver: Installs nvidia-driver from the NVIDIA repository if not already installed
  2. Installs NVIDIA Management Library: Installs the libnvidia-ml RPM that matches the installed nvidia-driver version
  3. Installs NVIDIA Container Tools: Installs the libnvidia-container-tools RPM for container GPU support
  4. Updates CDI Configuration: Adds the required mount configuration to /etc/cdi/nvidia.yaml for nvidia-ml library access
  5. Creates Systemd Service: Creates a systemd service file that manages the DCGM Exporter container
  6. Manages Service: Enables and starts the DCGM Exporter service

Container Configuration

The role runs the DCGM Exporter in a container with the following configuration:

  • Image: nvcr.io/nvidia/k8s/dcgm-exporter:{{ dcgm_exporter_image_tag }}
  • Port: 9400 (Prometheus metrics endpoint)
  • Devices: All NVIDIA GPUs (nvidia.com/gpu=all)
  • Capabilities: SYS_ADMIN
  • Environment: DCGM_EXPORTER_DEBUG=true

Service Management

The role creates a systemd service that:

  • Automatically starts on boot
  • Restarts on failure
  • Uses podman to manage the container lifecycle

Metrics Endpoint

Once deployed, metrics will be available at http://your-server:9400/metrics

About

Ansible role to install dcgm-exporter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages