feat(llm-inference): Day 1 playbook for RTX 3090 vLLM stack on astro-orbiter
- nvidia-driver-595-open (already installed 2026-08-03, idempotent) - Python venv + vLLM 0.26.0 (already installed, idempotent) - Gemma 2 27B model download via HuggingFace hub - systemd vllm-serve.service on port 8000 - Hermes provider integration on carousel-of-progress - vault_hf_token added to group_vars/all/vault - ansible.cfg: vault_password_file set to absolute path - inventory: astro_orbiter group added Run with: env -u ANSIBLE_VAULT_PASSWORD_FILE ansible-playbook -i inventory.yml playbooks/day1_deploy_llm_inference.yml
This commit is contained in:
48
ansible/roles/llm-inference/tasks/serve.yml
Normal file
48
ansible/roles/llm-inference/tasks/serve.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
# ------------------------------------------------------------------------------
|
||||
# FILE: roles/llm-inference/tasks/serve.yml
|
||||
# DESCRIPTION: Phase 5 — systemd vllm-serve service.
|
||||
# Deploys the service unit, enables on boot, starts it, and
|
||||
# health-checks the OpenAI-compatible API endpoint.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
- name: Deploy vllm-serve systemd service unit
|
||||
ansible.builtin.template:
|
||||
src: vllm-serve.service.j2
|
||||
dest: /etc/systemd/system/vllm-serve.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart vllm-serve
|
||||
|
||||
- name: Flush handlers to reload systemd before enabling service
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Enable and start vllm-serve
|
||||
ansible.builtin.systemd:
|
||||
name: vllm-serve
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
|
||||
- name: Wait for vLLM API to become available (model load can take ~60s)
|
||||
ansible.builtin.uri:
|
||||
url: "http://localhost:{{ llm_serve_port }}/health"
|
||||
status_code: 200
|
||||
register: vllm_health
|
||||
retries: 30
|
||||
delay: 10
|
||||
until: vllm_health.status == 200
|
||||
|
||||
- name: Smoke-test — list available models
|
||||
ansible.builtin.uri:
|
||||
url: "http://localhost:{{ llm_serve_port }}/v1/models"
|
||||
status_code: 200
|
||||
return_content: true
|
||||
register: vllm_models
|
||||
|
||||
- name: Print available models
|
||||
ansible.builtin.debug:
|
||||
msg: "vLLM serving: {{ vllm_models.json.data | map(attribute='id') | list }}"
|
||||
Reference in New Issue
Block a user