File size: 1,748 Bytes
503b0e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# DataOps Platform Docs (Authoritative)

- Runbooks: ./runbooks/
- Playbooks: ./playbooks/
- Contracts: ../contracts/
- Checks: ../checks/
- Monitors: ../monitors/
- Operator Map: ./OPERATOR_MAP.md

## Host Namespacing & Persistence

Servers are disposable; `/data` is persistent. All service data and logs are
namespaced under `b/<host_id>` and exposed via stable symlinks:

- Stable paths (used by configs):
  - Data: `/data/adaptai/platform/dbops/data`
  - Logs: `/data/adaptai/platform/dbops/logs`
- Host-namespaced backing paths:
  - Data: `/data/adaptai/platform/dbops/b/<host_id>/data`
  - Logs: `/data/adaptai/platform/dbops/b/<host_id>/logs`

The symlinks `data -> b/<host_id>/data` and `logs -> b/<host_id>/logs` are
created by a bootstrap step so each server writes to its own directory while
clients and tooling keep using the stable paths.

See runbook: `./runbooks/host-namespacing.md`.

## Logging Retention

Supervisor-managed logs rotate per-program via settings in
`/data/adaptai/platform/dbops/supervisor/conf.d/*.conf` (e.g.,
`stdout_logfile_maxbytes`, `stdout_logfile_backups`, same for stderr). Default
service logs are 20MB x 5 backups; infra logs 5MB x 3. Adjust per program as
needed to prevent log growth in `b/<host_id>/logs`. For additional rotation of
application logs, use `logrotate` pointed at the stable `.../logs` symlink.

## Supervisor + HA Alignment

Supervisor configs are checked into this repo and are host-agnostic. Attaching a
fresh server is:
- Run `tools/host_namespace_bootstrap.sh`
- `supervisorctl -s unix:///data/adaptai/platform/dbops/run/supervisor.sock reread && update`
- Start programs as needed (or rely on `autostart=true`).

This keeps servers disposable while `/data` remains authoritative.