Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 2.83 KB

File metadata and controls

66 lines (51 loc) · 2.83 KB

How the installer works

For people changing the installer rather than using it. Back to the README.

Shape

Two halves:

  • A shell TUI (tui/) asks the questions, and utils/ detects the machine — distribution, hardware, sound and display servers, existing installs.
  • An Ansible playbook (ansible/) does the work, driven by ansible/site.yml against localhost.

installer.sh is the entry point the one-liner downloads. It clones this repository and hands over to setup.sh, which runs the detection, then the TUI, then the playbook.

Because installer.sh clones main on every run, whatever is on main is what users get on their next install.

The screens

Screens live in tui/ and are steps in a list. Each reports next, back or repeat through TUI_NAV and returns; tui/main.sh walks the flow and decides what comes next, stepping over screens a given run does not need. This is what lets Back work from anywhere without screens having to know about each other.

Their text is translated. tui/locales/ is generated — edit translations/<locale>/strings.json instead, and regenerate with scripts/sync_translations.py. Translations come from GitLocalize, so hand-edited locale files are overwritten.

The playbook

A wrapper role, ovos_installer, orchestrates focused roles roughly in this order:

Role Responsibility
ovos_facts Shared installer facts: boot directory, NetworkManager, systemd paths
ovos_timezone Detect and configure the system timezone
ovos_config Configuration defaults and mycroft.conf generation
ovos_sound Sound server setup, PipeWire or PulseAudio
ovos_virtualenv Python virtual environment and package installation
ovos_containers Docker and compose provisioning and deployment
ovos_services Systemd units and handlers, user or system scope
ovos_telemetry Optional telemetry submission
ovos_storage_tuning fstab, log2ram and tmpfs tuning
ovos_audio_tuning PipeWire and WirePlumber tuning
ovos_python Python runtime tuning, mimalloc and environment
ovos_performance_tuning Governor, I/O, zram, sysctl, NUMA, limits
ovos_network_tuning Wireless power management and DNS caching
ovos_finalize Post-install cleanup and drift notice
ovos_hardware_mark1, ovos_hardware_mark2 Hardware-specific, applied when that hardware is detected

Tests

tests/bats/ runs under bats. Most of it stubs whiptail, which keeps it fast; tests/bats/tui_whiptail.bats drives the real binary in a pseudo terminal, because the stub cannot show how whiptail itself behaves.

Screenshots in the README are generated by scripts/render_screenshots.py, which walks the flow and renders what the terminal actually displays.