Files
leleka/deploy

Deployment

Linux CI builds a statically linked musl CLI/control-plane preview and publishes it as a prerelease artifact on version tags. This is not yet a complete GPU runtime: the C++/CUDA engine is not linked into that executable. The host must have a compatible NVIDIA driver already installed (CUDA 13.0 GA baseline: 580.65.06 or newer). The strata-next doctor command checks the installed version. Model weights belong on an external volume. A complete GPU deployment image has not been built yet.

For a local static CLI image smoke test, build deploy/Dockerfile.static-cli with a Linux/musl target. The final image is scratch plus the CLI binary. It is a packaging test, not the deployment image for inference.

Worker recovery

The Rust supervisor defaults to three lifetime restarts after a post-READY worker failure, with 2/4/8-second backoff. Configure engine.max_restarts or STRATA_MAX_WORKER_RESTARTS from 0 to 3; zero disables recovery. Failed and queued generations are not replayed. Readiness stays false until the new worker handshake completes. A startup failure or an exhausted budget leaves the service unhealthy for inference until an operator restarts it; /health remains available. See the API contract.

Native Linux service lifecycle

strata-next service-unit renders a systemd user unit to stdout. It does not install, start, enable or replace a service. Provision the native executable, engine, tokenizer and private JSON configuration first; all supplied paths must be absolute and exist. Systemd disallows quotes and backslashes in the executable path; the renderer rejects these with a relocation instruction. For example, on the Linux host:

umask 077
mkdir -p "$HOME/.config/systemd/user"
/absolute/path/strata-next service-unit \
  --config /absolute/path/config.json \
  --working-dir /absolute/path/engine-workdir \
  --env-file /absolute/path/runtime.env > "$HOME/strata-next.service"
systemd-analyze --user verify "$HOME/strata-next.service"
# Review the generated unit before installing. Do not overwrite a live unit.
systemctl --user link "$HOME/strata-next.service"
systemctl --user start strata-next.service
systemctl --user status strata-next.service
journalctl --user -u strata-next.service -n 100

Omit --env-file if unnecessary. The file uses systemd EnvironmentFile syntax, not shell commands; it can set LD_LIBRARY_PATH and engine tuning variables. Its path cannot contain glob characters (*, ?, [), backslashes or trailing whitespace, because systemd interprets that directive as a filename pattern. serve --config FILE selects the explicit config even if STRATA_CONFIG is also set; other documented environment overrides still apply. Keep the API bound to loopback and use SSH forwarding; optional bearer authentication does not provide transport encryption. Set STRATA_API_KEY_FILE to a private key file to enable the native auth gate.

Systemd process startup is not model readiness: check the configured /ready endpoint before connecting the console harness. Restart=no preserves the supervisor's finite worker restart policy. SIGTERM goes to the supervisor; remaining processes in its cgroup are killed after the 45-second stop deadline. No model or logs are copied into a release by rendering the unit. Journald retention is managed by the host; model and capture paths should remain private.

To stop and remove an explicitly installed service:

systemctl --user stop strata-next.service
systemctl --user disable strata-next.service
systemctl --user daemon-reload

The service is not enabled at login/boot by these instructions. A running user manager is required. The existing trial endpoint remains externally launched; these instructions do not migrate it. Use the existing connect strata-native command once a provisioned service is ready.

Console controller

Install the opt-in controller commands on the laptop after the native Responses launcher integration (the installer preserves the selected connection):

python3 scripts/install-qwen-native.py
python3 scripts/install-qwen-native-service.py
qwen-codex-ctl native-service status --host rnr5090 --unit strata-next.service
qwen-codex-ctl native-service start --host rnr5090 --unit strata-next.service
qwen-codex-ctl native-service logs --host rnr5090 --unit strata-next.service
qwen-codex-ctl native-service stop --host rnr5090 --unit strata-next.service

These operate on an already provisioned systemd user unit through SSH; they never install, enable, migrate or switch a model. The host defaults to the launcher's configured SSH alias, and the unit to strata-next.service. Optional unit names must follow strata-next-NAME.service. Start/stop are idempotent; SSH calls time out after 90 seconds. Logs show the selected unit's last 100 entries. No service credentials are copied or stored by this helper.

The JSON status describes the process; model_readiness: not_checked is explicit. Model initialization can continue after process startup. The separate qwen-codex-ctl connect strata-native --url http://127.0.0.1:18084 --no-auth checks inference readiness through the existing SSH tunnel before switching the console connection. Tunnel setup remains separate. The existing plain start/stop commands retain their previous behavior; use native-service explicitly for a managed native unit. The currently running external trial has no such unit, so these commands safely report it as not provisioned.

Verification without GPU inference:

python3 scripts/smoke-service-unit.py /absolute/path/strata-next --lifecycle

This creates and removes an isolated CPU-only service on an unused loopback port. It checks real systemd path parsing (spaces, quotes, backslashes, $ and %), config precedence, environment loading, health, false readiness without a worker and process removal. Without --lifecycle, only unit syntax and rejected path checks run, as wired into Linux CI. Hosted CI execution remains pending.