feat(llm-inference): move astro-orbiter monitoring to GitOps (values.yaml + dashboards.yaml)
- Prometheus scrape configs for node/gpu/llama-server exporters on astro-orbiter now declared in cluster/applications/monitoring/values.yaml (additionalScrapeConfigs), applied via ArgoCD sync instead of an imperative kubectl secret patch from the Ansible role. - Grafana dashboard for astro-orbiter LLM inference added as a ConfigMap in cluster/applications/monitoring/dashboards.yaml (grafana_dashboard=1 sidecar label), replacing the role's ad-hoc kubectl apply of a rendered Jinja template. - ansible/roles/llm-inference/tasks/monitoring.yml: removed the kubectl get/patch/apply tasks and orphaned grafana-llm-dashboard.json.j2 template; role now only stands up node_exporter + nvidia_gpu_exporter and verifies they're reachable — cluster-facing config lives in Git. - host_vars/vars.yml + inventory.yml: finalize astro-orbiter as the llama.cpp/RTX 3090 host (jarvis user, ssh key), drop stale Ollama/AMD vars and ollama_server inventory group superseded by the ATX rebuild.
This commit is contained in:
@@ -22,6 +22,17 @@
|
||||
state: present
|
||||
update_cache: false
|
||||
|
||||
# NOTE: nvidia-driver-595-open provides the runtime driver only (nvidia-smi,
|
||||
# libcuda.so) — it does NOT ship nvcc/CUDA headers needed to build GGML_CUDA=ON.
|
||||
# Ubuntu 24.04's nvidia-cuda-toolkit (12.0.x) is sufficient to build llama.cpp
|
||||
# against; it does not need to match the 595 driver's CUDA 13.2 runtime version.
|
||||
- name: Install NVIDIA CUDA toolkit (nvcc) for building llama.cpp with CUDA support
|
||||
ansible.builtin.apt:
|
||||
name: nvidia-cuda-toolkit
|
||||
state: present
|
||||
update_cache: false
|
||||
become: true
|
||||
|
||||
- name: Clone llama.cpp repository
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/ggml-org/llama.cpp.git
|
||||
@@ -30,6 +41,20 @@
|
||||
update: false
|
||||
become: true
|
||||
|
||||
- name: Check for incomplete/stale llama.cpp CMake configuration
|
||||
ansible.builtin.stat:
|
||||
path: /opt/llama.cpp/build/Makefile
|
||||
register: llama_cmake_generated
|
||||
|
||||
- name: Remove stale llama.cpp build dir if CMake configure never completed
|
||||
ansible.builtin.file:
|
||||
path: /opt/llama.cpp/build
|
||||
state: absent
|
||||
become: true
|
||||
when:
|
||||
- not llama_cmake_generated.stat.exists
|
||||
- not (ansible_check_mode | default(false))
|
||||
|
||||
- name: Build llama.cpp with CUDA support
|
||||
ansible.builtin.command:
|
||||
cmd: cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
|
||||
@@ -53,6 +78,11 @@
|
||||
group: "{{ llm_venv_owner }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Check whether GGUF already exists (avoid re-downloading 16.6GB on every run)
|
||||
ansible.builtin.stat:
|
||||
path: "{{ llm_gguf_path }}"
|
||||
register: llm_gguf_stat
|
||||
|
||||
- name: Download Gemma 2 27B Q4_K_M GGUF from HuggingFace
|
||||
ansible.builtin.get_url:
|
||||
url: "https://huggingface.co/bartowski/gemma-2-27b-it-GGUF/resolve/main/gemma-2-27b-it-Q4_K_M.gguf"
|
||||
@@ -63,8 +93,13 @@
|
||||
group: "{{ llm_venv_owner }}"
|
||||
mode: "0644"
|
||||
timeout: 7200
|
||||
force: false
|
||||
become: true
|
||||
no_log: true
|
||||
# Idempotency: skip entirely once the file exists and is reasonably sized
|
||||
# (the finished GGUF is ~16.6GB; guard against a truncated partial download
|
||||
# being mistaken for complete by only trusting files > 15GB).
|
||||
when: not llm_gguf_stat.stat.exists or (llm_gguf_stat.stat.size | int) < 15000000000
|
||||
|
||||
- name: Disable and stop vllm-serve if present
|
||||
ansible.builtin.systemd:
|
||||
|
||||
Reference in New Issue
Block a user