From bcfb24b16d2ea7bcff52d1eb859320380f6eca6d Mon Sep 17 00:00:00 2001 From: Bot Date: Wed, 2 Sep 2026 16:51:31 -0700 Subject: [PATCH 1/2] ai.yaml: cut mcpo over to the confirmed-working flowagent-mcpo image + wire flowagent Docker secrets (never touches mcpo-critical) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Image pinned to git.bryanmail.net/homelab/flowagent-mcpo:916164714429 — the exact sha-tagged image built and smoke-tested clean in mcp-config pipeline #22 (build-and-push-flowagent + smoke-test-flowagent-image both success). NOT :latest, for reproducible deploys. Adds a secrets: block to the mcpo service only, referencing the 3 flowagent_azure_* Docker Swarm secrets (Pattern C, _FILE convention, consumed by flowagent/entrypoint.sh via /run/secrets/flowagent_azure_*). Declares those 3 secrets as external at top level, mirroring the existing vaultwarden_admin_token_v2 pattern in vaultwarden.yaml. Companion secret-provisioning change lands in the same PR as a separate commit in .woodpecker/deploy.yml's provision-secrets step (case "ai)"). mcpo-critical (lines defining Proxmox access) is completely untouched — still stock ghcr.io/open-webui/mcpo:main, no secrets: block, unchanged. Per FlowAgent MCP progress note: Azure AD App Registration is reported created with real secrets already in Woodpecker (both mcp-config and compose-files repos) as of this PR. This is a reviewed PR against a feature branch, NOT auto-merged to main — deploy only happens after manual review/merge, per user's explicit request for a manual-revert safety net on this high-blast-radius shared stack (LiteLLM, Open WebUI, n8n also live here). --- ai/ai.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ai/ai.yaml b/ai/ai.yaml index ed9fa52..705266c 100644 --- a/ai/ai.yaml +++ b/ai/ai.yaml @@ -127,7 +127,7 @@ services: labels: - traefik.enable=false mcpo: - image: ghcr.io/open-webui/mcpo:main + image: git.bryanmail.net/homelab/flowagent-mcpo:916164714429 command: - --config - /app/config/config.json @@ -141,6 +141,13 @@ services: - /volume1/docker/mcpo/data:/mcpo_data - /volume1/docker/cronicle/ssh_keys:/app/ssh_keys:ro - /volume1/docker/mcpo/uv-cache:/app/uv-cache + secrets: + - source: flowagent_azure_client_id + target: flowagent_azure_client_id + - source: flowagent_azure_tenant_id + target: flowagent_azure_tenant_id + - source: flowagent_azure_client_secret + target: flowagent_azure_client_secret networks: - traefik_backend deploy: @@ -173,6 +180,13 @@ services: - traefik.http.middlewares.n8n.headers.STSPreload=true - traefik.http.routers.n8n.middlewares=forwardAuth-authentik@file, crowdsec@file - traefik.swarm.network=traefik_backend +secrets: + flowagent_azure_client_id: + external: true + flowagent_azure_tenant_id: + external: true + flowagent_azure_client_secret: + external: true networks: traefik_backend: external: true From a15e0100df97962296ef29609b51afa6c72bfc34 Mon Sep 17 00:00:00 2001 From: Bot Date: Wed, 2 Sep 2026 16:53:10 -0700 Subject: [PATCH 2/2] provision-secrets: add flowagent_* case-entry to the ai) stack (matched pair with ai.yaml's mcpo cutover) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surgical addition to the existing case "ai)" block only — every other case, comment, and line in this ~26KB pipeline file is byte-for-byte unchanged from main. Given this file's documented incident history from prior full-file rewrites (see header comment), this was hand-verified against the current main content line-by-line before writing, not generated fresh. Adds: - 3 new environment: entries (FLOWAGENT_AZURE_CLIENT_ID/TENANT_ID/ CLIENT_SECRET) via from_secret, alongside the existing ai_* secrets - Inside the existing `ai)` case, after the ai.env rewrite block: three create_or_update_secret calls provisioning flowagent_azure_client_id, flowagent_azure_tenant_id, flowagent_azure_client_secret as native Docker Swarm secrets (Pattern C, _FILE convention) — NOT written into ai/ai.env, since mcpo's flowagent entry reads them via /run/secrets/flowagent_azure_* per flowagent/entrypoint.sh, not env vars - A short comment explaining why these three are Pattern C secrets inside an otherwise Pattern-B (host .env) stack case This is the matched-pair companion to the ai.yaml commit in this same PR, per the FlowAgent progress note's explicit sequencing requirement (both land together, reviewed, not auto-merged to main). --- .woodpecker/deploy.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index 1f0163a..b5b5e6c 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -179,6 +179,12 @@ steps: from_secret: ai_open_webui_database_url AI_OAUTH_CLIENT_SECRET: from_secret: ai_oauth_client_secret + FLOWAGENT_AZURE_CLIENT_ID: + from_secret: flowagent_azure_client_id + FLOWAGENT_AZURE_TENANT_ID: + from_secret: flowagent_azure_tenant_id + FLOWAGENT_AZURE_CLIENT_SECRET: + from_secret: flowagent_azure_client_secret commands: - apk add --no-cache openssh-client - mkdir -p ~/.ssh @@ -305,6 +311,13 @@ steps: # unresolved at compose-render time (empty), silently breaking Bedrock auth. # All other migrated vars in ai.yaml use plain (unprefixed) names, so only # these two lines need the AI_ prefix. + # + # FLOWAGENT NOTE (added alongside the ai.yaml mcpo image/secrets cutover): + # the 3 flowagent_azure_* values are provisioned as native Docker secrets + # below (Pattern C, matches every other _FILE-convention stack), NOT written + # into ai/ai.env — mcpo's flowagent entry reads them via + # /run/secrets/flowagent_azure_* (see mcp-config/flowagent/entrypoint.sh), + # not via env var, so they don't belong in this stack's Pattern B .env block. ssh -o StrictHostKeyChecking=no root@$${SWARM_MANAGER_IP} "FILE=/volume1/docker/compose-files/ai/ai.env TMP=\$FILE.tmp.\$\$ grep -vE '^(AI_AWS_ACCESS_KEY_ID|AI_AWS_SECRET_ACCESS_KEY|LITELLM_MASTER_KEY|LITELLM_SALT_KEY|POSTGRES_PASSWORD|DATABASE_URL|WEBUI_SECRET_KEY|OPEN_WEBUI_DATABASE_URL|OAUTH_CLIENT_SECRET)=' \$FILE > \$TMP 2>/dev/null || touch \$TMP @@ -320,7 +333,11 @@ steps: printf 'OAUTH_CLIENT_SECRET=%s\n' '$${AI_OAUTH_CLIENT_SECRET}' } > \$FILE rm -f \$TMP - echo ' [OK] ai/ai.env secrets updated'";; + echo ' [OK] ai/ai.env secrets updated' + source /tmp/cs.sh + create_or_update_secret 'flowagent_azure_client_id' '$${FLOWAGENT_AZURE_CLIENT_ID}' + create_or_update_secret 'flowagent_azure_tenant_id' '$${FLOWAGENT_AZURE_TENANT_ID}' + create_or_update_secret 'flowagent_azure_client_secret' '$${FLOWAGENT_AZURE_CLIENT_SECRET}'";; entertainment) ssh -o StrictHostKeyChecking=no root@$${SWARM_MANAGER_IP} "source /tmp/cs.sh create_or_update_secret 'entertainment_discord_token' '$${ENTERTAINMENT_DISCORD_TOKEN}'