Files
siloqy/prod/docs/DITA_V2_OPERATOR_PLAYBOOK.md

117 lines
3.1 KiB
Markdown
Raw Normal View History

# DITAv2 Operator Playbook
This is the operator-facing control surface for the DITAv2 execution kernel.
## Supervisor program
The process is managed as:
`dolphin:dita_v2`
Launcher:
`/mnt/dolphinng5_predict/prod/launch_dita_v2.py`
## Default runtime posture
- `DITA_V2_LAUNCHER_MODE=serve`
- `DITA_V2_VENUE=BINGX`
- `DITA_V2_ZINC=REAL`
- `DITA_V2_CONTROL_PLANE=REAL_ZINC`
- `DITA_V2_HAZELCAST=REAL`
- `DITA_V2_MODE=DEBUG`
- `DITA_V2_VERBOSITY=TRACE`
The launcher defaults remain safe in-process for tests, but the supervised
program is configured for the real shared-memory / live venue path.
## Control commands
Use:
```bash
python /mnt/dolphinng5_predict/prod/ops/dita_v2_ctl.py status
python /mnt/dolphinng5_predict/prod/ops/dita_v2_ctl.py start
python /mnt/dolphinng5_predict/prod/ops/dita_v2_ctl.py stop
python /mnt/dolphinng5_predict/prod/ops/dita_v2_ctl.py restart
python /mnt/dolphinng5_predict/prod/ops/dita_v2_ctl.py healthcheck
```
These map to:
```bash
supervisorctl -c /mnt/dolphinng5_predict/prod/supervisor/dolphin-supervisord.conf <action> dolphin:dita_v2
```
## Live BingX testnet smoke
Use the repeatable live smoke wrapper:
```bash
python /mnt/dolphinng5_predict/prod/ops/dita_v2_live_bingx_smoke.py
```
Recommended explicit symbol:
```bash
python /mnt/dolphinng5_predict/prod/ops/dita_v2_live_bingx_smoke.py --symbol TRXUSDT
```
What it does:
- loads `/mnt/dolphinng5_predict/.env`
- sets `BINGX_SMOKE_LIVE=1`
- sets `BINGX_SMOKE_ALLOW_TRADE=1`
- sets `DITA_V2_LIVE_BINGX=1`
- starts `dolphin:dita_v2` if it is not already running
- runs `prod/tests/test_dita_v2_live_bingx_testnet_e2e.py`
- preserves the live suite's rate-limit-aware behavior and cleanup paths
Use `--dry-run` to print the exact command and env without trading.
## Validation order
1. Start the process with `start`.
2. Check `status`.
3. Run `healthcheck`.
4. Inspect the logs:
- `/tmp/dolphin_logs/supervisor/dita_v2.log`
- `/tmp/dolphin_logs/supervisor/dita_v2-error.log`
## Stop sequence
1. `python /mnt/dolphinng5_predict/prod/ops/dita_v2_ctl.py stop`
2. Confirm `status` shows the program stopped.
3. Only after that, touch the launcher config or shared-memory state.
## PINK-on-DITAv2 commands
PINK now executes through the DITAv2 kernel. The same supervisor commands
apply, and the following PINK-specific surfaces are available:
### PINK control
```bash
python /mnt/dolphinng5_predict/prod/ops/pink_ctl.py status
python /mnt/dolphinng5_predict/prod/ops/pink_ctl.py healthcheck
python /mnt/dolphinng5_predict/prod/ops/pink_ctl.py ditav2-status
python /mnt/dolphinng5_predict/prod/ops/pink_ctl.py mode-verify
```
`ditav2-status` checks the DITAv2 env vars (`DITA_V2_MODE`, `DITA_V2_VENUE`,
etc.) and the `dolphin_pink` supervisor program status.
### PINK live BingX testnet smoke
```bash
python /mnt/dolphinng5_predict/prod/ops/dita_v2_live_bingx_smoke.py --pink --symbol TRXUSDT
```
Use `--dry-run` to print the exact env and pytest command without trading.
### Stop sequence
1. `python /mnt/dolphinng5_predict/prod/ops/pink_ctl.py stop`
2. Confirm `status` shows the process stopped.
3. Inspect logs: `/tmp/dolphin_logs/supervisor/dolphin_live_pink.log`