vLLM and the vLLM production stack
v2 cover vLLM and the vLLM production stack
This adds initial vLLM and vLLM production stack support on kdevops.
This v2 series augments vLLM support for real CPUs on bare metal using the DECLARE_HOSTS and also goes tested against a real GPU on the cloud, showing that essentially now anyone can use the vLLM production stack on any cloud provider we support in a flash. All we need are the instances which have GPUs added, and for that we expect growth soon using dynamic kconfig support.
Demo results of the temporary quick benchmark for all cases, GPUs, CPUs, and VMs are here:
https://github.com/mcgrof/demo-vllm-benchmark
We will expand support soon for synthetic engines, so we can stress test vLLM routing without the overhead of any real hardware. We then need to expand the scope of testing using the vLLM benchmarks and graphing them.
One of the benefits of all this is we can support *upstream kernel* changes and automatic testing of vLLM for compute in any complex way we can think of. Upstream kernels are not a requriement, we just support that. We also support AB testing since we already provide support for that, meaning folks can do AB testing with two different kernels.
This should be enough to kick the tires, and scale real production AI workloads on kdevops.
Since the first v1 patch already passed CI testing on kdevops, I'm posting this just as formality and will soon be merging this.
Luis Chamberlain (4):
workflows: Add vLLM workflow for LLM inference and production
deployment
vllm: Add DECLARE_HOSTS support for bare metal and existing
infrastructure
vllm: Add GPU-enabled defconfig with compatibility documentation
defconfigs: Add composable fragments for Lambda Labs vLLM deployment
.gitignore | 1 + PROMPTS.md | 31 + README.md | 26 +- .../configs/lambdalabs-gpu-1x-a10.config | 8 + .../configs/vllm-production-stack-gpu.config | 61 ++ defconfigs/lambdalabs-vllm-gpu-1x-a10 | 103 +++ defconfigs/vllm | 40 + defconfigs/vllm-declared-hosts | 53 ++ defconfigs/vllm-production-stack-cpu | 45 ++ .../vllm-production-stack-declared-hosts | 66 ++ .../vllm-production-stack-declared-hosts-gpu | 118 +++ defconfigs/vllm-quick-test | 42 ++ kconfigs/Kconfig.libvirt | 3 + kconfigs/workflows/Kconfig | 28 + playbooks/roles/gen_hosts/defaults/main.yml | 1 + playbooks/roles/gen_hosts/tasks/main.yml | 15 + .../gen_hosts/templates/workflows/vllm.j2 | 65 ++ playbooks/roles/gen_nodes/defaults/main.yml | 1 + playbooks/roles/gen_nodes/tasks/main.yml | 36 + playbooks/roles/linux-mirror/tasks/main.yml | 1 + playbooks/roles/vllm/defaults/main.yml | 17 + .../roles/vllm/tasks/cleanup-bare-metal.yml | 110 +++ .../vllm/tasks/configure-docker-data.yml | 187 +++++ .../roles/vllm/tasks/deploy-bare-metal.yml | 281 +++++++ playbooks/roles/vllm/tasks/deploy-docker.yml | 105 +++ .../vllm/tasks/deploy-production-stack.yml | 252 +++++++ .../vllm/tasks/install-deps/debian/main.yml | 101 +++ .../roles/vllm/tasks/install-deps/main.yml | 12 + .../vllm/tasks/install-deps/redhat/main.yml | 108 +++ .../vllm/tasks/install-deps/suse/main.yml | 50 ++ playbooks/roles/vllm/tasks/main.yml | 362 +++++++++ playbooks/roles/vllm/tasks/setup-helm.yml | 33 + .../roles/vllm/tasks/setup-kubernetes.yml | 307 ++++++++ .../roles/vllm/templates/vllm-benchmark.py.j2 | 152 ++++ .../vllm/templates/vllm-container.service.j2 | 80 ++ .../vllm/templates/vllm-deployment.yaml.j2 | 94 +++ .../vllm/templates/vllm-helm-values.yaml.j2 | 63 ++ .../vllm-prod-stack-official-values.yaml.j2 | 154 ++++ .../templates/vllm-upstream-values.yaml.j2 | 151 ++++ .../roles/vllm/templates/vllm-visualize.py.j2 | 434 +++++++++++ playbooks/vllm.yml | 12 + scripts/vllm-quick-test.sh | 191 +++++ scripts/vllm-status-summary.py | 404 ++++++++++ workflows/Makefile | 4 + workflows/vllm/Kconfig | 699 ++++++++++++++++++ workflows/vllm/Makefile | 136 ++++ workflows/vllm/README.md | 522 +++++++++++++ 47 files changed, 5763 insertions(+), 2 deletions(-) create mode 100644 defconfigs/configs/lambdalabs-gpu-1x-a10.config create mode 100644 defconfigs/configs/vllm-production-stack-gpu.config create mode 100644 defconfigs/lambdalabs-vllm-gpu-1x-a10 create mode 100644 defconfigs/vllm create mode 100644 defconfigs/vllm-declared-hosts create mode 100644 defconfigs/vllm-production-stack-cpu create mode 100644 defconfigs/vllm-production-stack-declared-hosts create mode 100644 defconfigs/vllm-production-stack-declared-hosts-gpu create mode 100644 defconfigs/vllm-quick-test create mode 100644 playbooks/roles/gen_hosts/templates/workflows/vllm.j2 create mode 100644 playbooks/roles/vllm/defaults/main.yml create mode 100644 playbooks/roles/vllm/tasks/cleanup-bare-metal.yml create mode 100644 playbooks/roles/vllm/tasks/configure-docker-data.yml create mode 100644 playbooks/roles/vllm/tasks/deploy-bare-metal.yml create mode 100644 playbooks/roles/vllm/tasks/deploy-docker.yml create mode 100644 playbooks/roles/vllm/tasks/deploy-production-stack.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/debian/main.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/main.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/redhat/main.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/suse/main.yml create mode 100644 playbooks/roles/vllm/tasks/main.yml create mode 100644 playbooks/roles/vllm/tasks/setup-helm.yml create mode 100644 playbooks/roles/vllm/tasks/setup-kubernetes.yml create mode 100644 playbooks/roles/vllm/templates/vllm-benchmark.py.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-container.service.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-deployment.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-helm-values.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-prod-stack-official-values.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-upstream-values.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-visualize.py.j2 create mode 100644 playbooks/vllm.yml create mode 100755 scripts/vllm-quick-test.sh create mode 100755 scripts/vllm-status-summary.py create mode 100644 workflows/vllm/Kconfig create mode 100644 workflows/vllm/Makefile create mode 100644 workflows/vllm/README.md
Signature · 1 line
2.51.0
PATCH v2 1/4 workflows: Add vLLM workflow for LLM inference and production deployment
Add support for deploying and testing vLLM inference engine and the vLLM Production Stack. The workflow enables automated testing of both vLLM as a single-node inference server and the production stack's cluster-wide orchestration capabilities including routing, scaling, and distributed caching. We start off with CPU support for both. For the production stack two replicas are requested so two engines, each one requiring 16 GiB memory. Given other requirements we ask for at least 64 GiB RAM for the production stack vllm CPU test.
To get the production stack up and running you just use:
make defconfig-vllm-production-stack-cpu KDEVOPS_HOSTS_PREFIX="demo" make
make bringup
make vllm AV=2
At this point you end up with two replicas serving through the vLLM production stack router.
vLLM is a high-performance inference engine for large language models, optimized for throughput and memory efficiency through PagedAttention and continuous batching. The vLLM Production Stack builds on top of this engine to provide cluster-wide serving with intelligent request routing, distributed KV cache sharing via LMCache, unified observability, and autoscaling across multiple model replicas.
The implementation supports three deployment methods: simple Docker containers for development, Kubernetes with the official Production Stack Helm chart for cluster deployments
(https://github.com/vllm-project/production-stack), and bare metal with systemd for direct hardware access. Each method shares common configuration through Kconfig while maintaining deployment-specific optimizations.
Testing can be performed with either CPU-only or GPU-accelerated inference. CPU testing uses openeuler/vllm-cpu images to validate the vLLM API and the production stack's orchestration layer without requiring GPU hardware, making it suitable for CI/CD pipelines and development workflows. This enables testing of the router's routing algorithms (round-robin, session affinity, prefix-aware), service discovery, load balancing, and API compatibility. GPU testing validates full production scenarios including LMCache distributed cache sharing, tensor parallelism, and autoscaling behavior.
The workflow integrates Docker registry mirror support with automatic detection via 9P mounts. When /mirror/docker is available, the system automatically configures Docker daemon registry-mirrors for transparent pull-through caching, reducing deployment time without requiring manual configuration. The detection uses the libvirt gateway IP to ensure proper routing from containers and minikube pods.
Image configuration follows Docker's native registry-mirrors pattern rather than rewriting image names. This preserves the original repository paths like 'openeuler/vllm-cpu:latest' and 'ghcr.io/vllm-project/production-stack/router:latest' while still benefiting from mirror caching when available.
Status monitoring is provided through:
make vllm-status
make vllm-status-simplified
which parse deployment state and present it with context-aware guidance about next steps. The vllm-quick-test target provides rapid smoke testing across all configured nodes with timing measurements and proper exit codes for CI integration.
To test an LLM query:
make vllm-quick-test
We provide basic documentation to help clarify the distinction between vLLM (the inference engine) and the Production Stack (the orchestration layer). For more details refer to the official release announcement at:
https://blog.lmcache.ai/2025-01-21-stack-release/
The long term plan is to scale with mocked engines, and then also real GPUs support both bare metal and on the cloud, leveraging kdevops's cloud agnostic power for any workflow.
Here's an example quick test:
mcgrof@beefy-server /xfs1/mcgrof/vllm/kdevops (git::vllm-v2)$ make vllm-quick-test
========================================
vLLM Quick Test
========================================
Prompt: "kdevops is"
Max tokens: 30
Nodes to test: 1
Testing Baseline node: lpc-vllm
----------------------------------------
Node IP: 192.168.122.170
Starting kubectl port-forward...
Sending request: "kdevops is"
✓ Success!
Duration: 15.747292458s
Full response: "kdevops iseasily a higher level doctor than your list. really it depends on as on what doc is what 15 less ifmay its just personal preferences."
Full JSON response:
{
"id": "cmpl-2f031a35c5364d3aaf2b9f0007d46ae5",
"object": "text_completion",
"created": 1759424719,
"model": "facebook/opt-125m",
"choices": [
{
"index": 0,
"text": " easily a higher level doctor than your list.\nreally it depends on as on what doc is what 15 less ifmay its just personal preferences.\n",
"logprobs": null,
"finish_reason": "length",
"stop_reason": null,
"prompt_logprobs": null
}
],
"usage": {
"prompt_tokens": 5,
"total_tokens": 35,
"completion_tokens": 30,
"prompt_tokens_details": null
},
"kv_transfer_params": null
}========================================
All tests passed!
========================================
Then for a synthetic benchmark:
make vllm-benchmark
You should end up with results in workflows/vllm/results/html/
I have put demo results of a synthetic run and also a real workload on a virtual 64 vcpus 64 GiB DRAM here:
https://github.com/mcgrof/demo-vllm-benchmark
--- .gitignore | 1 + PROMPTS.md | 31 + README.md | 26 +- defconfigs/vllm | 40 + defconfigs/vllm-production-stack-cpu | 45 ++ defconfigs/vllm-quick-test | 42 ++ kconfigs/Kconfig.libvirt | 3 + kconfigs/workflows/Kconfig | 28 + playbooks/roles/gen_hosts/defaults/main.yml | 1 + playbooks/roles/gen_hosts/tasks/main.yml | 15 + .../gen_hosts/templates/workflows/vllm.j2 | 65 ++ playbooks/roles/gen_nodes/defaults/main.yml | 1 + playbooks/roles/gen_nodes/tasks/main.yml | 36 + playbooks/roles/linux-mirror/tasks/main.yml | 1 + playbooks/roles/vllm/defaults/main.yml | 17 + .../vllm/tasks/configure-docker-data.yml | 187 +++++ .../roles/vllm/tasks/deploy-bare-metal.yml | 227 ++++++ playbooks/roles/vllm/tasks/deploy-docker.yml | 105 +++ .../vllm/tasks/deploy-production-stack.yml | 252 +++++++ .../vllm/tasks/install-deps/debian/main.yml | 70 ++ .../roles/vllm/tasks/install-deps/main.yml | 12 + .../vllm/tasks/install-deps/redhat/main.yml | 108 +++ .../vllm/tasks/install-deps/suse/main.yml | 50 ++ playbooks/roles/vllm/tasks/main.yml | 591 +++++++++++++++ playbooks/roles/vllm/tasks/setup-helm.yml | 33 + .../roles/vllm/tasks/setup-kubernetes.yml | 236 ++++++ .../roles/vllm/templates/vllm-benchmark.py.j2 | 152 ++++ .../vllm/templates/vllm-container.service.j2 | 80 ++ .../vllm/templates/vllm-deployment.yaml.j2 | 94 +++ .../vllm/templates/vllm-helm-values.yaml.j2 | 63 ++ .../vllm-prod-stack-official-values.yaml.j2 | 154 ++++ .../templates/vllm-upstream-values.yaml.j2 | 151 ++++ .../roles/vllm/templates/vllm-visualize.py.j2 | 434 +++++++++++ playbooks/vllm.yml | 11 + scripts/vllm-quick-test.sh | 167 +++++ scripts/vllm-status-summary.py | 404 ++++++++++ workflows/Makefile | 4 + workflows/vllm/Kconfig | 699 ++++++++++++++++++ workflows/vllm/Makefile | 118 +++ workflows/vllm/README.md | 322 ++++++++ 40 files changed, 5074 insertions(+), 2 deletions(-) create mode 100644 defconfigs/vllm create mode 100644 defconfigs/vllm-production-stack-cpu create mode 100644 defconfigs/vllm-quick-test create mode 100644 playbooks/roles/gen_hosts/templates/workflows/vllm.j2 create mode 100644 playbooks/roles/vllm/defaults/main.yml create mode 100644 playbooks/roles/vllm/tasks/configure-docker-data.yml create mode 100644 playbooks/roles/vllm/tasks/deploy-bare-metal.yml create mode 100644 playbooks/roles/vllm/tasks/deploy-docker.yml create mode 100644 playbooks/roles/vllm/tasks/deploy-production-stack.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/debian/main.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/main.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/redhat/main.yml create mode 100644 playbooks/roles/vllm/tasks/install-deps/suse/main.yml create mode 100644 playbooks/roles/vllm/tasks/main.yml create mode 100644 playbooks/roles/vllm/tasks/setup-helm.yml create mode 100644 playbooks/roles/vllm/tasks/setup-kubernetes.yml create mode 100644 playbooks/roles/vllm/templates/vllm-benchmark.py.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-container.service.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-deployment.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-helm-values.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-prod-stack-official-values.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-upstream-values.yaml.j2 create mode 100644 playbooks/roles/vllm/templates/vllm-visualize.py.j2 create mode 100644 playbooks/vllm.yml create mode 100755 scripts/vllm-quick-test.sh create mode 100755 scripts/vllm-status-summary.py create mode 100644 workflows/vllm/Kconfig create mode 100644 workflows/vllm/Makefile create mode 100644 workflows/vllm/README.md
.gitignore +1 -0
@@ -91,6 +91,7 @@ playbooks/roles/linux-mirror/linux-mirror-systemd/mirrors.yaml workflows/selftests/results/ workflows/minio/results/ +workflows/vllm/results/ workflows/linux/refs/default/Kconfig.linus workflows/linux/refs/default/Kconfig.next
PROMPTS.md +31 -0
@@ -5,6 +5,37 @@ and example commits and their outcomes, and notes by users of the AI agent grading. It is also instructive for humans to learn how to use generative AI to easily extend kdevops for their own needs. +## Adding new AI/ML workflows + +### Adding vLLM Production Stack workflow + +**Prompt:** +I have placed in ../production-stack/ the https://github.com/vllm-project/production-stack.git +project. Familiarize yourself with it and then add support for as a new +I workflow, other than Milvus AI on kdevops. + +**AI:** Claude Code +**Commit:** TBD +**Result:** Tough +**Grading:** 50% + +**Notes:** + +Adding just vllm was fairly trivial. However the production stack project +lacked any clear documentation about what docker container image could be +used for CPU support, and all docker container images had one or another +obscure issue. + +So while getting the vllm and the production stack generally supported was +faily trivial, the lack of proper docs make it hard to figure out exactly what +to do. + +Fortunately the implementation correctly identified the need for Kubernetes +orchestration, included support for various deployment options (Minikube vs +existing clusters), and integrated monitoring with Prometheus/Grafana. The +workflow supports A/B testing, multiple routing algorithms, and performance +benchmarking capabilities. + ## Extending existing Linux kernel selftests Below are a set of example prompts / result commits of extending existing
README.md +24 -2
@@ -285,10 +285,30 @@ For detailed documentation and demo results, see the ### AI workflow -kdevops now supports AI/ML system benchmarking, starting with vector databases -like Milvus. Similar to fstests, you can quickly set up and benchmark AI +kdevops now supports AI/ML system benchmarking, including vector databases +and LLM serving infrastructure. Similar to fstests, you can quickly set up and benchmark AI infrastructure with just a few commands: +#### vLLM Production Stack +Deploy and benchmark large language models using the vLLM Production Stack: + +```bash +make defconfig-vllm +make bringup +make vllm +make vllm-benchmark +``` + +The vLLM workflow provides: +- **Production LLM Deployment**: Kubernetes-based vLLM serving with Helm +- **Request Routing**: Multiple algorithms (round-robin, session affinity, prefix-aware) +- **Observability**: Integrated Prometheus and Grafana monitoring +- **Performance Features**: Prefix caching, chunked prefill, KV cache offloading +- **A/B Testing**: Compare different model configurations + +#### Milvus Vector Database +Benchmark vector database performance for AI applications: + ```bash make defconfig-ai-milvus-docker make bringup
@@ -303,6 +323,7 @@ The AI workflow supports: - **Demo Results**: View actual benchmark HTML reports and performance visualizations For details and demo results, see: +- [kdevops vLLM workflow documentation](workflows/vllm/) - [kdevops AI workflow documentation](docs/ai/README.md) - [Milvus performance demo results](docs/ai/vector-databases/milvus.md#demo-results)
@@ -358,6 +379,7 @@ want to just use the kernel that comes with your Linux distribution. * [kdevops selftests docs](docs/selftests.md) * [kdevops reboot-limit docs](docs/reboot-limit.md) * [kdevops AI workflow docs](docs/ai/README.md) + * [kdevops vLLM workflow docs](workflows/vllm/) # kdevops general documentation
defconfigs/vllm new file +40 -0
@@ -0,0 +1,40 @@ +# vLLM configuration with Latest Docker deployment +CONFIG_KDEVOPS_FIRST_RUN=n +CONFIG_LIBVIRT=y +CONFIG_LIBVIRT_VCPUS=8 +CONFIG_LIBVIRT_MEM_32G=y + +# Workflow configuration +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOWS_TESTS=y +CONFIG_WORKFLOWS_LINUX_TESTS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_DEDICATE_VLLM=y + +# vLLM specific configuration +CONFIG_VLLM_LATEST_DOCKER=y +CONFIG_VLLM_K8S_MINIKUBE=y +CONFIG_VLLM_HELM_RELEASE_NAME="vllm" +CONFIG_VLLM_HELM_NAMESPACE="vllm-system" +CONFIG_VLLM_MODEL_URL="facebook/opt-125m" +CONFIG_VLLM_MODEL_NAME="opt-125m" +CONFIG_VLLM_REPLICA_COUNT=1 +CONFIG_VLLM_USE_CPU_INFERENCE=y +CONFIG_VLLM_REQUEST_CPU=8 +CONFIG_VLLM_REQUEST_MEMORY="32Gi" +CONFIG_VLLM_REQUEST_GPU=0 +CONFIG_VLLM_MAX_MODEL_LEN=2048 +CONFIG_VLLM_DTYPE="float32" +CONFIG_VLLM_TENSOR_PARALLEL_SIZE=1 +CONFIG_VLLM_ROUTER_ENABLED=y +CONFIG_VLLM_ROUTER_ROUND_ROBIN=y +CONFIG_VLLM_OBSERVABILITY_ENABLED=y +CONFIG_VLLM_GRAFANA_PORT=3000 +CONFIG_VLLM_PROMETHEUS_PORT=9090 +CONFIG_VLLM_API_PORT=8000 +CONFIG_VLLM_API_KEY="" +CONFIG_VLLM_HF_TOKEN="" +CONFIG_VLLM_BENCHMARK_ENABLED=y +CONFIG_VLLM_BENCHMARK_DURATION=60 +CONFIG_VLLM_BENCHMARK_CONCURRENT_USERS=10 +CONFIG_VLLM_BENCHMARK_RESULTS_DIR="/data/vllm-benchmark"
defconfigs/vllm-production-stack-cpu new file +45 -0
45 lines not on this page · raw message
defconfigs/vllm-quick-test new file +42 -0
42 lines not on this page · raw message
kconfigs/Kconfig.libvirt +3 -0
@@ -335,6 +335,7 @@ config LIBVIRT_LARGE_CPU choice prompt "Guest vCPUs" + default LIBVIRT_VCPUS_64 if KDEVOPS_WORKFLOW_DEDICATE_VLLM default LIBVIRT_VCPUS_8 config LIBVIRT_VCPUS_2
@@ -408,6 +409,7 @@ config LIBVIRT_VCPUS_COUNT choice prompt "How much GiB memory to use per guest" + default LIBVIRT_MEM_64G if KDEVOPS_WORKFLOW_DEDICATE_VLLM default LIBVIRT_MEM_4G config LIBVIRT_MEM_2G
@@ -478,6 +480,7 @@ config LIBVIRT_MEM_MB config LIBVIRT_IMAGE_SIZE string "VM image size" output yaml + default "100G" if KDEVOPS_WORKFLOW_DEDICATE_VLLM default "20G" depends on GUESTFS help
kconfigs/workflows/Kconfig +28 -0
@@ -233,6 +233,14 @@ config KDEVOPS_WORKFLOW_DEDICATE_AI This will dedicate your configuration to running only the AI workflow for vector database performance testing. +config KDEVOPS_WORKFLOW_DEDICATE_VLLM + bool "vllm" + select KDEVOPS_WORKFLOW_ENABLE_VLLM + help + This will dedicate your configuration to running only the + vLLM Production Stack workflow for deploying and benchmarking + large language models with Kubernetes. + config KDEVOPS_WORKFLOW_DEDICATE_MINIO bool "minio" select KDEVOPS_WORKFLOW_ENABLE_MINIO
@@ -265,6 +273,7 @@ config KDEVOPS_WORKFLOW_NAME default "mmtests" if KDEVOPS_WORKFLOW_DEDICATE_MMTESTS default "fio-tests" if KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS default "ai" if KDEVOPS_WORKFLOW_DEDICATE_AI + default "vllm" if KDEVOPS_WORKFLOW_DEDICATE_VLLM default "minio" if KDEVOPS_WORKFLOW_DEDICATE_MINIO default "build-linux" if KDEVOPS_WORKFLOW_DEDICATE_BUILD_LINUX
@@ -395,6 +404,14 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_AI Select this option if you want to provision AI benchmarks on a single target node for by-hand testing. +config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_VLLM + bool "vllm" + select KDEVOPS_WORKFLOW_ENABLE_VLLM + depends on LIBVIRT || TERRAFORM_PRIVATE_NET + help + Select this option if you want to provision vLLM Production Stack + on a single target node for by-hand testing and development. + endif # !WORKFLOWS_DEDICATED_WORKFLOW config KDEVOPS_WORKFLOW_ENABLE_FSTESTS
@@ -530,6 +547,17 @@ source "workflows/ai/Kconfig" endmenu endif # KDEVOPS_WORKFLOW_ENABLE_AI +config KDEVOPS_WORKFLOW_ENABLE_VLLM + bool + output yaml + default y if KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_VLLM || KDEVOPS_WORKFLOW_DEDICATE_VLLM + +if KDEVOPS_WORKFLOW_ENABLE_VLLM +menu "Configure and run vLLM Production Stack" +source "workflows/vllm/Kconfig" +endmenu +endif # KDEVOPS_WORKFLOW_ENABLE_VLLM + config KDEVOPS_WORKFLOW_ENABLE_MINIO bool output yaml
playbooks/roles/gen_hosts/defaults/main.yml +1 -0
@@ -30,6 +30,7 @@ kdevops_workflow_enable_sysbench: false kdevops_workflow_enable_fio_tests: false kdevops_workflow_enable_mmtests: false kdevops_workflow_enable_ai: false +kdevops_workflow_enable_vllm: false workflows_reboot_limit: false kdevops_use_declared_hosts: false
playbooks/roles/gen_hosts/tasks/main.yml +15 -0
@@ -270,6 +270,21 @@ - ansible_hosts_template.stat.exists - not kdevops_use_declared_hosts|default(false)|bool +- name: Generate the Ansible hosts file for a dedicated vLLM setup + tags: ['hosts'] + ansible.builtin.template: + src: "{{ kdevops_hosts_template }}" + dest: "{{ ansible_cfg_inventory }}" + force: true + trim_blocks: True + lstrip_blocks: True + mode: '0644' + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_vllm|default(false)|bool + - ansible_hosts_template.stat.exists + - not kdevops_use_declared_hosts|default(false)|bool + - name: Verify if final host file exists ansible.builtin.stat: path: "{{ ansible_cfg_inventory }}"
playbooks/roles/gen_hosts/templates/workflows/vllm.j2 new file +65 -0
65 lines not on this page · raw message
playbooks/roles/gen_nodes/defaults/main.yml +1 -0
@@ -13,6 +13,7 @@ kdevops_workflow_enable_selftests: false kdevops_workflow_enable_mmtests: false kdevops_workflow_enable_fio_tests: false kdevops_workflow_enable_ai: false +kdevops_workflow_enable_vllm: false kdevops_nfsd_enable: false kdevops_smbd_enable: false kdevops_krb5_enable: false
playbooks/roles/gen_nodes/tasks/main.yml +36 -0
@@ -790,6 +790,42 @@ - ai_enabled_section_types is defined - ai_enabled_section_types | length > 0 +# vLLM Production Stack workflow nodes + +- name: Generate the vLLM kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template + tags: ['hosts'] + vars: + node_template: "{{ kdevops_nodes_template | basename }}" + nodes: "{{ [kdevops_host_prefix + '-vllm'] }}" + all_generic_nodes: "{{ [kdevops_host_prefix + '-vllm'] }}" + ansible.builtin.template: + src: "{{ node_template }}" + dest: "{{ topdir_path }}/{{ kdevops_nodes }}" + force: true + mode: "0644" + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_vllm + - ansible_nodes_template.stat.exists + - not kdevops_baseline_and_dev + +- name: Generate the vLLM kdevops nodes file with dev hosts using {{ kdevops_nodes_template }} as jinja2 source template + tags: ['hosts'] + vars: + node_template: "{{ kdevops_nodes_template | basename }}" + nodes: "{{ [kdevops_host_prefix + '-vllm', kdevops_host_prefix + '-vllm-dev'] }}" + all_generic_nodes: "{{ [kdevops_host_prefix + '-vllm', kdevops_host_prefix + '-vllm-dev'] }}" + ansible.builtin.template: + src: "{{ node_template }}" + dest: "{{ topdir_path }}/{{ kdevops_nodes }}" + force: true + mode: "0644" + when: + - kdevops_workflows_dedicated_workflow + - kdevops_workflow_enable_vllm + - ansible_nodes_template.stat.exists + - kdevops_baseline_and_dev + # MinIO S3 Storage Testing workflow nodes # Multi-filesystem MinIO configurations
playbooks/roles/linux-mirror/tasks/main.yml +1 -0
@@ -259,6 +259,7 @@ - not install_only_git_daemon|bool tags: ["nfs", "mirror"] + - name: Check if /mirror is already exported become: true ansible.builtin.command:
playbooks/roles/vllm/defaults/main.yml new file +17 -0
@@ -0,0 +1,17 @@ +--- +# vLLM role default variables +vllm_production_stack_repo: https://github.com/vllm-project/production-stack.git +vllm_production_stack_version: main +vllm_local_path: /data/vllm +vllm_results_dir: "{{ vllm_benchmark_results_dir | default('/data/vllm-benchmark') }}" + +# Default image versions that are known to work +# Note: vLLM v0.10.2+ is recommended for Production Stack with CPU inference +# - v0.6.5+ required for --no-enable-prefix-caching flag support +# - v0.6.5-v0.6.6 have CPU inference bugs (NotImplementedError in is_async_output_supported) +# - v0.10.2 fixes all CPU inference issues and is production ready +# For CPU inference, use openeuler/vllm-cpu instead of vllm/vllm-openai +vllm_engine_image_repo: "{{ 'openeuler/vllm-cpu' if vllm_use_cpu_inference | default(false) else 'vllm/vllm-openai' }}" +vllm_engine_image_tag: "{{ 'latest' if vllm_use_cpu_inference | default(false) else 'v0.10.2' }}" +vllm_prod_stack_router_image: ghcr.io/vllm-project/production-stack/router +vllm_prod_stack_router_tag: latest
playbooks/roles/vllm/tasks/configure-docker-data.yml new file +187 -0
187 lines not on this page · raw message
playbooks/roles/vllm/tasks/deploy-bare-metal.yml new file +227 -0
227 lines not on this page · raw message
playbooks/roles/vllm/tasks/deploy-docker.yml new file +105 -0
105 lines not on this page · raw message
playbooks/roles/vllm/tasks/deploy-production-stack.yml new file +252 -0
252 lines not on this page · raw message
playbooks/roles/vllm/tasks/install-deps/debian/main.yml new file +70 -0
70 lines not on this page · raw message
playbooks/roles/vllm/tasks/install-deps/main.yml new file +12 -0
@@ -0,0 +1,12 @@ +--- +- ansible.builtin.include_role: + name: pkg + +# tasks to install dependencies for vLLM +- name: vLLM distribution specific setup + ansible.builtin.import_tasks: tasks/install-deps/debian/main.yml + when: ansible_facts['os_family']|lower == 'debian' +- ansible.builtin.import_tasks: tasks/install-deps/suse/main.yml + when: ansible_facts['os_family']|lower == 'suse' +- ansible.builtin.import_tasks: tasks/install-deps/redhat/main.yml + when: ansible_facts['os_family']|lower == 'redhat'
playbooks/roles/vllm/tasks/install-deps/redhat/main.yml new file +108 -0
108 lines not on this page · raw message
playbooks/roles/vllm/tasks/install-deps/suse/main.yml new file +50 -0
50 lines not on this page · raw message
playbooks/roles/vllm/tasks/main.yml new file +591 -0
591 lines not on this page · raw message
playbooks/roles/vllm/tasks/setup-helm.yml new file +33 -0
@@ -0,0 +1,33 @@ +--- +# Setup Helm for vLLM deployment +- name: Setup Helm + block: + - name: Check if helm exists + ansible.builtin.stat: + path: /usr/local/bin/helm + register: helm_stat + + - name: Download Helm installer script + when: not helm_stat.stat.exists + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 + dest: /tmp/get-helm-3.sh + mode: '0755' + + - name: Install Helm + when: not helm_stat.stat.exists + ansible.builtin.command: + cmd: /tmp/get-helm-3.sh + environment: + HELM_INSTALL_DIR: /usr/local/bin + become: yes + + - name: Verify Helm installation + ansible.builtin.command: + cmd: helm version --short + register: helm_version + changed_when: false + + - name: Display Helm version + debug: + msg: "Helm version: {{ helm_version.stdout }}"
playbooks/roles/vllm/tasks/setup-kubernetes.yml new file +236 -0
236 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-benchmark.py.j2 new file +152 -0
152 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-container.service.j2 new file +80 -0
80 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-deployment.yaml.j2 new file +94 -0
94 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-helm-values.yaml.j2 new file +63 -0
63 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-prod-stack-official-values.yaml.j2 new file +154 -0
154 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-upstream-values.yaml.j2 new file +151 -0
130 lines not on this page · raw message
playbooks/roles/vllm/templates/vllm-visualize.py.j2 new file +434 -0
434 lines not on this page · raw message
scripts/vllm-quick-test.sh new file +167 -0
167 lines not on this page · raw message
scripts/vllm-status-summary.py new file +404 -0
404 lines not on this page · raw message
workflows/vllm/Kconfig new file +699 -0
699 lines not on this page · raw message
workflows/vllm/Makefile new file +118 -0
118 lines not on this page · raw message
workflows/vllm/README.md new file +322 -0
322 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.51.0
Part of the diff is not shown here. View the raw message.
PATCH v2 2/4 vllm: Add DECLARE_HOSTS support for bare metal and existing infrastructure
In reply to Luis ChamberlainFollowing the pattern established by the MinIO workflow in commit 533be4c716d1 ("minio: add MinIO Warp S3 benchmarking with declared hosts support"), add DECLARE_HOSTS support to the vLLM workflow to enable testing on pre-existing infrastructure including bare metal servers with GPUs.
This enables users to leverage existing GPU infrastructure without requiring kdevops to provision new systems. Two new defconfigs are provided for different deployment scenarios.
New defconfigs:
1. defconfig-vllm-declared-hosts
- Bare metal deployment using Docker containers
- Targets single-node GPU servers
- Uses systemd service management for vLLM
- Configurable GPU type (nvidia-a100, etc.) and count
- Direct port 8000 access without Kubernetes overhead
- Suitable for direct hardware access scenarios
2. defconfig-vllm-production-stack-declared-hosts
- Production Stack deployment on existing Kubernetes clusters
- Full Production Stack with router and monitoring
- Autoscaling support (2-5 replicas)
- Grafana/Prometheus observability stack
- Suitable for production GPU clusters
Both configurations automatically:
- Set CONFIG_SKIP_BRINGUP=y to skip infrastructure provisioning
- Set CONFIG_KDEVOPS_USE_DECLARED_HOSTS=y for pre-existing systems
- Enable benchmarking for performance validation
- Support HuggingFace model deployment (default: facebook/opt-125m)
Implementation changes:
Bare-metal deployment improvements (deploy-bare-metal.yml):
- Remove legacy kubectl/minikube/helm installation for bare-metal
- Implement Docker image mirror fallback (try mirror, fall back to public)
- Replace handler-based service restart with direct systemd management
- Make config file creation optional (template may not exist)
- Support both Docker and Podman container runtimes
- Automatic GPU detection and container image selection (CPU vs GPU)
Main task routing (main.yml):
- Remove 260+ line legacy deployment block that was causing unwanted Kubernetes installation even with when: false due to tags override
- Change configure-docker-data.yml to only run for Kubernetes deployments
- Convert deployment method routing from import_tasks to include_tasks with apply parameter to properly respect when conditions and tags
- Add bare-metal specific conditions to benchmark tasks (skip kubectl port-forward, connect directly to port 8000)
- Add bare-metal specific conditions to monitoring tasks (skip Kubernetes service queries, show systemd journal instructions instead)
- Add new bare-metal monitoring info task with journalctl instructions
Cleanup support (cleanup-bare-metal.yml - NEW):
- Add vllm-cleanup target: Remove containers and systemd services
- Add vllm-cleanup-full target: Also remove kubectl/helm/minikube binaries
- Add vllm-cleanup-purge target: Complete purge including data directories
- Essential for declared hosts since 'make destroy' doesn't apply
Testing improvements (vllm-quick-test.sh):
- Detect CONFIG_KDEVOPS_USE_DECLARED_HOSTS for declared hosts mode
- Detect CONFIG_VLLM_BARE_METAL for deployment type
- Read actual hostnames from kdevops_declared_hosts in extra_vars.yaml
- Support comma-separated host lists for multiple declared hosts
- Skip kubectl port-forward setup for bare-metal deployments
- Direct connection to port 8000 for bare-metal API access
- Maintain backward compatibility with provisioned VMs
Makefile additions (workflows/vllm/Makefile):
- Add vllm-cleanup target for basic cleanup
- Add vllm-cleanup-full target for complete cleanup with binaries
- Add vllm-cleanup-purge target for purging all data
- Update help text for new cleanup targets
Dependency fixes (install-deps/debian/main.yml):
- Make kubectl/minikube installation conditional on deployment type
- Skip Kubernetes tools for bare-metal deployments
Example usage for bare metal GPU server:
make defconfig-vllm-declared-hosts DECLARE_HOSTS=gpu-server-01 make
make vllm # Deploy vLLM as systemd service make vllm-quick-test # Verify API endpoint make vllm-benchmark # Run performance benchmarks make vllm-cleanup # Clean up when done
Example usage for existing Kubernetes cluster:
make defconfig-vllm-production-stack-declared-hosts DECLARE_HOSTS=k8s-cluster make
make vllm # Deploy via Helm make vllm-status # Check deployment status make vllm-monitor # Access Grafana/Prometheus make vllm-cleanup # Clean up namespace
Key architectural decisions:
1. Avoid fragile hostvars access patterns - use configuration variables that are globally accessible across execution contexts (localhost vs target nodes)
2. Use include_tasks instead of import_tasks for conditional execution since import_tasks is static and evaluated at parse time, while include_tasks is dynamic and respects when conditions
3. Apply tags properly to included tasks using the apply parameter, otherwise tags only apply to the include statement itself
4. Implement graceful fallbacks for infrastructure dependencies (Docker mirror → public registry, Kubernetes → bare-metal)
5. Provide cleanup targets for declared hosts since standard 'make destroy' only applies to provisioned infrastructure
This implementation mirrors the approach used for MinIO declared hosts support and enables vLLM testing on any infrastructure where GPUs are available, whether bare metal servers or existing Kubernetes clusters.
--- defconfigs/vllm-declared-hosts | 53 +++ .../vllm-production-stack-declared-hosts | 66 ++++ .../roles/vllm/tasks/cleanup-bare-metal.yml | 110 +++++++ .../roles/vllm/tasks/deploy-bare-metal.yml | 116 +++++-- .../vllm/tasks/install-deps/debian/main.yml | 4 +- playbooks/roles/vllm/tasks/main.yml | 311 +++--------------- playbooks/vllm.yml | 1 + scripts/vllm-quick-test.sh | 58 +++- workflows/vllm/Makefile | 26 +- 9 files changed, 421 insertions(+), 324 deletions(-) create mode 100644 defconfigs/vllm-declared-hosts create mode 100644 defconfigs/vllm-production-stack-declared-hosts create mode 100644 playbooks/roles/vllm/tasks/cleanup-bare-metal.yml
defconfigs/vllm-declared-hosts new file +53 -0
@@ -0,0 +1,53 @@ +# +# vLLM with declared hosts (bare metal or pre-existing infrastructure) +# +# Automatically generated file; DO NOT EDIT. +# kdevops 5.0.2 Configuration +# +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOWS_TESTS=y +CONFIG_WORKFLOWS_LINUX_TESTS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_DEDICATE_VLLM=y + +# Skip bringup for declared hosts +CONFIG_SKIP_BRINGUP=y +CONFIG_KDEVOPS_USE_DECLARED_HOSTS=y + +# vLLM specific configuration - Using bare metal deployment for declared hosts +CONFIG_VLLM_BARE_METAL=y +CONFIG_VLLM_BARE_METAL_USE_CONTAINER=y +CONFIG_VLLM_BARE_METAL_DOCKER=y +CONFIG_VLLM_BARE_METAL_SERVICE_NAME="vllm" +CONFIG_VLLM_BARE_METAL_DATA_DIR="/var/lib/vllm" +CONFIG_VLLM_BARE_METAL_LOG_DIR="/var/log/vllm" + +# GPU configuration for declared hosts +CONFIG_VLLM_BARE_METAL_DECLARE_HOST_GPU_TYPE="nvidia-a100" +CONFIG_VLLM_BARE_METAL_DECLARE_HOST_GPU_COUNT=1 + +# Model configuration +CONFIG_VLLM_MODEL_URL="facebook/opt-125m" +CONFIG_VLLM_MODEL_NAME="opt-125m" + +# Engine configuration +CONFIG_VLLM_VERSION_STABLE=y +CONFIG_VLLM_ENGINE_IMAGE_TAG="v0.10.2" +CONFIG_VLLM_REQUEST_CPU=8 +CONFIG_VLLM_REQUEST_MEMORY="16Gi" +CONFIG_VLLM_REQUEST_GPU=1 +CONFIG_VLLM_MAX_MODEL_LEN=2048 +CONFIG_VLLM_DTYPE="auto" +CONFIG_VLLM_GPU_MEMORY_UTILIZATION="0.9" +CONFIG_VLLM_TENSOR_PARALLEL_SIZE=1 + +# API configuration +CONFIG_VLLM_API_PORT=8000 +CONFIG_VLLM_API_KEY="" +CONFIG_VLLM_HF_TOKEN="" + +# Benchmarking +CONFIG_VLLM_BENCHMARK_ENABLED=y +CONFIG_VLLM_BENCHMARK_DURATION=60 +CONFIG_VLLM_BENCHMARK_CONCURRENT_USERS=10 +CONFIG_VLLM_BENCHMARK_RESULTS_DIR="/data/vllm-benchmark"
defconfigs/vllm-production-stack-declared-hosts new file +66 -0
66 lines not on this page · raw message
playbooks/roles/vllm/tasks/cleanup-bare-metal.yml new file +110 -0
110 lines not on this page · raw message
playbooks/roles/vllm/tasks/deploy-bare-metal.yml +85 -31
160 lines not on this page · raw message
playbooks/roles/vllm/tasks/install-deps/debian/main.yml +2 -2
@@ -60,11 +60,11 @@ state: present tags: ["vllm", "deps"] -- name: Add kdevops user to docker group +- name: Add current user to docker group become: true become_method: sudo ansible.builtin.user: - name: kdevops + name: "{{ ansible_user_id }}" groups: docker append: yes tags: ["vllm", "deps", "docker-config"]
playbooks/roles/vllm/tasks/main.yml +41 -270
370 lines not on this page · raw message
playbooks/vllm.yml +1 -0
@@ -8,4 +8,5 @@ roles: - role: create_data_partition tags: ["data_partition"] + when: data_device is defined and data_device != None and data_device | length > 0 - role: vllm
scripts/vllm-quick-test.sh +41 -17
78 lines not on this page · raw message
workflows/vllm/Makefile +22 -4
@@ -44,6 +44,22 @@ vllm-cleanup: --tags vars,vllm-cleanup \ --extra-vars=@./extra_vars.yaml +vllm-cleanup-full: + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + --limit 'baseline:dev' \ + playbooks/vllm.yml \ + --tags vars,vllm-cleanup \ + --extra-vars=@./extra_vars.yaml \ + --extra-vars='{"vllm_cleanup_remove_binaries": true}' + +vllm-cleanup-purge: + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + --limit 'baseline:dev' \ + playbooks/vllm.yml \ + --tags vars,vllm-cleanup \ + --extra-vars=@./extra_vars.yaml \ + --extra-vars='{"vllm_cleanup_remove_binaries": true, "vllm_cleanup_remove_data": true}' + vllm-results: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ --limit 'baseline:dev' \
@@ -102,17 +118,19 @@ vllm-quick-test: vllm-help-menu: @echo "vLLM Production Stack options:" - @echo "vllm - Deploy vLLM stack to Kubernetes" - @echo "vllm-deploy - Deploy vLLM stack to Kubernetes (same as vllm)" + @echo "vllm - Deploy vLLM stack" + @echo "vllm-deploy - Deploy vLLM stack (same as vllm)" @echo "vllm-benchmark - Run performance benchmarks and collect results" @echo "vllm-monitor - Display monitoring dashboard URLs" @echo "vllm-status - Check detailed deployment status (verbose)" @echo "vllm-status-simplified - Check deployment status (clean summary)" @echo "vllm-quick-test - Quick API test (baseline + dev if enabled)" @echo "vllm-teardown - Gracefully remove vLLM deployment" - @echo "vllm-cleanup - Force delete all vLLM resources (use when stuck)" + @echo "vllm-cleanup - Remove vLLM containers/services (keep binaries & data)" + @echo "vllm-cleanup-full - Remove everything including binaries (kubectl, helm, minikube)" + @echo "vllm-cleanup-purge - PURGE ALL: Remove binaries + all data directories" @echo "vllm-results - Collect and visualize benchmark results" @echo "vllm-visualize-results - Generate HTML visualization of benchmark results" @echo "" -.PHONY: vllm vllm-deploy vllm-benchmark vllm-monitor vllm-status vllm-status-simplified vllm-quick-test vllm-teardown vllm-cleanup vllm-results vllm-visualize-results vllm-help-menu +.PHONY: vllm vllm-deploy vllm-benchmark vllm-monitor vllm-status vllm-status-simplified vllm-quick-test vllm-teardown vllm-cleanup vllm-cleanup-full vllm-cleanup-purge vllm-results vllm-visualize-results vllm-help-menu
Signature · 1 line
2.51.0
PATCH v2 3/4 vllm: Add GPU-enabled defconfig with compatibility documentation
In reply to Luis ChamberlainThis introduces GPU support for vLLM deployments on declared hosts with comprehensive hardware compatibility documentation for both NVIDIA and AMD GPUs.
The new defconfig enables GPU-accelerated inference by disabling CPU-only mode and configuring GPU device passthrough. To prevent cryptic deployment failures, the playbook now validates kernel CONFIG_VETH support before starting minikube, as Docker networking requires virtual ethernet devices. The check attempts to load the veth module if built as CONFIG_VETH=m and provides clear error messages when the kernel lacks required networking support.
GPU compatibility documentation covers both NVIDIA CUDA and AMD ROCm platforms, addressing a critical limitation in vLLM v0.10.x which requires FlashInfer CUDA kernels with compute capability >= 8.0. Older NVIDIA GPUs (Tesla T4, V100, P100) fail with resource errors because FlashInfer's fused attention kernels exceed the hardware limits of earlier architectures. AMD GPUs use different criteria based on GFX architecture versions rather than compute capability, with the MI300X providing the best AMD support and W7900 requiring Flash Attention to be disabled during build.
The documentation provides clear workarounds for incompatible hardware including CPU inference mode, older vLLM versions, and hardware upgrade paths. Commands for verifying GPU compatibility on both platforms are included.
This goes tested with Lambda Labs lambdalabs-gpu-1x-a10.
--- .../vllm-production-stack-declared-hosts-gpu | 118 +++++++++++ .../vllm/tasks/install-deps/debian/main.yml | 33 ++- .../roles/vllm/tasks/setup-kubernetes.yml | 99 +++++++-- workflows/vllm/README.md | 200 ++++++++++++++++++ 4 files changed, 435 insertions(+), 15 deletions(-) create mode 100644 defconfigs/vllm-production-stack-declared-hosts-gpu
defconfigs/vllm-production-stack-declared-hosts-gpu new file +118 -0
@@ -0,0 +1,118 @@ +# +# vLLM Production Stack with declared hosts - GPU ENABLED +# +# ============================================================================ +# NVIDIA GPU COMPATIBILITY (CUDA): +# ============================================================================ +# +# vLLM v0.10.x uses FlashInfer CUDA kernels that require NVIDIA GPUs with +# compute capability >= 8.0. Older NVIDIA GPUs will fail with: +# "RuntimeError: TopPSamplingFromProbs failed with error code +# too many resources requested for launch" +# +# INCOMPATIBLE NVIDIA GPUs (compute capability < 8.0): +# - Tesla T4 (7.5) - WILL NOT WORK with vLLM v0.10.x+ +# - Tesla V100 (7.0) +# - Tesla P100 (6.0) +# - GTX 1080 Ti (6.1) +# +# COMPATIBLE NVIDIA GPUs (compute capability >= 8.0): +# - A100 (8.0) +# - A10G (8.6) +# - A30 (8.0) +# - H100 (9.0) +# - RTX 3090 (8.6) +# - RTX 4090 (8.9) +# +# ============================================================================ +# AMD GPU COMPATIBILITY (ROCm): +# ============================================================================ +# +# AMD GPUs use ROCm instead of CUDA and have DIFFERENT requirements. +# vLLM supports AMD GPUs with ROCm 6.2+: +# +# FULLY COMPATIBLE AMD GPUs: +# - MI300X (gfx942) - BEST AMD support, vLLM V1 optimized +# - MI250/MI250X (gfx90a) - Production ready +# - MI210 (gfx90a) - Production ready +# - W7900 (gfx1100) - Supported but requires BUILD_FA=0 +# - RX 7900 XTX/XT (gfx1100) - Supported but requires BUILD_FA=0 +# +# Note: AMD uses GFX architecture versions, not compute capability numbers. +# W7900 and RX 7900 series require disabling Flash Attention during +# vLLM build due to RDNA 3 architecture limitations. +# +# ============================================================================ +# WORKAROUNDS for incompatible NVIDIA GPUs: +# ============================================================================ +# 1. Use an older vLLM version (v0.6.x or earlier) +# 2. Use CPU inference mode (vllm-production-stack-declared-hosts) +# 3. Use a compatible NVIDIA GPU (CC >= 8.0) or AMD GPU (see above) +# +# Automatically generated file; DO NOT EDIT. +# kdevops 5.0.2 Configuration +# +CONFIG_WORKFLOWS=y +CONFIG_WORKFLOWS_TESTS=y +CONFIG_WORKFLOWS_LINUX_TESTS=y +CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y +CONFIG_KDEVOPS_WORKFLOW_DEDICATE_VLLM=y + +# Skip bringup for declared hosts +CONFIG_SKIP_BRINGUP=y +CONFIG_KDEVOPS_USE_DECLARED_HOSTS=y + +# vLLM Production Stack with Kubernetes on declared hosts +CONFIG_VLLM_PRODUCTION_STACK=y +CONFIG_VLLM_K8S_MINIKUBE=y +CONFIG_VLLM_VERSION_STABLE=y +CONFIG_VLLM_ENGINE_IMAGE_TAG="v0.10.2" +CONFIG_VLLM_HELM_RELEASE_NAME="vllm-prod" +CONFIG_VLLM_HELM_NAMESPACE="vllm-system" + +# Production Stack components +CONFIG_VLLM_PROD_STACK_REPO="https://vllm-project.github.io/production-stack" +CONFIG_VLLM_PROD_STACK_CHART_VERSION="latest" +CONFIG_VLLM_PROD_STACK_ROUTER_IMAGE="ghcr.io/vllm-project/production-stack/router" +CONFIG_VLLM_PROD_STACK_ROUTER_TAG="latest" +CONFIG_VLLM_PROD_STACK_ENABLE_MONITORING=y +CONFIG_VLLM_PROD_STACK_ENABLE_AUTOSCALING=y +CONFIG_VLLM_PROD_STACK_MIN_REPLICAS=2 +CONFIG_VLLM_PROD_STACK_MAX_REPLICAS=5 +CONFIG_VLLM_PROD_STACK_TARGET_GPU_UTILIZATION=80 + +# Model configuration +CONFIG_VLLM_MODEL_URL="facebook/opt-125m" +CONFIG_VLLM_MODEL_NAME="opt-125m" + +# GPU configuration - EXPLICITLY DISABLED CPU INFERENCE +# CONFIG_VLLM_USE_CPU_INFERENCE is not set +CONFIG_VLLM_REQUEST_GPU=1 +CONFIG_VLLM_GPU_TYPE="" +CONFIG_VLLM_GPU_MEMORY_UTILIZATION="0.5" +CONFIG_VLLM_TENSOR_PARALLEL_SIZE=1 + +# Engine configuration for GPU +CONFIG_VLLM_REPLICA_COUNT=1 +CONFIG_VLLM_REQUEST_CPU=8 +CONFIG_VLLM_REQUEST_MEMORY="16Gi" +CONFIG_VLLM_MAX_MODEL_LEN=1024 +CONFIG_VLLM_DTYPE="auto" + +# Router and observability +CONFIG_VLLM_ROUTER_ENABLED=y +CONFIG_VLLM_ROUTER_ROUND_ROBIN=y +CONFIG_VLLM_OBSERVABILITY_ENABLED=y +CONFIG_VLLM_GRAFANA_PORT=3000 +CONFIG_VLLM_PROMETHEUS_PORT=9090 + +# API configuration +CONFIG_VLLM_API_PORT=8000 +CONFIG_VLLM_API_KEY="" +CONFIG_VLLM_HF_TOKEN="" + +# Benchmarking +CONFIG_VLLM_BENCHMARK_ENABLED=y +CONFIG_VLLM_BENCHMARK_DURATION=60 +CONFIG_VLLM_BENCHMARK_CONCURRENT_USERS=10 +CONFIG_VLLM_BENCHMARK_RESULTS_DIR="/data/vllm-benchmark"
playbooks/roles/vllm/tasks/install-deps/debian/main.yml +32 -1
@@ -6,7 +6,16 @@ update_cache: true tags: vllm -- name: Install vLLM system dependencies +- name: Check if docker-ce is already installed + become: true + become_method: sudo + ansible.builtin.command: dpkg -l docker-ce + register: docker_ce_check + failed_when: false + changed_when: false + tags: ["vllm", "deps"] + +- name: Install vLLM system dependencies (with docker.io if docker-ce not present) become: true become_method: sudo ansible.builtin.apt:
@@ -25,6 +34,28 @@ - conntrack state: present update_cache: true + when: docker_ce_check.rc != 0 + tags: ["vllm", "deps"] + +- name: Install vLLM system dependencies (without docker.io when docker-ce present) + become: true + become_method: sudo + ansible.builtin.apt: + name: + - git + - curl + - wget + - python3 + - python3-venv + - ca-certificates + - gnupg + - lsb-release + - apt-transport-https + - iptables + - conntrack + state: present + update_cache: true + when: docker_ce_check.rc == 0 tags: ["vllm", "deps"] - name: Install Python development dependencies
playbooks/roles/vllm/tasks/setup-kubernetes.yml +85 -14
133 lines not on this page · raw message
workflows/vllm/README.md +200 -0
206 lines not on this page · raw message
Signature · 1 line
2.51.0
PATCH v2 4/4 defconfigs: Add composable fragments for Lambda Labs vLLM deployment
In reply to Luis ChamberlainThis introduces a fragment-based approach to defconfig composition, allowing users to combine infrastructure provisioning with workflow configurations.
Two new config fragments are added to defconfigs/configs/:
- lambdalabs-gpu-1x-a10.config: Terraform configuration for Lambda Labs A10 GPU instance provisioning with automatic region inference and SSH key generation.
- vllm-production-stack-gpu.config: vLLM production stack configuration with GPU-accelerated inference, Kubernetes deployment via minikube, monitoring, autoscaling, and benchmarking capabilities.
These fragments are combined into a new defconfig lambdalabs-vllm-gpu-1x-a10 which enables end-to-end deployment: provision a Lambda Labs A10 GPU instance ($0.75/hr) and deploy the vLLM production stack for LLM inference workloads.
The fragment approach allows users to compose configurations by combining infrastructure providers (Lambda Labs, AWS, Azure, bare metal) with different workflows (vLLM, fstests, blktests) without maintaining separate defconfigs for every combination.
Example usage:
make defconfig-lambdalabs-vllm-gpu-1x-a10
make bringup # Provisions Lambda Labs A10 GPU instance
make vllm # Deploys vLLM production stack
make vllm-benchmark # Run performance benchmarks
--- .../configs/lambdalabs-gpu-1x-a10.config | 8 ++ .../configs/vllm-production-stack-gpu.config | 61 +++++++++++ defconfigs/lambdalabs-vllm-gpu-1x-a10 | 103 ++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 defconfigs/configs/lambdalabs-gpu-1x-a10.config create mode 100644 defconfigs/configs/vllm-production-stack-gpu.config create mode 100644 defconfigs/lambdalabs-vllm-gpu-1x-a10
defconfigs/configs/lambdalabs-gpu-1x-a10.config new file +8 -0
@@ -0,0 +1,8 @@ +# Lambda Labs GPU 1x A10 instance configuration +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A10=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
defconfigs/configs/vllm-production-stack-gpu.config new file +61 -0
61 lines not on this page · raw message
defconfigs/lambdalabs-vllm-gpu-1x-a10 new file +103 -0
103 lines not on this page · raw message
Signature · 1 line
2.51.0
Quoted 24 lines · Luis Chamberlain
This adds initial vLLM and vLLM production stack support on kdevops.
This v2 series augments vLLM support for real CPUs on bare metal using the
DECLARE_HOSTSand also goes tested against a real GPU on the cloud, showing that essentially now anyone can use the vLLM production stack on any cloud provider we support in a flash. All we need are the instances which have GPUs added, and for that we expect growth soon using dynamic kconfig support.Demo results of the temporary quick benchmark for all cases, GPUs, CPUs, and VMs are here:
https://github.com/mcgrof/demo-vllm-benchmark
We will expand support soon for synthetic engines, so we can stress test vLLM routing without the overhead of any real hardware. We then need to expand the scope of testing using the vLLM benchmarks and graphing them.
One of the benefits of all this is we can support *upstream kernel* changes and automatic testing of vLLM for compute in any complex way we can think of. Upstream kernels are not a requriement, we just support that. We also support AB testing since we already provide support for that, meaning folks can do AB testing with two different kernels.
Quoted 5 lines
This should be enough to kick the tires, and scale real production AI workloads on kdevops.
Since the first v1 patch already passed CI testing on kdevops, I'm posting this just as formality and will soon be merging this.
Merged.
Luis
Quoted 8 lines · Luis Chamberlain
This adds initial vLLM and vLLM production stack support on kdevops.
This v2 series augments vLLM support for real CPUs on bare metal using the
DECLARE_HOSTSand also goes tested against a real GPU on the cloud, showing that essentially now anyone can use the vLLM production stack on any cloud provider we support in a flash. All we need are the instances which have GPUs added, and for that we expect growth soon using dynamic kconfig support.
As an update/road-map on that:
I think Lambda has GPU support already, and AWS has enough dynamic menu support now that GPU-enabled instance types are available there with the default menus in the git tree. Please let me know if that's missing something.
I haven't done the follow-up work yet to integrate GPU-enabled AMIs into the AWS Compute menu. That seems like it should be the top priority. I need to go back and look at what you did to generate those in your prototype, to close those gaps.
When that is complete, my next steps are to ask Claude to "copy" the scripts from terraform/aws/scripts to the other three major cloud providers that kdevops supports... an NFS bake-a-thon is this coming week, so there will be some delay.
In the medium term, adding support for enabling RDMA fabrics in these environments is on my to-do list. I believe that will allow testing things like GPU direct with NVMe-o-F devices.
Signature · 1 line
Chuck Lever
Quoted 10 lines · Chuck Lever
Quoted 8 lines · Luis Chamberlain
This adds initial vLLM and vLLM production stack support on kdevops.
This v2 series augments vLLM support for real CPUs on bare metal using the
DECLARE_HOSTSand also goes tested against a real GPU on the cloud, showing that essentially now anyone can use the vLLM production stack on any cloud provider we support in a flash. All we need are the instances which have GPUs added, and for that we expect growth soon using dynamic kconfig support.
Quoted 3 lines
As an update/road-map on that:
I think Lambda has GPU support already,
Yes, this goest tested with that.
Quoted 4 lines
and AWS has enough dynamic menu
support now that GPU-enabled instance types are available there with the default menus in the git tree. Please let me know if that's missing something.
Oh! I hadn't seen that and had been waiting for this! I'll test in a couple of days!
Exciting times!
Quoted 4 lines
I haven't done the follow-up work yet to integrate GPU-enabled AMIs into the AWS Compute menu. That seems like it should be the top priority. I need to go back and look at what you did to generate those in your prototype, to close those gaps.
Oh yes that's needed. I also need a patch to disable VPCs and enable public IPs. While at it, so that AWS won't eat my corporate expenditures I added a slack cloud-bill support too. The whole "static" stuff can be ignored, it doesn't work, I was just trying to add static instances to see if I could get some larger GPU instnaces to work but it didn't work and I gave up. But the rest of the changes are legit, please feel free to cherry pick what you see useful from here:
https://github.com/linux-kdevops/kdevops/tree/ci-testing/mcgrof/20251004-cloud-bill
Quoted 4 lines
When that is complete, my next steps are to ask Claude to "copy" the scripts from terraform/aws/scripts to the other three major cloud providers that kdevops supports... an NFS bake-a-thon is this coming week, so there will be some delay.
Nice!!
Quoted 3 lines
In the medium term, adding support for enabling RDMA fabrics in these environments is on my to-do list. I believe that will allow testing things like GPU direct with NVMe-o-F devices.
Oh my, that would be dreamy!
Luis
Quoted 6 lines · Luis Chamberlain
Quoted 4 lines
I haven't done the follow-up work yet to integrate GPU-enabled AMIs into the AWS Compute menu. That seems like it should be the top priority. I need to go back and look at what you did to generate those in your prototype, to close those gaps.
Oh yes that's needed. I also need a patch to disable VPCs and enable public IPs.
AWS instances are created with public IPs (at least mine are, since my buildbot master is still in my basement. :-)
Can you elaborate on what's missing here, and I will review patches or try to help however I can.
Quoted 5 lines
While at it, so that AWS won't eat my corporate expenditures I added a slack cloud-bill support too. The whole "static" stuff can be ignored, it doesn't work, I was just trying to add static instances to see if I could get some larger GPU instnaces to work but it didn't work and I gave up.
I assume by "static" you mean long-lived. I've been considering that for things like kernel build nodes and buildbot masters. Sounds like there are some interesting use cases to consider.
Quoted 5 lines
But the rest of the changes are legit, please feel free to cherry pick what you see useful from here:
https://github.com/linux-kdevops/kdevops/tree/ci-testing/
mcgrof/20251004-cloud-bill
Great! I will have a look at those.
Signature · 1 line
Chuck Lever
Quoted 6 lines · Chuck Lever
Quoted 5 lines
But the rest of the changes are legit, please feel free to cherry pick what you see useful from here:
https://github.com/linux-kdevops/kdevops/tree/ci-testing/
mcgrof/20251004-cloud-billGreat! I will have a look at those.
Have some comments/requests on these, not sure where to post them. Oldest to newest:
- workflows: Add vLLM workflow for LLM inference and production deployment
- vllm: Add DECLARE_HOSTS support for bare metal and existing infrastructure
- vllm: Add GPU-enabled defconfig with compatibility documentation
- defconfigs: Add composable fragments for Lambda Labs vLLM deployment
No comments on these.
- aws: prevent SSH key conflicts across multiple kdevops directories
This one was posted before, and my comment still stands: this is badly needed IMO, but it should work for all cloud providers, not just aws, and the new Kconfig options should go in the existing kconfig ssh menu for terraform, probably.
Do you want me to work on adapting this one, or do you want to give Claude another crack at it?
- Add static GPU Kconfig support for AWS
Wondering if my dynamic instance type menu already brings in these new GPU-enabled instance types.
- Add make cloud-bill target for AWS cost tracking
Nit: I'd like to see provider-specific scripts go into
terraform/<provider>/scripts/
I'm sorry that I had to drop the pricing information from my dynamic menu patches. I just pushed that out of the MVP "just get it working" patches, and I do plan to come back to it. I do follow running costs, but not as closely as these patches suggest that you do.
- terraform/aws: use default VPC to avoid VPC limit issues
I think we can make this work, and IIRC some of the other providers also provision default VPCs. Making it switchable (use the default, or create one for me) makes sense. We might consider following the precedent that OCI has set here (use an existing VPC).
There are some other resources that have similar limits.
- terraform/aws: fix EBS volume availability zone mismatch
Fair catch, but why not use the AZ that the instance is in rather than the AZ that the subnet is in?
- terraform/aws: enable public IP assignment for instances
- terraform/aws: prefer subnets with public IP auto-assignment
As above, might need some work, but these two look do-able. Probably should be squashed into "terraform/aws: use default VPC to avoid VPC limit issues"
- terraform/aws: fix GPU AMI selection in terraform templates
No comment on this one. I need to first go and merge in your original GPU AMI patches. I'd like to see that integrated into the existing AWS Kconfig compute menu.
- ansible: map GPU instance configurations to terraform instance types
- defconfigs: fix GPU instance choice configuration
Wondering if these two are still necessary with my dynamic menu patches.
- slack-billing: add AWS cost notifications to Slack
Clever, but isn't this something that should be configured via the cloud console? Not really sure.
- kconfig: fix Slack notification configuration syntax errors
Squash-me.
- defconfigs: add AWS P5.4xlarge GPU instance support
No comment.
HTH.
Signature · 1 line
Chuck Lever
Quoted 11 lines · Chuck Lever
Quoted 6 lines · Chuck Lever
Quoted 5 lines
But the rest of the changes are legit, please feel free to cherry pick what you see useful from here:
https://github.com/linux-kdevops/kdevops/tree/ci-testing/
mcgrof/20251004-cloud-billGreat! I will have a look at those.
Have some comments/requests on these, not sure where to post them. Oldest to newest:
Quoted 8 lines
- aws: prevent SSH key conflicts across multiple kdevops directories
This one was posted before, and my comment still stands: this is badly needed IMO, but it should work for all cloud providers, not just aws, and the new
Kconfigoptions should go in the existing kconfig ssh menu for terraform, probably.Do you want me to work on adapting this one
Yes please!
Quoted 4 lines
- Add static GPU
Kconfigsupport for AWSWondering if my dynamic instance type menu already brings in these new GPU-enabled instance types.
What do you mean?
make cloud-config
Cloud Provider Configuration Summary
============================================================
✓ Lambda Labs: 0/1 instances available, 1 regions, pricing varies
Kconfig files generated successfully
⚠ AWS: Dynamic configuration not yet implemented
So I suspect we don't yet have this? To be clear, I didn't intend to add static instance types, I was just trying to add something temporary so I can get AWS going with GPU instances while you land dynamic AWS support upstream. And so my static patches can be ignored.
Quoted 5 lines
- Add make cloud-bill target for AWS cost tracking
Nit: I'd like to see provider-specific scripts go into
terraform/<provider>/scripts/
Sure, any chance you can adapt that to your preference?
Quoted 2 lines
I'm sorry that I had to drop the pricing information from my dynamic menu patches.
I really don't care for that stuff, I just want functionality at this point.
Quoted 6 lines
- terraform/aws: use default VPC to avoid VPC limit issues
I think we can make this work, and IIRC some of the other providers also provision default VPCs. Making it switchable (use the default, or create one for me) makes sense. We might consider following the precedent that OCI has set here (use an existing VPC).
Sure whatever you recommend, I just know I'm out of VPCs in my account and so can't add more.
Quoted 7 lines
There are some other resources that have similar limits.
- terraform/aws: fix EBS volume availability zone mismatch
Fair catch, but why not use the AZ that the instance is in rather than the AZ that the subnet is in?
Sure.
Quoted 6 lines
- terraform/aws: enable public IP assignment for instances
- terraform/aws: prefer subnets with public IP auto-assignmentAs above, might need some work, but these two look do-able. Probably should be squashed into "terraform/aws: use default VPC to avoid VPC limit issues"
Sure, I'm in hopes you can adapt to your preference.
Quoted 5 lines
- terraform/aws: fix GPU AMI selection in terraform templates
No comment on this one. I need to first go and merge in your original GPU AMI patches. I'd like to see that integrated into the existing AWS
Kconfigcompute menu.
That'd be nice.
Quoted 5 lines
- ansible: map GPU instance configurations to terraform instance types
- defconfigs: fix GPU instance choice configuration
Wondering if these two are still necessary with my dynamic menu patches.
I am not aware of your dynamic menu patches! Please just merge :)
Quoted 4 lines
- slack-billing: add AWS cost notifications to Slack
Clever, but isn't this something that should be configured via the cloud console? Not really sure.
You mean AWS console? No, we didn't find anything. They just want your money.
Quoted 3 lines
- kconfig: fix Slack notification configuration syntax errors
Squash-me.
Indeed.
Quoted 3 lines
- defconfigs: add AWS P5.4xlarge GPU instance support
No comment.
I'm hoping you can just take this and adapt it as you see fit as I've just been waiting for your overhaul to get AWS GPU instances going. Right now I can't use them and the above branch was an attempt to get it going with static instances, which is clearly not right.
Any chance you might be able to take what you think deserves to get upstream?
Luis
Quoted 4 lines · Luis Chamberlain
Quoted 2 lines
Wondering if these two are still necessary with my dynamic menu patches.
I am not aware of your dynamic menu patches! Please just merge 🙂
My dynamic menu stuff for AWS is already merged but I haven't hooked it up with a make target yet. I will work on that!
Quoted 2 lines
Any chance you might be able to take what you think deserves to get upstream?
I can take it all and adjust it. I just wasn't sure how much you were dependent on the specific ways your patches work.
Signature · 1 line
Chuck Lever
Quoted 8 lines · Chuck Lever
Quoted 4 lines · Luis Chamberlain
Quoted 2 lines
Wondering if these two are still necessary with my dynamic menu patches.
I am not aware of your dynamic menu patches! Please just merge 🙂
My dynamic menu stuff for AWS is already merged but I haven't hooked it up with a make target yet. I will work on that!
OK bud. AWS is all wired into "make cloud-config" and merged.
The deeplearning patch doesn't fail, but it isn't generating all the menu items that are needed. That's not merged yet.
Signature · 1 line
Chuck Lever