's'
This commit is contained in:
77
docs/install-profiles.md
Normal file
77
docs/install-profiles.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# Linux Install Profiles
|
||||
|
||||
## Quick Start
|
||||
|
||||
Use one of these entrypoints from the repo root on Debian, Ubuntu, or Armbian:
|
||||
|
||||
```bash
|
||||
sudo bash install-hub.sh
|
||||
sudo bash install-business.sh
|
||||
sudo bash install-all.sh
|
||||
```
|
||||
|
||||
## What Each Script Does
|
||||
|
||||
### `install-hub.sh`
|
||||
|
||||
Use this when the Linux device should become the reusable super hub first.
|
||||
|
||||
- Creates and refreshes the `live` account
|
||||
- Installs the shared control plane runtime
|
||||
- Enables `live.local`
|
||||
- Creates the default Wi-Fi profile `live / 12345678` when `wlan0` exists
|
||||
- Installs ShellCrash, WebTTY, Cockpit, File Browser, Homepage, and Netdata
|
||||
- Installs the Android web panel based on `web-scrcpy`
|
||||
- Builds the web console and enables `live-console.service`
|
||||
|
||||
### `install-business.sh`
|
||||
|
||||
Use this when the device should only run the Douyin or YouTube business stack.
|
||||
|
||||
- Creates and refreshes the `live` account
|
||||
- Installs the shared control plane runtime
|
||||
- Installs ffmpeg, mpv, ADB, Chromium
|
||||
- Installs the Android web panel based on `web-scrcpy`
|
||||
- Starts SRS
|
||||
- Builds the web console and enables `live-console.service`
|
||||
- Generates the hardware profile for adaptive ARM or X86 defaults
|
||||
|
||||
### `install-all.sh`
|
||||
|
||||
Use this when the node should be both the super hub and the livestream business node.
|
||||
|
||||
- Runs `install-hub.sh`
|
||||
- Runs `install-business.sh`
|
||||
- Reuses shared modules instead of replacing them
|
||||
|
||||
## Shared Config
|
||||
|
||||
All install profiles read the same shared file:
|
||||
|
||||
- `config/system-stack.env`
|
||||
|
||||
If the file does not exist, the installer copies:
|
||||
|
||||
- `config/system-stack.env.example`
|
||||
|
||||
This keeps host identity, ports, Wi-Fi, ShellCrash path, and module toggles centralized.
|
||||
|
||||
## Default Access URLs
|
||||
|
||||
With the default hostname and ports, a fresh hub exposes:
|
||||
|
||||
- `http://live.local:8001` main control plane
|
||||
- `http://live.local:8001/shellcrash` ShellCrash editor route
|
||||
- `http://live.local:8001/android` Android device center route
|
||||
- `http://live.local:7681` WebTTY
|
||||
- `http://live.local:8082` File Browser, default login `live / 12345678`
|
||||
- `http://live.local:19999` Netdata
|
||||
|
||||
The ShellCrash and Android pages are separate routes on purpose, so they can be bookmarked directly instead of sharing the same tabbed root URL.
|
||||
|
||||
## Separation Rules
|
||||
|
||||
- The hub profile must keep working without SRS.
|
||||
- The business profile must keep working without Cockpit, Homepage, File Browser, or Netdata.
|
||||
- The control plane should show degraded modules as unavailable instead of crashing.
|
||||
- Every service must be removable by systemd or compose boundaries.
|
||||
103
docs/super-hub-architecture.md
Normal file
103
docs/super-hub-architecture.md
Normal file
@@ -0,0 +1,103 @@
|
||||
# Super Hub Architecture
|
||||
|
||||
## Goal
|
||||
|
||||
Build the ARM or X86 node as a reusable Linux super hub instead of a single-purpose
|
||||
streaming box. The Douyin or YouTube workflow is one optional business module that can
|
||||
be installed alone or layered on top of the hub later.
|
||||
|
||||
## Install Profiles
|
||||
|
||||
- `install-hub.sh`
|
||||
- Base Linux super hub
|
||||
- Web control plane
|
||||
- mDNS `live.local`
|
||||
- Wi-Fi onboarding profile
|
||||
- ShellCrash
|
||||
- WebTTY
|
||||
- Cockpit
|
||||
- File Browser
|
||||
- Homepage
|
||||
- Netdata
|
||||
- Hardware probe
|
||||
|
||||
- `install-business.sh`
|
||||
- Shared control plane runtime
|
||||
- ffmpeg, mpv, ADB, Chromium
|
||||
- SRS
|
||||
- Hardware probe and adaptive decode defaults
|
||||
- Douyin or YouTube business orchestration
|
||||
|
||||
- `install-all.sh`
|
||||
- Runs the hub profile first
|
||||
- Runs the business profile second
|
||||
- Safe to rerun because the shared pieces are idempotent
|
||||
|
||||
## Layers
|
||||
|
||||
1. Base Node
|
||||
- Debian / Ubuntu / Armbian
|
||||
- `live` user
|
||||
- mDNS with `live.local`
|
||||
- Wi-Fi bootstrap
|
||||
- hardware probe and graceful degradation
|
||||
|
||||
2. Control Plane
|
||||
- FastAPI backend
|
||||
- Next.js panel
|
||||
- managed config roots
|
||||
- service registry and status polling
|
||||
|
||||
3. Hub Modules
|
||||
- ShellCrash
|
||||
- WebTTY
|
||||
- Cockpit
|
||||
- File Browser
|
||||
- Homepage
|
||||
- Netdata
|
||||
- Android Web Panel
|
||||
|
||||
4. Business Modules
|
||||
- Douyin / YouTube relay app
|
||||
- SRS
|
||||
- HDMI playback bridge
|
||||
- Android / ADB integration
|
||||
- Chromium persistent profile
|
||||
- Browser-based device control via web-scrcpy
|
||||
|
||||
5. Future Modules
|
||||
- Caddy
|
||||
- WireGuard
|
||||
- FRP
|
||||
- Matrix
|
||||
- Uptime Kuma
|
||||
- n8n
|
||||
- AI and media workloads
|
||||
|
||||
## Design Rules
|
||||
|
||||
- `install-hub.sh` must never hard-depend on business services such as SRS.
|
||||
- `install-business.sh` must work on a clean Linux system without requiring the hub profile first.
|
||||
- If the hub profile already exists, the business profile must reuse it instead of replacing it.
|
||||
- Each service stays in its own systemd unit or compose file so it can be removed without breaking unrelated modules.
|
||||
- The control plane edits only managed roots and never exposes arbitrary filesystem write access.
|
||||
- ARM and X86 share one control plane, then diverge only through the generated hardware profile.
|
||||
|
||||
## Current Implementation
|
||||
|
||||
- `scripts/linux/lib/common.sh` contains the shared install functions used by every profile.
|
||||
- `scripts/linux/install_hub.sh` installs the reusable Linux super hub.
|
||||
- `scripts/linux/install_business.sh` installs the Douyin or YouTube business module.
|
||||
- `scripts/linux/install_stack.sh` remains as a compatibility entrypoint for `hub`, `business`, and `all`.
|
||||
- `src/control_plane.py` exposes managed roots, hardware profile loading, and service actions.
|
||||
- `scripts/hardware_probe.py` generates safe runtime defaults for ARM and X86.
|
||||
- `services/` keeps dockerized modules isolated instead of merging them into one monolith.
|
||||
|
||||
## Recommended Next Modules
|
||||
|
||||
- Caddy for unified reverse proxy and TLS
|
||||
- wg-easy for WireGuard mesh management
|
||||
- FRP panel for tunnel management
|
||||
- Uptime Kuma for alerting
|
||||
- n8n for workflow automation
|
||||
- Matrix plus Element for messaging and operations collaboration
|
||||
Reference in New Issue
Block a user