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.
bin/udmi <command> [site_model] [project_spec] [target_id] [block] [+only | !exclude | ++optional]
| 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. |
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'
<ns> (e.g. btesting, alpha, or default).[20000, 55000] ($\text{port} = 20000 + ((\text{SHA-256}(ns) \bmod 3500) \times 10)$).sites/udmi~<ns>.//mqtt/localhost:<port>.bin/udmi start //mqtt/localhost:46432
46432) and targets the default site model sites/udmi_site_model.bin/udmi start path/to/cloud_iot_config.json
bin/udmi start sites/udmi_site_model //mqtt/localhost:46432
bin/udmi start sites/udmi_site_model alpha -> REJECTED. Mixing an explicit site model directory with a namespace is invalid. Use an explicit connection spec (e.g., //mqtt/localhost:46432) or a solo namespace.bin/udmi start sites/udmi_site_model -> REJECTED. An explicit site model directory requires an explicit connection spec.//... or :...), or valid alphanumeric namespace identifier fails immediately with an error.sudo or root privileges. Runtime state, databases, and logs are isolated inside var/ and out/.apt-get in bin/setup_base) dynamically check $(id -u) == 0. Running sudo bin/setup_base installs system-level dependencies, while executing bin/setup_base unprivileged configures virtual environments and site models without triggering sudo.bin/udmi coordinates two primary service controllers:
mosquitto, udmis, etcd, pubsub).butler, validator, registrar, postgres, influxdb).| 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 |
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