Platform scripts, MCP servers, deployment and docs for the KAB runs

- Scripts to run workflows from a YAML context or run inputs (kab_run_workflow.py, with
  --input name=@file), store per-project discovery connections, bootstrap agent MCP keys,
  refresh the KAB token, publish reports and build estate snapshots.
- Hyperscaler discovery servers extended in place; cloud-knowledge folded into them.
- deploy/crucible-kab-dev.yaml: the Discovery package agent and the Assessment agents.
- Platform issue write-ups and current-wiring notes under docs/platform-issues/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 22:13:25 +00:00
parent c14a94f33b
commit f659564208
71 changed files with 2818 additions and 2821 deletions

View File

@@ -113,11 +113,46 @@ python3 scripts/kab_import_workflow.py "individual-agents/ALZ-F01: Discovery Wor
## Deploying the hyperscaler MCP servers
`azure-discovery`, `aws-discovery`, `gcp-discovery` and `cloud-knowledge` deploy as in step 3, each with its own `<server>-secrets` Secret and registration. Their rendered Dockerfile needs a login to `kyndryl.jfrog.io`, or a local base passed with `--build-arg BASE_IMAGE=<image>`. Until that's available, build on the public Python image: `podman build -f mcp-servers/_common/Dockerfile.python -t <image> mcp-servers/<server>`. This image isn't hardened, so don't use it for customer data.
`azure-discovery`, `aws-discovery` and `gcp-discovery` deploy as in step 3, each with its own `<server>-secrets` Secret and registration. Their rendered Dockerfile needs a login to `kyndryl.jfrog.io`, or a local base passed with `--build-arg BASE_IMAGE=<image>`. Until that's available, build on the public Python image: `podman build -f mcp-servers/_common/Dockerfile.python -t <image> mcp-servers/<server>`. This image isn't hardened, so don't use it for customer data.
Then store each connection in KAB under **Credentials**:
- **Discovery servers:** per project, as described in [customer-cloud-access.md](customer-cloud-access.md). Never tenant-wide.
- **`cloud-knowledge`:** tenant-wide. Azure needs no credential, but the server refuses a call that has no stored connection.
Then store each connection in KAB under **Credentials**, per project, as described in
[customer-cloud-access.md](customer-cloud-access.md). Never tenant-wide. Well-Architected guidance uses the same connection.
### Starting a run from a context file
Every run starts from a YAML context file. Its `workflow_inputs:` become the run's inputs (validated before the run
starts). The script generates `run_id` for every run (UTC time plus a random suffix) and `plan_id` = `PLAN-<run_id>`,
and adds them as a `generated:` section; a file that sets `run_id` itself is refused. The file also declares the
`customer:` (business details only, no personal data) and the engagement `plan:`. The whole file is uploaded to the workflow's upload step, so the planner, the inventory agent and the
report also read its `context:` section. The template is
`individual-agents/ALZ-F01: Discovery Workflow Agent/workflows/run-context.template.yaml`; the live trials have their
own in `workflows/cases/`. Never put a credential in one.
```sh
python3 scripts/kab_run_workflow.py start --workflow <id> --project <id> \
--context "individual-agents/ALZ-F01: Discovery Workflow Agent/workflows/cases/gcp-live/context.yaml" --dry-run
```
### Storing the connections from a script
`scripts/kab_store_connections.py` stores the discovery servers' connections, per project, through the platform's
Credentials API, without the UI. It finds each server in the MCP gateway, checks the connection against the
server's declared fields, and tests it with `connections:verify`. Only with `--apply` does it store the connection
(`PUT /api/v1/secrets`, `secretType` `mcp`, format `connection`, create-only unless `--replace`).
Credential values never appear in its output, its arguments or a file. They come from the environment
(`AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`), from a service account key file kept outside the
repository, or from `az` / `gcloud` access tokens. A token lasts about an hour and carries your own rights.
```sh
python3 scripts/kab_store_connections.py --api https://<platform host> --tenant <tenant id> --project-id <project id> \
--azure-scope-root subscriptions/<id> --azure-credential service-principal \
--gcp-scope-root projects/<id> --gcp-credential key-file:$HOME/keys/<read-only-sa>.json # test only
# ... then the same command with --apply
```
It needs a KAB token (`$KAB_TOKEN` or `~/.kab_token`, `--token-file` to change) and the Administrator role. API keys work only on `/api/external/` routes, so they can't be used here. The
servers must already be registered in that platform's MCP gateway, at an address its gateway can reach.
## Rolling back and removing