chore: ai/harness images 53ff243 (per-run model, usage, Claude provider) and the Anthropic key file
ai-env·harness 이미지를 53ff243 로 올린다. apply.sh 가 Secret Manager 의 selfheal-anthropic-api-key 를 받아 /run/secrets/anthropic-api-key 로 두고 compose 가 ANTHROPIC_KEY_FILE 로 넘긴다. 값이 없으면 기존처럼 저하 모드로 기동한다.
This commit is contained in:
1 parent
d390b6a5d4
commit
d7ecd59b4c
5 files changed
+8
-4
No files matched your search
@@ -8,6 +8,8 @@ DISCORD_APPROVER_ROLE_ID=
|
||||
# Discord message language of the hitl bot: en or ja (runbooks and prompt free text are written in Japanese)
|
||||
HITL_LANG=ja
|
||||
# experiment design 11.1: candidates gpt-6-astra / gpt-6.1-sol / gpt-6-luna (OpenAI model page 2026-10-08). luna for the first live checks and campaign (budget), compare with sol afterwards
|
||||
# default when a campaign does not name a model. Since apps 53ff243 the harness passes the campaign's model on every /diagnose
|
||||
# (console "model" field); ids starting with claude- go to the Claude Messages API (secret selfheal-anthropic-api-key).
|
||||
OPENAI_MODEL=gpt-6.1-sol
|
||||
EMBED_MODEL=text-embedding-3-small
|
||||
HARNESS_URL=http://10.20.0.11:8080
|
||||
|
||||
+3
-2
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# AI VM (10.20.0.12), experiment design 6. Idempotent: first boot (startup script) and `make vm-sync` / `make ai-sync`.
|
||||
# Secrets come from Secret Manager through the VM service account (Terraform design 6.11):
|
||||
# selfheal-openai-api-key, selfheal-discord-bot-token (registered by the operator), selfheal-k8s-ai-token, selfheal-k8s-ca-cert (make token)
|
||||
# selfheal-openai-api-key, selfheal-anthropic-api-key, selfheal-discord-bot-token (registered by the operator), selfheal-k8s-ai-token, selfheal-k8s-ca-cert (make token)
|
||||
# The two operator secrets may not exist yet: the services then start degraded (agent /diagnose 503, hitl without
|
||||
# gateway) and this script still succeeds, so the VM can be verified before the keys arrive.
|
||||
# Non-secret settings (Discord IDs, model) are in ai.env (committed); AWS role ARN comes from instance metadata.
|
||||
@@ -20,12 +20,13 @@ SEC=/opt/selfheal/ai/secrets
|
||||
mkdir -p "$SEC"; chmod 700 /opt/selfheal/ai "$SEC"
|
||||
umask 077
|
||||
secret selfheal-openai-api-key > "$SEC/openai-api-key"
|
||||
secret selfheal-anthropic-api-key > "$SEC/anthropic-api-key" # Claude Messages API (claude-* model ids); optional until registered
|
||||
secret selfheal-typesafe-api-key > "$SEC/typesafe-api-key"
|
||||
secret selfheal-discord-bot-token > "$SEC/discord-bot-token"
|
||||
secret selfheal-k8s-ai-token > "$SEC/k8s-token"
|
||||
secret selfheal-k8s-ca-cert > "$SEC/k8s-ca.crt"
|
||||
unset TOKEN
|
||||
for f in openai-api-key discord-bot-token typesafe-api-key; do [ -s "$SEC/$f" ] || echo "note: secret $f is empty (not registered yet); service runs degraded" >&2; done
|
||||
for f in openai-api-key discord-bot-token typesafe-api-key anthropic-api-key; do [ -s "$SEC/$f" ] || echo "note: secret $f is empty (not registered yet); service runs degraded" >&2; done
|
||||
for f in k8s-token k8s-ca.crt; do [ -s "$SEC/$f" ] || echo "note: $f is empty (run make token on the operator host)" >&2; done
|
||||
chown -R 10002:10002 "$SEC"; chmod 600 "$SEC"/* # agent/hitl run as uid 10002
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ services:
|
||||
RAG_DSN: "postgres://ai:${RAG_DB_PASSWORD}@rag-db:5432/ai?sslmode=disable"
|
||||
HITL_URL: http://hitl:8081
|
||||
OPENAI_KEY_FILE: /run/secrets/openai-api-key
|
||||
ANTHROPIC_KEY_FILE: /run/secrets/anthropic-api-key
|
||||
JEV_KEY_FILE: /run/secrets/typesafe-api-key
|
||||
K8S_TOKEN_FILE: /run/secrets/k8s-token
|
||||
K8S_CA_FILE: /run/secrets/k8s-ca.crt
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
fa9c08c
|
||||
53ff243
|
||||
@@ -1 +1 @@
|
||||
f8e0aa9
|
||||
53ff243
|
||||
Reference in new issue
Block a user