|
@@ -37,8 +37,17 @@ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
|
|
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON
|
|
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-After building a service, restart it to actually run the new binary:
|
|
|
|
|
-`systemctl --user restart smartbotic-webserver smartbotic-runner`.
|
|
|
|
|
|
|
+After building a service, restart it to actually run the new binary. **The two
|
|
|
|
|
+services live on different machines and are managed by different init systems**
|
|
|
|
|
+(split 2026-09-03):
|
|
|
|
|
+
|
|
|
|
|
+| | host | restart with |
|
|
|
|
|
+| --- | --- | --- |
|
|
|
|
|
+| webserver | zeus (Void Linux, runit) | `sudo sv restart smartbotic-webserver` |
|
|
|
|
|
+| runner | mulan (Debian, systemd) | `ssh mulan systemctl --user restart smartbotic-runner` |
|
|
|
|
|
+
|
|
|
|
|
+There is no `systemctl` on zeus at all - it prints "command not found" rather
|
|
|
|
|
+than failing in any way that looks like a wrong host.
|
|
|
|
|
|
|
|
### Frontend (webui/)
|
|
### Frontend (webui/)
|
|
|
```bash
|
|
```bash
|
|
@@ -52,24 +61,38 @@ npm run lint # ESLint
|
|
|
## Running Services
|
|
## Running Services
|
|
|
|
|
|
|
|
The database is **not** built from this repo - it is the standalone upstream
|
|
The database is **not** built from this repo - it is the standalone upstream
|
|
|
-`smartbotic-database` daemon, installed from the SmartBotics APT repository and
|
|
|
|
|
-managed as a system service. Start it first, then the in-repo services:
|
|
|
|
|
|
|
+`smartbotic-database` daemon. It runs on zeus as the Docker container
|
|
|
|
|
+`smartbotic-db` (moved there 2026-08-09; it and the SD.cpp REST API could not
|
|
|
|
|
+share mulan's memory), so it is neither an APT package nor a system service on
|
|
|
|
|
+the host any more. It is already up; the in-repo services connect to it:
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
-# 1. Upstream database daemon (gRPC port 9004)
|
|
|
|
|
-sudo systemctl start smartbotic-database
|
|
|
|
|
-
|
|
|
|
|
-# 2. WebServer (HTTP port 8090, gRPC port 9012)
|
|
|
|
|
-./build/smartbotic-webserver
|
|
|
|
|
|
|
+# 1. Database daemon - already running on zeus as the Docker container
|
|
|
|
|
+# `smartbotic-db`, published on 9004. Not started from this repo.
|
|
|
|
|
+docker ps --filter name=smartbotic-db
|
|
|
|
|
|
|
|
-# 3. Runner(s) (gRPC port 9011)
|
|
|
|
|
-./build/smartbotic-runner
|
|
|
|
|
|
|
+# 2. WebServer on zeus (HTTP 8090, WebSocket 8091, gRPC 9012 + 9013)
|
|
|
|
|
+sudo sv status smartbotic-webserver # runit, not systemd
|
|
|
|
|
+tail -f /var/log/smartbotic-webserver/current
|
|
|
|
|
|
|
|
-# Or use systemd for the in-repo services
|
|
|
|
|
-systemctl --user start smartbotic.target
|
|
|
|
|
-journalctl --user -u smartbotic-* -f
|
|
|
|
|
|
|
+# 3. Runner on mulan (gRPC port 9011)
|
|
|
|
|
+ssh mulan systemctl --user status smartbotic-runner
|
|
|
|
|
+ssh mulan journalctl --user -u smartbotic-runner -f
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+Because the two are split, three addresses must point across the network. They
|
|
|
|
|
+are env overrides in a systemd drop-in on mulan
|
|
|
|
|
+(`~/.config/systemd/user/smartbotic-runner.service.d/zeus-webserver.conf`), NOT
|
|
|
|
|
+in `config/runner.json` - that file is tracked in git and shared by both hosts,
|
|
|
|
|
+so its `localhost` defaults cannot be edited per machine:
|
|
|
|
|
+
|
|
|
|
|
+| variable | value | what breaks without it |
|
|
|
|
|
+| --- | --- | --- |
|
|
|
|
|
+| `WEBSERVER_ADDRESS` | `zeus.fsociety.hu:8090` | the runner never registers |
|
|
|
|
|
+| `NODE_SYNC_ADDRESS` | `zeus.fsociety.hu:9012` | no node updates reach it |
|
|
|
|
|
+| `CREDENTIAL_SERVICE_ADDRESS` | `zeus.fsociety.hu:9013` | credentials and workflow-control fail |
|
|
|
|
|
+| `ADVERTISE_ADDRESS` | `mulan.fsociety.hu:9011` | the runner registers as `localhost:9011`, reports **online**, and dispatches silently go to the webserver's own host |
|
|
|
|
|
+
|
|
|
Both the database address and the project namespace are configurable everywhere,
|
|
Both the database address and the project namespace are configurable everywhere,
|
|
|
via `config/webserver.json` and `config/runner.json`:
|
|
via `config/webserver.json` and `config/runner.json`:
|
|
|
|
|
|