Compare commits
No commits in common. "805217bcb6c3f29842e5465338fe0aa8b153ea66" and "2340e4e90f336da59c41298215d3ea7696f40c8a" have entirely different histories.
805217bcb6
...
2340e4e90f
7 changed files with 0 additions and 156 deletions
|
|
@ -1,48 +0,0 @@
|
||||||
# vLLM
|
|
||||||
|
|
||||||
Installs vLLM via Helm for GPU-enabled inference workloads.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
- Kubernetes cluster with NVIDIA GPU workers
|
|
||||||
- NVIDIA device plugin deployed
|
|
||||||
- NGC API key for downloading models (stored in secret `vllm-ngc-secret`)
|
|
||||||
|
|
||||||
## Role Variables
|
|
||||||
|
|
||||||
| Variable | Default | Description |
|
|
||||||
|----------|---------|-------------|
|
|
||||||
| `vllm_chart_version` | `0.1.0` | vLLM Helm chart version |
|
|
||||||
| `vllm_namespace` | `vllm-system` | Kubernetes namespace |
|
|
||||||
| `vllm_num_replicas` | `2` | Number of replicas for HA |
|
|
||||||
| `vllm_image.repository` | `vllm/vllm-openai` | Container image repository |
|
|
||||||
| `vllm_image.tag` | `latest` | Container image tag |
|
|
||||||
| `vllm_image.pull_policy` | `IfNotPresent` | Image pull policy |
|
|
||||||
| `vllm_resources.limits.nvidia.com/gpu` | `1` | GPU limit per pod |
|
|
||||||
| `vllm_resources.requests.nvidia.com/gpu` | `1` | GPU request per pod |
|
|
||||||
| `vllm_env` | `[]` | Environment variables (e.g., NGC_API_KEY) |
|
|
||||||
| `vllm_extra_args` | `[]` | Additional CLI arguments |
|
|
||||||
| `vllm_kubeconfig` | `/home/{{ ansible_user }}/.kube/config` | Path to kubeconfig |
|
|
||||||
|
|
||||||
## Example Playbook
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- hosts: k8s_manager
|
|
||||||
become: false
|
|
||||||
roles:
|
|
||||||
- vllm
|
|
||||||
```
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
- Create secret with NGC API key:
|
|
||||||
```bash
|
|
||||||
kubectl create secret generic vllm-ngc-secret \
|
|
||||||
--from-literal=api-key=your-ngc-api-key \
|
|
||||||
-n vllm-system
|
|
||||||
```
|
|
||||||
|
|
||||||
- Ensure GPU workers are labeled:
|
|
||||||
```bash
|
|
||||||
kubectl label nodes <node> nvidia.com/gpu.present=true
|
|
||||||
```
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
vllm_chart_version: "0.1.0"
|
|
||||||
vllm_namespace: vllm-system
|
|
||||||
|
|
||||||
vllm_deployment_mode: "distributed"
|
|
||||||
vllm_num_replicas: 2
|
|
||||||
|
|
||||||
vllm_image:
|
|
||||||
repository: "vllm/vllm-openai"
|
|
||||||
tag: "latest"
|
|
||||||
pull_policy: "IfNotPresent"
|
|
||||||
|
|
||||||
vllm_resources:
|
|
||||||
limits:
|
|
||||||
nvidia.com/gpu: "1"
|
|
||||||
requests:
|
|
||||||
nvidia.com/gpu: "1"
|
|
||||||
|
|
||||||
vllm_env:
|
|
||||||
- name: "NGC_API_KEY"
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: "vllm-ngc-secret"
|
|
||||||
key: "api-key"
|
|
||||||
|
|
||||||
vllm_extra_args: []
|
|
||||||
|
|
||||||
vllm_kubeconfig: "/home/{{ ansible_user }}/.kube/config"
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
role_name: vllm
|
|
||||||
author: ops
|
|
||||||
description: Installs vLLM via Helm for GPU-enabled inference workloads
|
|
||||||
license: MIT
|
|
||||||
min_ansible_version: "2.14"
|
|
||||||
platforms:
|
|
||||||
- name: EL
|
|
||||||
versions:
|
|
||||||
- "9"
|
|
||||||
dependencies: []
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
---
|
|
||||||
- name: Helm | Add vLLM chart repository
|
|
||||||
ansible.builtin.command: helm repo add vllm https://vllm-project.github.io/charts
|
|
||||||
environment:
|
|
||||||
KUBECONFIG: "{{ vllm_kubeconfig }}"
|
|
||||||
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
||||||
register: _helm_repo_add
|
|
||||||
changed_when: "'already exists' not in _helm_repo_add.stdout"
|
|
||||||
failed_when: _helm_repo_add.rc != 0 and 'already exists' not in _helm_repo_add.stdout
|
|
||||||
|
|
||||||
- name: Helm | Update chart repositories
|
|
||||||
ansible.builtin.command: helm repo update
|
|
||||||
environment:
|
|
||||||
KUBECONFIG: "{{ vllm_kubeconfig }}"
|
|
||||||
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: vLLM | Render values
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: vllm-values.yml.j2
|
|
||||||
dest: /tmp/vllm-values.yml
|
|
||||||
mode: "0600"
|
|
||||||
|
|
||||||
- name: vLLM | Install or upgrade
|
|
||||||
ansible.builtin.command: >
|
|
||||||
helm upgrade --install vllm vllm/vllm
|
|
||||||
--namespace {{ vllm_namespace }}
|
|
||||||
--version {{ vllm_chart_version }}
|
|
||||||
--values /tmp/vllm-values.yml
|
|
||||||
--timeout 15m0s
|
|
||||||
--wait
|
|
||||||
environment:
|
|
||||||
KUBECONFIG: "{{ vllm_kubeconfig }}"
|
|
||||||
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
||||||
register: _helm_install
|
|
||||||
changed_when: "'STATUS: deployed' in _helm_install.stdout or 'has been upgraded' in _helm_install.stdout"
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: Create vLLM namespace
|
|
||||||
ansible.builtin.include_tasks: namespace.yml
|
|
||||||
|
|
||||||
- name: Deploy vLLM via Helm
|
|
||||||
ansible.builtin.include_tasks: deploy.yml
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
- name: Create namespace
|
|
||||||
ansible.builtin.kubectl:
|
|
||||||
name: "{{ vllm_namespace }}"
|
|
||||||
api_version: "v1"
|
|
||||||
kind: "Namespace"
|
|
||||||
state: "present"
|
|
||||||
environment:
|
|
||||||
KUBECONFIG: "{{ vllm_kubeconfig }}"
|
|
||||||
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
replicaCount: {{ vllm_num_replicas }}
|
|
||||||
|
|
||||||
image:
|
|
||||||
repository: {{ vllm_image.repository }}
|
|
||||||
tag: {{ vllm_image.tag }}
|
|
||||||
pullPolicy: {{ vllm_image.pull_policy }}
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
nvidia.com/gpu: {{ vllm_resources.limits.nvidia.com/gpu | default('1') }}
|
|
||||||
requests:
|
|
||||||
nvidia.com/gpu: {{ vllm_resources.requests.nvidia.com/gpu | default('1') }}
|
|
||||||
|
|
||||||
env: {{ vllm_env | default([]) | to_json }}
|
|
||||||
|
|
||||||
extraArgs: {{ vllm_extra_args | default([]) | to_json }}
|
|
||||||
Loading…
Reference in a new issue