Files
turboquant/ansible/roles/turboquant-deploy/tasks/debian.yml
STEP35 CLI e20439b544
All checks were successful
Smoke Test / smoke (pull_request) Successful in 7s
deploy: Ansible role for TurboQuant-compressed Gemma 4 across fleet nodes (#98)
- Adds ansible/ deploy_turboquant.yml playbook with per-node config
- Adds turboquant-deploy role: OS-specific (darwin/debian) tasks
- Adds health_check.sh and integration test (chat completion)
- Adds inventory.ini.example with Mac/Allegro/Ezra groups
- Deploys llama.cpp with TurboQuant (Metal on macOS)
- Systemd service (Linux) with TURBO_LAYER_ADAPTIVE env
2026-04-26 06:55:35 -04:00

93 lines
2.2 KiB
YAML

---
# Debian/Ubuntu deployment — installs llama.cpp with TurboQuant, uses systemd
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 3600
tags: [turboquant, deps]
- name: Install build dependencies
apt:
name:
- build-essential
- cmake
- git
- curl
- python3
- python3-pip
- python3-venv
state: present
tags: [turboquant, deps]
- name: Create turboquant user
user:
name: "{{ turboquant_user }}"
system: yes
shell: /usr/sbin/nologin
create_home: no
tags: [turboquant, prereq]
- name: Create install directory
file:
path: "{{ turboquant_install_dir }}"
state: directory
mode: '0755'
owner: "{{ turboquant_user }}"
group: "{{ turboquant_user }}"
tags: [turboquant, prereq]
- name: Clone llama.cpp TurboQuant fork
git:
repo: "https://github.com/TheTom/llama-cpp-turboquant.git"
dest: "{{ turboquant_install_dir }}/llama.cpp"
version: "feature/turboquant-kv-cache"
force: yes
tags: [turboquant, source]
- name: Build llama.cpp with TurboQuant
shell: |
cd {{ turboquant_install_dir }}/llama.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
args:
creates: "{{ turboquant_install_dir }}/llama.cpp/build/bin/llama-server"
tags: [turboquant, build]
- name: Create models directory
file:
path: "{{ turboquant_install_dir }}/models"
state: directory
mode: '0755'
owner: "{{ turboquant_user }}"
group: "{{ turboquant_user }}"
tags: [turboquant, deploy]
- name: Deploy systemd service unit
template:
src: turboquant.service.j2
dest: /etc/systemd/system/{{ turboquant_service_name }}.service
mode: '0644'
tags: [turboquant, service]
- name: Reload systemd daemon
systemd:
daemon_reload: yes
tags: [turboquant, service]
- name: Enable and start TurboQuant service
systemd:
name: "{{ turboquant_service_name }}"
state: started
enabled: yes
tags: [turboquant, service]
- name: Deploy health check script
copy:
src: "../../health_check.sh"
dest: "{{ turboquant_install_dir }}/health_check.sh"
mode: '0755'
owner: "{{ turboquant_user }}"
group: "{{ turboquant_user }}"
tags: [turboquant, deploy]