Update Agent Zero, Asterisk, and Telephony K8s manifests
- Update agent-zero deployment configuration - Update Asterisk configmap and deployment - Update telephony service manifest Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
# Agent Zero AI Stack — NUC Deployment (RKE2 Bare-Metal)
|
||||
# =============================================================================
|
||||
# Deploys: AgentZero (agent UI) on RKE2 cluster with Blue Jay profile
|
||||
# Ollama: edge1 Pi 5 at 10.0.57.17:11434 (qwen2.5-coder:7b + nomic-embed-text)
|
||||
# Ollama: workstation-first via BLUEJAY-WS (10.0.56.20:11434) with edge1 Pi 5
|
||||
# fallback (10.0.57.17:11434)
|
||||
# Target: RKE2 bare-metal cluster, namespace: agent-zero
|
||||
# Profile: Blue Jay (21 tools, 3 prompts, 4 extensions, theme)
|
||||
#
|
||||
# Differences from LOCAL (WSL K3s):
|
||||
# - Uses Longhorn StorageClass (not local-path)
|
||||
# - Connects to edge1 Pi 5 Ollama (not workstation R9700)
|
||||
# - Prefers workstation Ollama on the R9700, falls back to edge1 Pi 5
|
||||
# - NO Anthropic API key (free/local models only)
|
||||
# - NO Piper TTS or Kiwix (edge1 handles TTS, no Wikipedia needed)
|
||||
# - NO hostPath volumes — profile/tools/extensions loaded via ConfigMaps
|
||||
@@ -90,7 +91,7 @@ subjects:
|
||||
# =============================================================================
|
||||
# Agent Zero — AI Agent Web UI (NUC Edition, Blue Jay Profile)
|
||||
# =============================================================================
|
||||
# Connects to edge1 Pi 5 Ollama (free, local models only)
|
||||
# Connects to a local proxy that routes to workstation Ollama first and edge1 second
|
||||
# Blue Jay profile with 21 tools, 3 prompts, 4 extensions
|
||||
|
||||
---
|
||||
@@ -104,7 +105,7 @@ metadata:
|
||||
annotations:
|
||||
agent-zero/deployment: "nuc"
|
||||
agent-zero/profile: "bluejay"
|
||||
agent-zero/ollama: "edge1 Pi 5 (10.0.57.17:11434)"
|
||||
agent-zero/ollama: "BLUEJAY-WS primary (10.0.56.20:11434), edge1 fallback (10.0.57.17:11434)"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@@ -119,18 +120,19 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: agent-zero
|
||||
initContainers:
|
||||
# Wait for edge1 Pi 5 Ollama to be reachable before starting Agent Zero.
|
||||
# Wait for either workstation or edge1 Ollama to be reachable before starting Agent Zero.
|
||||
- name: wait-for-ollama
|
||||
image: busybox:1.37
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
echo "Waiting for Ollama at edge1 (10.0.57.17:11434)..."
|
||||
until wget -qO- --timeout=2 http://10.0.57.17:11434/api/tags >/dev/null 2>&1; do
|
||||
echo "edge1 Ollama not ready, retrying in 5s..."
|
||||
echo "Waiting for Ollama at BLUEJAY-WS or edge1..."
|
||||
until wget -qO- --timeout=2 http://10.0.56.20:11434/api/tags >/dev/null 2>&1 || \
|
||||
wget -qO- --timeout=2 http://10.0.57.17:11434/api/tags >/dev/null 2>&1; do
|
||||
echo "No Ollama endpoint ready yet, retrying in 5s..."
|
||||
sleep 5
|
||||
done
|
||||
echo "edge1 Ollama is reachable!"
|
||||
echo "At least one Ollama endpoint is reachable."
|
||||
# Assemble the Blue Jay profile directory structure from ConfigMaps.
|
||||
# ConfigMaps can't create nested dirs, so we copy into the workspace PVC.
|
||||
- name: setup-bluejay
|
||||
@@ -177,6 +179,50 @@ spec:
|
||||
- name: bluejay-theme
|
||||
mountPath: /tmp/bluejay-theme
|
||||
containers:
|
||||
- name: ollama-proxy
|
||||
image: nginx:1.27-alpine
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
cat > /etc/nginx/nginx.conf <<'NGINX'
|
||||
worker_processes 1;
|
||||
events { worker_connections 1024; }
|
||||
http {
|
||||
upstream ollama_upstream {
|
||||
server 10.0.56.20:11434 max_fails=2 fail_timeout=10s;
|
||||
server 10.0.57.17:11434 backup;
|
||||
keepalive 16;
|
||||
}
|
||||
server {
|
||||
listen 11434;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $host;
|
||||
proxy_connect_timeout 5s;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
|
||||
proxy_pass http://ollama_upstream;
|
||||
}
|
||||
}
|
||||
}
|
||||
NGINX
|
||||
exec nginx -g 'daemon off;'
|
||||
ports:
|
||||
- containerPort: 11434
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/tags
|
||||
port: 11434
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 15
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/tags
|
||||
port: 11434
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
- name: agent-zero
|
||||
image: agent0ai/agent-zero:latest
|
||||
command: ["/bin/bash", "-c"]
|
||||
@@ -194,10 +240,11 @@ spec:
|
||||
ln -sfn /a0/work/.bluejay/agents/bluejay /a0/agents/bluejay
|
||||
# Write model config BEFORE initialize.sh loads it
|
||||
# The _model_config plugin reads config.json (NOT config.yaml)
|
||||
# Default is OpenRouter; override to local Ollama on edge1
|
||||
# Default is OpenRouter; override to the local proxy, which prefers
|
||||
# the workstation and falls back to edge1 automatically.
|
||||
mkdir -p /a0/usr/plugins/_model_config
|
||||
cat > /a0/usr/plugins/_model_config/config.json << 'MODELCFG'
|
||||
{"allow_chat_override":true,"chat_model":{"provider":"ollama","name":"qwen2.5-coder:7b","api_base":"http://10.0.57.17:11434","ctx_length":8192,"ctx_history":0.7,"vision":false,"kwargs":{"temperature":0,"num_ctx":8192}},"utility_model":{"provider":"ollama","name":"qwen2.5-coder:7b","api_base":"http://10.0.57.17:11434","ctx_length":8192,"ctx_input":0.7,"kwargs":{"num_ctx":8192}},"embedding_model":{"provider":"ollama","name":"nomic-embed-text","api_base":"http://10.0.57.17:11434","kwargs":{}}}
|
||||
{"allow_chat_override":true,"chat_model":{"provider":"ollama","name":"gemma3:12b","api_base":"http://127.0.0.1:11434","ctx_length":8192,"ctx_history":0.7,"vision":false,"kwargs":{"temperature":0,"num_ctx":8192}},"utility_model":{"provider":"ollama","name":"qwen2.5:1.5b","api_base":"http://127.0.0.1:11434","ctx_length":8192,"ctx_input":0.7,"kwargs":{"num_ctx":8192}},"embedding_model":{"provider":"ollama","name":"nomic-embed-text","api_base":"http://127.0.0.1:11434","kwargs":{}}}
|
||||
MODELCFG
|
||||
# Strip heredoc indentation
|
||||
sed -i 's/^ //' /a0/usr/plugins/_model_config/config.json
|
||||
@@ -209,42 +256,42 @@ spec:
|
||||
# Agent identity
|
||||
- name: AGENT_NAME
|
||||
value: "Blue Jay (NUC)"
|
||||
# Chat model — qwen2.5-coder:7b on edge1 Pi 5
|
||||
# Chat model — workstation primary, edge1 fallback via local proxy
|
||||
- name: A0_SET_chat_model_provider
|
||||
value: "ollama"
|
||||
- name: A0_SET_chat_model_name
|
||||
value: "qwen2.5-coder:7b"
|
||||
value: "gemma3:12b"
|
||||
- name: A0_SET_chat_model_api_base
|
||||
value: "http://10.0.57.17:11434"
|
||||
value: "http://127.0.0.1:11434"
|
||||
- name: A0_SET_chat_model_ctx_length
|
||||
value: "8192"
|
||||
- name: A0_SET_chat_model_kwargs
|
||||
value: '{"temperature": 0, "num_ctx": 8192}'
|
||||
# Utility model — same as chat (only one model available)
|
||||
# Utility model — fast small helper tier through the same proxy
|
||||
- name: A0_SET_util_model_provider
|
||||
value: "ollama"
|
||||
- name: A0_SET_util_model_name
|
||||
value: "qwen2.5-coder:7b"
|
||||
value: "qwen2.5:1.5b"
|
||||
- name: A0_SET_util_model_api_base
|
||||
value: "http://10.0.57.17:11434"
|
||||
value: "http://127.0.0.1:11434"
|
||||
- name: A0_SET_util_model_kwargs
|
||||
value: '{"num_ctx": 2048}'
|
||||
# Embedding model — nomic on edge1
|
||||
# Embedding model — nomic through the same proxy
|
||||
- name: A0_SET_embed_model_provider
|
||||
value: "ollama"
|
||||
- name: A0_SET_embed_model_name
|
||||
value: "nomic-embed-text"
|
||||
- name: A0_SET_embed_model_api_base
|
||||
value: "http://10.0.57.17:11434"
|
||||
# Browser model — disabled (no vision model on Pi)
|
||||
value: "http://127.0.0.1:11434"
|
||||
# Browser model — small Gemma candidate through the same proxy
|
||||
- name: A0_SET_browser_model_provider
|
||||
value: "ollama"
|
||||
- name: A0_SET_browser_model_name
|
||||
value: "qwen2.5-coder:7b"
|
||||
value: "gemma3:4b"
|
||||
- name: A0_SET_browser_model_api_base
|
||||
value: "http://10.0.57.17:11434"
|
||||
value: "http://127.0.0.1:11434"
|
||||
- name: A0_SET_browser_model_vision
|
||||
value: "false"
|
||||
value: "true"
|
||||
# Agent profile — Blue Jay personality, tools, and system prompt
|
||||
- name: A0_SET_agent_profile
|
||||
value: "bluejay"
|
||||
@@ -297,7 +344,7 @@ spec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- "curl -sf http://localhost:80/ > /dev/null && curl -sf --connect-timeout 3 http://10.0.57.17:11434/api/tags > /dev/null"
|
||||
- "curl -sf http://localhost:80/ > /dev/null && curl -sf --connect-timeout 3 http://127.0.0.1:11434/api/tags > /dev/null"
|
||||
periodSeconds: 30
|
||||
failureThreshold: 2
|
||||
resources:
|
||||
@@ -435,7 +482,13 @@ spec:
|
||||
protocol: UDP
|
||||
- port: 53
|
||||
protocol: TCP
|
||||
# Ollama on edge1
|
||||
# Ollama on BLUEJAY-WS
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 10.0.56.20/32
|
||||
ports:
|
||||
- port: 11434
|
||||
# Ollama on edge1 fallback
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 10.0.57.17/32
|
||||
|
||||
Reference in New Issue
Block a user