Files
homelab/ansible/playbooks/deploy_paperclip_stack.yml
T
rblundon 6112b6daea feat: Add paperclip-docker Ansible role with OpenCode vLLM integration
- Create roles/paperclip-docker with full Docker Compose stack deployment
- Template OpenCode v1.2.24 config (provider structure) with Gemma-4-26B model
- Integrate vLLM endpoint (localhost:8000) with vault-injected API key auth
- Wire secrets from ansible vault: vllm_api_key, cloudflare_token, paperclip auth secrets
- Add pre-deployment checks (PostgreSQL, nginx, certbot cert management)
- Implement idempotent stack lifecycle (containers, volumes, networking)
- Deploy to RTX 3090 via muppet-vision.wdw-labs.cloud with nginx SSL termination

Paperclip now serves as CEO reasoning engine with local Gemma inference,
accessible to Hermes platform agents via OpenCode adapter on shared vLLM.
2026-09-27 19:39:08 -05:00

84 lines
2.6 KiB
YAML

---
- name: Deploy Paperclip stack with nginx and certbot
hosts: illuminations
become: true
vars_files:
- "{{ playbook_dir }}/../group_vars/all/vars"
- "{{ playbook_dir }}/../group_vars/all/vault"
roles:
- docker-host
- paperclip-docker
post_tasks:
- name: Verify Paperclip stack is running
community.docker.docker_container_info:
name: "{{ item }}"
register: container_status
loop:
- paperclip
- paperclip-nginx
- paperclip-certbot
changed_when: false
- name: Fail if any container is not running
fail:
msg: "Container {{ item.item }} is not running or does not exist"
when: not item.exists or item.container.State.Running == false
loop: "{{ container_status.results }}"
changed_when: false
- name: Verify Docker is available
command: docker --version
register: docker_version
changed_when: false
- name: Show Docker version
debug:
msg: "Docker version: {{ docker_version.stdout }}"
- name: Verify docker-compose plugin is available
command: docker compose version
register: compose_version
changed_when: false
ignore_errors: true
- name: Show docker-compose version
debug:
msg: "Docker Compose version: {{ compose_version.stdout | default('docker-compose plugin not found') }}"
- name: Display deployment summary
debug:
msg: |
Paperclip stack deployed successfully!
Access points:
- HTTPS: https://{{ paperclip_domain }}
- HTTP (redirects to HTTPS): http://{{ paperclip_domain }}
Services:
- Paperclip: {{ paperclip_host }}:{{ paperclip_port }}
- nginx (reverse proxy): 0.0.0.0:443 / 0.0.0.0:80
- certbot: Running certificate renewal checks
Data location:
- {{ paperclip_base_path }}/data
Certificates:
- {{ paperclip_certs_dir }}/live/{{ paperclip_domain }}/
vLLM endpoint:
- {{ vllm_endpoint }}
OpenCode configuration:
- Config: {{ paperclip_base_path }}/.config/opencode/opencode.jsonc
- Model: Gemma-4-26B (AWQ)
- Endpoint: {{ vllm_endpoint }}/v1
Next steps:
1. Verify DNS resolution for {{ paperclip_domain }}
2. Visit https://{{ paperclip_domain }} to access Paperclip
3. OpenCode should auto-initialize with vLLM at {{ vllm_endpoint }}
4. Set up Hermes Gateway on Mac Studio
5. Configure agents and skills