udmi

UDMI / Docs / Tools / udmi

UDMI Local Orchestrator (bin/udmi)

bin/udmi is the singular, canonical orchestrator for managing local UDMI infrastructure services, background daemons, and test environments. It coordinates lower-level controllers (bin/tmux_barbican and bin/tmux_butler) to provide automated service lifecycle management with unprivileged, non-root execution.


1. Command Syntax

bin/udmi <command> [site_model] [project_spec] [target_id] [block] [+only | !exclude | ++optional]

Commands

Command Description State Behavior
start Starts local UDMI infrastructure services in background tmux sessions. Non-destructive; preserves existing database, certificates, and state.
stop Gracefully terminates local services across tmux sessions. Non-destructive; leaves runtime artifacts intact for post-mortem analysis.
clean Purges runtime state, cached certificates, databases, and logs. Destructive; removes var/ runtime state without starting services.
restart Clean-slate sequence: { stop, clean, start }. Destructive reset followed by fresh startup.
status Displays diagnostic probes (PIDs, listening ports, health endpoints) for all services. Read-only.
logs Dumps pane scrollback logs (bin/udmi logs [session[:window]] [num_lines]). Read-only.
attach Attaches interactively to a session (bin/udmi attach [session]). Interactive terminal (Ctrl-b d to detach).
help Shows CLI usage and available options. Read-only.

2. Target Invocation Patterns

bin/udmi supports four deterministic, mutually exclusive target argument formats:

bin/udmi start btesting
bin/udmi start alpha
bin/udmi start  # Defaults to namespace 'default'

B. Solo Connection Spec

bin/udmi start //mqtt/localhost:46432

C. Solo Configuration File

bin/udmi start path/to/cloud_iot_config.json

D. Explicit Model + Spec Pair

bin/udmi start sites/udmi_site_model //mqtt/localhost:46432

Fail-Fast Invariants (Rejected Combinations)


3. Non-Root Execution by Default


4. Managed Services & Service Filters

bin/udmi coordinates two primary service controllers:

Service Filter Modifiers

Filter Syntax Description Example
+service Run only the specified service(s). bin/udmi start btesting +mosquitto
!service Exclude the specified service from startup. bin/udmi start btesting !udmis
++service Enable an optional service (disabled by default). bin/udmi start btesting ++pubsub

5. Blocking Mode

When launching in automated environments or container entrypoints, append block to keep the process running in the foreground until interrupted:

bin/udmi start //mqtt/localhost:46432 block