Add GPU monitoring services and configurations
- Create systemd service templates for llama_exporter, nvidia_exporter, and podman. - Add Prometheus configuration template for GPU metrics scraping. - Introduce variables for GPU monitoring role in main.yml. - Implement tasks for syncing llama models, including user setup and package installation. - Update podman tasks to ensure proper sudo access and lingering for the podman user. - Modify inventory to include gpu_monitoring group. - Add Terraform modules for deploying Vaultwarden, including ingress and service configurations. - Create Grafana dashboard for real-time GPU monitoring metrics. - Update secrets and environment files to include Vaultwarden admin token.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
---
|
||||
# gpu_monitoring defaults
|
||||
|
||||
# Prometheus configuration
|
||||
prometheus_image: "docker.io/prom/prometheus:latest"
|
||||
prometheus_image_tag: "latest"
|
||||
prometheus_version: "latest"
|
||||
prometheus_port: 9091
|
||||
prometheus_container_port: 9090
|
||||
prometheus_data_dir: "/mnt/data/prometheus"
|
||||
prometheus_retention_days: "30"
|
||||
prometheus_retention_size: "10GB"
|
||||
prometheus_scrape_interval: "15s"
|
||||
prometheus_evaluation_interval: "15s"
|
||||
prometheus_scrape_timeout: "10s"
|
||||
|
||||
# Prometheus container
|
||||
prometheus_container_memory: "1g"
|
||||
prometheus_user: prometheus
|
||||
prometheus_group: prometheus
|
||||
prometheus_user_home: "/mnt/data/prometheus"
|
||||
prometheus_network_name: prometheus-net
|
||||
prometheus_host_port: "{{ prometheus_port }}"
|
||||
prometheus_host_gateway: "host.containers.internal"
|
||||
prometheus_extra_groups: []
|
||||
prometheus_user_folders:
|
||||
- .prometheus
|
||||
- .cache
|
||||
|
||||
# NVIDIA GPU Exporter configuration (NVML-based, works with consumer GPUs)
|
||||
nvidia_exporter_enabled: true
|
||||
nvidia_exporter_port: 9400
|
||||
nvidia_exporter_user: nvidia_exporter
|
||||
nvidia_exporter_user_home: "/home/nvidia_exporter"
|
||||
nvidia_exporter_install_dir: "/opt/nvidia_exporter"
|
||||
nvidia_exporter_venv_path: "/opt/nvidia_exporter/.venv"
|
||||
|
||||
# AMD GPU Exporter configuration
|
||||
amd_exporter_enabled: true
|
||||
amd_exporter_port: 9500
|
||||
amd_exporter_user: amd_exporter
|
||||
amd_exporter_user_home: "/home/amd_exporter"
|
||||
amd_exporter_install_dir: "/opt/amdgpu_exporter"
|
||||
amd_exporter_venv_path: "/opt/amdgpu_exporter/.venv"
|
||||
amd_exporter_python_version: "python3"
|
||||
amd_exporter_sysfs_gpu_pattern: "/sys/class/drm/card?/device/"
|
||||
|
||||
# Llama Exporter configuration
|
||||
llama_exporter_enabled: true
|
||||
llama_exporter_port: 9550
|
||||
llama_exporter_user: llama_exporter
|
||||
llama_exporter_user_home: "/home/llama_exporter"
|
||||
llama_exporter_install_dir: "/opt/llama_exporter"
|
||||
llama_exporter_venv_path: "/opt/llama_exporter/.venv"
|
||||
llama_exporter_scrape_interval: 15
|
||||
llama_exporter_scrape_timeout: 5
|
||||
|
||||
# Llama.cpp scrape targets
|
||||
llama_exporter_targets: []
|
||||
|
||||
# Firewall configuration
|
||||
prometheus_fw_port: "{{ prometheus_port }}"
|
||||
prometheus_fw_proto: "tcp"
|
||||
prometheus_fw_allowed_networks:
|
||||
- cidr: "10.19.4.0/24"
|
||||
comment: "local network"
|
||||
- cidr: "10.5.5.5/32"
|
||||
comment: "Laptop Wireguard"
|
||||
Reference in New Issue
Block a user