Infrastructure Sessions

Real-time command captures from infrastructure work, converted to searchable documentation.


Workflow

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│  infra-session  │───▶│  tlog commands  │───▶│ infra-session-  │
│  <name>         │    │  (auto-logged)  │    │ end             │
└─────────────────┘    └─────────────────┘    └─────────────────┘
         │                                             │
         ▼                                             ▼
┌─────────────────┐                          ┌─────────────────┐
│ attachments/    │                          │ pages/sessions/ │
│ sessions/*.log  │─────── convert ─────────▶│ *.adoc          │
│ (raw output)    │                          │ (formatted)     │
└─────────────────┘                          └─────────────────┘

Quick Start

# 1. Start session
infra-session 2026-02-26-wazuh-diag

# 2. Run commands (auto-logged)
tlog kubectl get pods -n wazuh
tlog netapi wazuh health
tlog ssh vault-01 "vault status"

# 3. End session
infra-session-end

Raw Logs Location

domus-infra-ops/docs/asciidoc/modules/ROOT/
├── attachments/
│   └── sessions/           # Raw .log files (tee output)
│       ├── 2026-02-26-wazuh-diag.log
│       └── 2026-02-27-vault-troubleshoot.log
└── pages/
    └── sessions/           # Converted .adoc (this section)
        ├── index.adoc
        └── 2026-02-26-wazuh-diag.adoc

Converting Raw Logs to AsciiDoc

After a session, convert the raw log to a formatted page:

  1. Copy the template: cp template.adoc YYYY-MM-DD-<name>.adoc

  2. Open the raw log: attachments/sessions/<name>.log

  3. Copy command blocks into [source,bash] sections

  4. Add analysis, root cause, and outcome sections

  5. Add to nav.adoc under Sessions

Session Types

Type Naming Convention Example

Troubleshooting

YYYY-MM-DD-<system>-<issue>

2026-02-26-wazuh-archives-diag

Configuration

YYYY-MM-DD-<system>-config

2026-02-26-vault-ha-config

Deployment

YYYY-MM-DD-<system>-deploy

2026-02-26-k3s-argocd-deploy

Maintenance

YYYY-MM-DD-<system>-maint

2026-02-26-nas-firmware-maint

Investigation

YYYY-MM-DD-<topic>-invest

2026-02-26-auth-failures-invest