Skip to main content

Module ecosystem

Module ecosystem 

Source
Expand description

Shared status-api + MCP install (remote payload and embedded full apply).

Structsยง

EcosystemInstallChoice
Which ecosystem services to install (user opt-in, default neither).

Constantsยง

API_TOKEN_DROP_BASENAME
User-owned drop file basename for token capture (remote).
DEFAULT_INSTALL_DIR
Default install prefix for box binaries and unit ExecStart paths.
ENSURE_API_TOKEN_SCRIPT
Ensure /etc/horto-os-ui/api.env exists with a random bearer token (0600).
MCP_UNIT
MCP systemd unit from packaging (kept in sync via include_str!).
STATUS_API_UNIT
Status-api systemd unit body (ExecStart defaults to /usr/local/bin).

Functionsยง

api_env_path ๐Ÿ”’
ensure_api_env_at ๐Ÿ”’
Create or reuse horto-os-ui/api.env under etc_root and return the bearer hex.
install_bin ๐Ÿ”’
install_ecosystem_after_embedded_apply
Resolve local bins and install selected ecosystem services after embedded full apply.
install_ecosystem_services
Install selected ecosystem bins into install_dir and enable chosen units.
install_ecosystem_services_at ๐Ÿ”’
Same as install_ecosystem_services, with injectable etc_root for tests.
parse_api_token_line ๐Ÿ”’
random_hex_token ๐Ÿ”’
remote_enable_ecosystem_script
Shell fragment: install selected bins/units from staging.
unit_with_install_dir
Rewrite default /usr/local/bin/ ExecStart paths for a custom install prefix.
write_mode_600 ๐Ÿ”’
write_unit_file ๐Ÿ”’