# Deployment framework

`deployments/` contains the host-side runtime adapters and durable environment
policy for the PingCAP stack.

## Authority

- `deployment-config.json` owns repository URLs, topology, fixed ports, TiDB
  identities, database policy, and release meaning.
- `offline/runtime/` owns offline environment adapters.
- `online/` owns production host policy and supporting assets.
- Generated `runtime.env`, logs, run state, and artifacts stay on the target
  host under `~/nexuscrm-deployment`; they are snapshots, not policy inputs.

Current topology:

| Environment | Topology | Operator entrypoint |
| --- | --- | --- |
| Test D3 | fixed `test1`/`test2`/`test3` slots | `.github/workflows/deploy-test-serviceification.yml` |
| Formal Staging D3 | blue/green | `.github/workflows/deploy-staging-blue-green-environment.yml` |
| Prod D3 | four rotating port slots, shared TiDB | `.github/workflows/deploy-multi-prod-d3-environment.yml` |

Workflow controllers are the operator surface for Test, Staging, and Prod.
Runtime Python modules are internal mechanisms unless their runbook explicitly
defines a direct invocation.

Classic EXP and CI monolithic deployment has been retired. Use the current
serviceified D3 workflows or [independent local deployment](../docs/local-independent-deployment.md) for verification.
