Files
mesh-lab/scenarios/local-model-bed.yml
T
jschoubben cf26b19b96 local-model bed: prove model-access answered by a node (ADR 0055)
A single-node VM bed: an ollama provider and a local-model consumer are
assigned; the resolver answers the consumer's model-access with the local node
(no licence demanded), the consumer's openai.env is templated with the served
endpoint, and a request to it reaches the running model server. Proves the
node-answer of model-access end to end (ollama on host network, keyless).

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
2026-09-07 05:25:21 +02:00

44 lines
1.9 KiB
YAML

# One machine that becomes a mesh, then proves model-access answered by a NODE (novox/hq ADR 0055):
# a local model server (Ollama) on the node ANSWERS the model-access provision, and a consumer that
# requires model-access is handed the server's ENDPOINT — base URL + model — instead of a vendor
# credential. No licence, no key: the consumer points an OpenAI-compatible client at the mesh's own
# model.
#
# The flow the test drives:
# the ollama provider is assigned (it `provides: [model-access]` at node scope, `serves` its port and
# model) -> the local-model consumer requires model-access and is answered by the local node ->
# the mesh fills the consumer's bound facts with ollama's at/port/model -> the consumer's templated
# openai.env carries OPENAI_BASE_URL=http://<at>:<port>/v1. The test asserts that URL and that a
# request to it reaches the running model server.
#
# MESH_LAB_HOST_BINARY=.../mesh-host MESH_LAB_BUNDLE=.../examples/substrate-first-node.lock
# Both modules are pure declaration (a server container + a templated file) — no module runtime image
# is built; the bed only stocks the substrate and the ollama server image.
scenario: local-model-bed
segments:
hosting:
kind: public
cidr: [192.0.2.0/24]
machines:
anchor:
at: { segment: hosting, address: [192.0.2.10] }
inbound: allow
memory: 4GiB
cpus: 4
disk: 40GiB
images:
# The first-node substrate: store, broker, control.
- postgres:17-alpine
- cloudamqp/lavinmq:latest
- mesh-control:development
# The local model server the ollama provider runs. Pulled by raise() and stocked into the scenario's
# own registry, which is where the host pulls it from. No model is pulled into it — the bed proves the
# mesh routes a consumer to the server's endpoint, not that the server generates tokens.
- ollama/ollama:latest
place:
all: [host, runtime]