Repository navigation
feat(edge): ThinkPad demo box host layer — one laptop is the whole kit (TRA-1381) - #795
Draft
mikestankavich wants to merge 5 commits into
Draft
mikestankavich wants to merge 5 commits into
mikestankavich wants to merge 5 commits into
Conversation
Since TRA-922 the subscriber listens only on topics a scan device registers, and the contract seed registers none, so step 3 of smoke-test.sh failed on every box. Register a probe device on trakrf.id/<cap> in bb-test-org (idempotent, keyed on the topic), and restart the backend once so the bulk subscribe on connect picks it up instead of waiting up to five minutes for the reconcile. Refs: TRA-1381 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs: TRA-1381 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The EliteDesk kit was a server, a Slate router and a separate laptop, and the port-by-port wiring was where setups went wrong. One ThinkPad now does all three, with deploy/edge as its unchanged stack. deploy/edge/laptop/setup-host.sh (idempotent, steps by name): - Tailscale enabled at boot, plus OpenSSH as the headless path when a Tailscale SSH check policy wants a browser - ranked Wi-Fi uplinks on the built-in card from a root-only file - demo LAN: bridge of the USB dongle AP and the Ethernet port (CS463 via PoE switch), NM shared mode on the Slate's subnet, SSID and PSK, so devices pointed at 192.168.8.10:1883 need no reconfiguration; refuses to run unless the Wi-Fi uplink holds the default route - Chrome kiosk on localhost (a secure context: Web Bluetooth without TLS) as an autologin user with no sudo - power key and lid-on-battery = clean poweroff, lid on AC ignored, BIOS power-on-with-AC, Absolute persistence disabled, battery 75-80 % - AppArmor: Ubuntu 26.04's host mosquitto profile also confines the containerized broker; grant its paths through local/mosquitto - journald capped at 500 MB seed.sh loads the demo org copy (kept off git: it carries BLE MACs) plus seed/20-demo-extras.sql (doorway CS463 and alarm plug on their grandfathered topics, entitlement, kiosk login) as trakrf-migrate, with the id-minting triggers disabled for its one transaction so copied keys hold and re-runs stay idempotent. The box serves app.demo-1.trakrf.id; the EliteDesk keeps app.demo.trakrf.id. just lint now shellchecks the demo-box scripts. Refs: TRA-1381 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --ssh on, tailscaled takes port 22 on the tailnet address and the tailnet's check policy demands a browser approval per session, which blocked every headless login on the box (the EliteDesk hit the same thing). Off, Tailscale is just the network and key-based OpenSSH answers. setup-host.sh now enforces --ssh=false and enables only the sshd unit the release ships. Refs: TRA-1381 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preview BLE org (gateways that publish to the preview broker, tags and assets) isn't needed on this box. seed/demo-org.sql now creates the box's own org (identifier = hostname) with Doorway 1, the CS463 and the alarm plug, keyed on natural keys like the contract seed, so the generate_*_id triggers mint ids as usual and the trigger toggling is gone. seed/login.sql runs once per line of a box-only logins file (email|name|role|superadmin): people's addresses stay out of this public repo. Each password is generated on first run into a stack-user- only file for copying into the password manager; delete a line there and re-run to reset it. Refs: TRA-1381 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One ThinkPad replaces the EliteDesk + Slate + separate laptop kit, acting as server, demo LAN and screen.
deploy/edgeis unchanged as the stack. The newdeploy/edge/laptop/adds the host layer around it:setup-host.sh: idempotent, with steps runnable by name.checkpolicy demands a browser per session.192.168.8.10:1883need no reconfiguration. The step refuses to run unless the Wi-Fi uplink already holds the default route.localhostas a no-sudo autologin user.seed.shcreates the box's own org (identifier = hostname) with Doorway 1, the CS463 and the alarm plug on their grandfathered topics, plus one login per line of a box-only logins file, so people's addresses stay out of this repo. Passwords are generated once into a stack-user-only file, for the password manager. It's keyed on natural keys, so re-runs are no-ops.app.demo-1.trakrf.id; the EliteDesk keepsapp.demo.trakrf.id.SETUP-CARD.mdis the one page for the person running the demo.Absorbed along the way, each in its own commit:
smoke-test.shcould not pass on any box. The subscriber listens only on registered topics, and the contract seed registers none. It now registers its own probe topic.just lintnow shellchecks the demo-box scripts.Worth a reviewer's eye
mosquittoprofile attaches by path and confines the broker inside the rootless container. It's fixed through the profile'slocal/include, so the quadlets are untouched.:8080is localhost-only by design. The demo LAN gets MQTT, DHCP and DNS. Traefik stays masked unless a second laptop has to join.Verified on the box (
trakrf-demo-1)TrakRF, and the kiosk session ran Chrome. BIOS settings applied (pending_reboot0), logind settings were live, and the battery read 75/80.br-demo): it got a DHCP lease in .100–.199, DNS resolvedapp.demo-1.trakrf.idto .10, and an MQTT publish to the broker succeeded./api/v1/auth/login.smoke-test.shPASS.just validatepasses.Draft because
Physical checks remain:
Refs TRA-1381
🤖 Generated with Claude Code