Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c42c72037 | ||
|
|
5d0e705b30 | ||
|
|
6986f36237 | ||
|
|
4316d503d2 | ||
|
|
1b2684c35b | ||
|
|
ec91122621 | ||
|
|
fc720823db | ||
|
|
8d47e085cb | ||
|
|
54ae8ce463 | ||
|
|
cd2e7864a4 | ||
|
|
fec9f6e0e5 |
@@ -29,7 +29,7 @@ Build and boot the dedicated installer image — see
|
||||
`images/edge-host-iso/README.md`. Short version:
|
||||
|
||||
1. `sudo pacman -S archiso && sudo images/edge-host-iso/build.sh`
|
||||
2. Write ISO to a USB stick, boot the target box from it, run `edge-install`
|
||||
2. Write ISO to a USB stick, boot the target box from it, run `edge-install <hostname>`
|
||||
(partitions the internal disk — NVMe if present, else the eMMC; the
|
||||
installer autodetects — installs the ansible-ready base system with SSH
|
||||
keys, DHCP, docker — asks for confirmation before wiping).
|
||||
|
||||
@@ -22,6 +22,7 @@ proxy-2.renner.uno ansible_host=proxy-2.nb.renner.uno ansible_user=root
|
||||
# sub-interface. Nothing here assumes any peripheral is attached.
|
||||
[edge_host]
|
||||
edge-1.iot.renner.uno ansible_user=root
|
||||
edge-2.iot.renner.uno ansible_user=root
|
||||
|
||||
# Synology NAS (DSM): nas-1 RS1221+ on site, nas-2 DS1522+ off site.
|
||||
[synology_nas]
|
||||
@@ -73,6 +74,7 @@ proxy-1.renner.uno
|
||||
proxy-2.renner.uno
|
||||
netbird.renner.uno
|
||||
edge-1.iot.renner.uno
|
||||
edge-2.iot.renner.uno
|
||||
nas-1.renner.uno
|
||||
nas-2.renner.uno
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@
|
||||
edge-1.iot.renner.uno:
|
||||
priority: 70
|
||||
state: "BACKUP"
|
||||
edge-2.iot.renner.uno:
|
||||
priority: 60
|
||||
state: "BACKUP"
|
||||
|
||||
roles:
|
||||
- role: chrony-ntp-server
|
||||
|
||||
@@ -16,7 +16,7 @@ edge_mqtt_bridge_cafile: /etc/ssl/certs/ca-certificates.crt
|
||||
# kubernetes/apps/home-assistant/mqtt-accounts.yaml). The controller pushes
|
||||
# its password to edge-mqtt-cred and rotates it when the bridge reports
|
||||
# "not connected"; there is no copy in ansible-vault.
|
||||
edge_mqtt_bridge_account: edge-1
|
||||
edge_mqtt_bridge_account: "{{ inventory_hostname_short }}"
|
||||
# HTTPS port of edge-mqtt-cred (esp32 device API, mTLS). Only a client
|
||||
# certificate from the MQTT CA with this CN is accepted.
|
||||
edge_mqtt_cred_port: 8443
|
||||
|
||||
@@ -7,7 +7,7 @@ connection {{ edge_mqtt_bridge_account }}
|
||||
address {{ edge_mqtt_cluster_host }}:{{ edge_mqtt_cluster_tls_port }}
|
||||
bridge_cafile {{ edge_mqtt_bridge_cafile }}
|
||||
bridge_insecure false
|
||||
remote_clientid edge1-bridge
|
||||
remote_clientid {{ edge_mqtt_bridge_account | replace('-', '') }}-bridge
|
||||
cleansession false
|
||||
try_private true
|
||||
restart_timeout 5 30
|
||||
|
||||
@@ -143,6 +143,12 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Install sudo
|
||||
ansible.builtin.package:
|
||||
name: sudo
|
||||
state: present
|
||||
when: not ssh_ca_synouser.stat.exists
|
||||
|
||||
- name: Install the Claude sudo rules
|
||||
ansible.builtin.template:
|
||||
src: sudoers-claude.j2
|
||||
|
||||
@@ -42,10 +42,11 @@ for the CA key; rebuild the ISO after a CA rotation.
|
||||
2. Boot the target from it (UEFI, Secure Boot off; one-time F12/setup
|
||||
visit if the box doesn't already boot USB first)
|
||||
3. Either on the console (auto-login as root) or headless —
|
||||
`ssh root@<dhcp-ip>` with an owner certificate — run `edge-install`. It auto-detects the internal disk
|
||||
(NVMe, else eMMC — covers the Wyse 3040 — else first non-USB disk),
|
||||
shows the target and requires typing the hostname before wiping
|
||||
anything. Override with `edge-install /dev/sdY`.
|
||||
`ssh root@<dhcp-ip>` with an owner certificate — run
|
||||
`edge-install <hostname>` (e.g. `edge-install edge-2`). It auto-detects
|
||||
the internal disk (NVMe, else eMMC — covers the Wyse 3040 — else first
|
||||
non-USB disk), shows the target and requires typing the hostname before
|
||||
wiping anything. Override with `edge-install <hostname> /dev/sdY`.
|
||||
4. Reboot. Confirm the box is reachable by name — `ssh root@<host>` — before
|
||||
going further; it is identified by name everywhere and its address is
|
||||
never recorded. Then add it to `[edge_host]` in
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Installer for edge-1 (bare-metal edge host, replaces the k8s-edge VM).
|
||||
# Installer for the bare-metal edge hosts (edge-1, edge-2, ...).
|
||||
# Runs from the edge-host ISO live environment. WIPES the target disk.
|
||||
# Usage: edge-install [disk]
|
||||
# Default: the internal disk — first NVMe, else eMMC (Wyse 3040), else
|
||||
# Usage: edge-install <hostname> [disk]
|
||||
# Default disk: the internal disk — first NVMe, else eMMC (Wyse 3040), else
|
||||
# the first non-USB, non-optical disk. The live USB stick itself is
|
||||
# excluded via the ISO9660 label mount.
|
||||
set -euo pipefail
|
||||
|
||||
HOST=edge-1
|
||||
usage() { echo "usage: edge-install <hostname> [disk]"; exit 1; }
|
||||
[ $# -ge 1 ] && [ $# -le 2 ] || usage
|
||||
HOST=$1
|
||||
# RFC 1123 label: what systemd-networkd sends as the DHCP hostname.
|
||||
[[ "$HOST" =~ ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ ]] \
|
||||
|| { echo "invalid hostname: $HOST"; exit 1; }
|
||||
shift
|
||||
|
||||
detect_disk() {
|
||||
# eMMC needs mmc_block before any /dev/mmcblk* exists (see
|
||||
@@ -51,7 +57,7 @@ mount --mkdir "$(part 1)" /mnt/boot
|
||||
|
||||
# Everything the edge-host ansible role expects to find; the role itself
|
||||
# is applied over SSH after first boot (see ansible/docs/edge-host.md).
|
||||
pacstrap -K /mnt base linux linux-firmware intel-ucode openssh python git \
|
||||
pacstrap -K /mnt base linux linux-firmware intel-ucode openssh sudo python git \
|
||||
docker docker-compose
|
||||
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
|
||||
@@ -34,7 +34,7 @@ spec:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: wlan-setup
|
||||
image: gitea.renner.uno/gitea_admin/wlan-setup:2026-11-05-1429 # {"$imagepolicy": "flux-system:wlan-setup"}
|
||||
image: gitea.renner.uno/gitea_admin/wlan-setup:2026-11-05-1517 # {"$imagepolicy": "flux-system:wlan-setup"}
|
||||
env:
|
||||
# Client secret of the "WLAN setup" OAuth2 provider.
|
||||
- name: WLAN_SETUP_CLIENT_SECRET
|
||||
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: gitea-mcp
|
||||
image: docker.gitea.com/gitea-mcp-server:1.12.0 # {"$imagepolicy": "flux-system:gitea-mcp"}
|
||||
image: docker.gitea.com/gitea-mcp-server:1.13.0 # {"$imagepolicy": "flux-system:gitea-mcp"}
|
||||
# Image has no ENTRYPOINT (binary is in CMD), so args alone would replace it.
|
||||
command:
|
||||
- /app/gitea-mcp
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
# No sml2mqtt/#: the SML meter reader is retired for good (owner,
|
||||
# 2026-09-19; grid data comes from the E380 on the CAN bus).
|
||||
acl: ["readwrite open3e/#"]
|
||||
# edge-2's local mosquitto bridge, same role and pinning as edge-1.
|
||||
- name: edge-2
|
||||
auth: password
|
||||
deliver: {esp32: "https://edge-2.iot.renner.uno:8443"}
|
||||
acl: ["readwrite open3e/#"]
|
||||
# Shellies (REN-1017): one password account per device, pushed by the
|
||||
# controller through shelly-manager's per-device API. Name shelly-<id> =
|
||||
# shelly-manager device id. ACL as the former shared user `shellies`
|
||||
|
||||
@@ -76,6 +76,10 @@ spec:
|
||||
value: "netbird-ingress-$(NODE_NAME)"
|
||||
- name: NB_LOG_LEVEL
|
||||
value: "info"
|
||||
# stdout only; the image default also writes client.log into the
|
||||
# 16Mi state tmpfs.
|
||||
- name: NB_LOG_FILE
|
||||
value: "console"
|
||||
# rootless image needs a writable HOME for its state.
|
||||
- name: USER
|
||||
value: "netbird"
|
||||
|
||||
@@ -516,6 +516,7 @@ spec:
|
||||
- matchPattern: "*"
|
||||
- toFQDNs:
|
||||
- matchName: "edge-1.iot.renner.uno"
|
||||
- matchName: "edge-2.iot.renner.uno"
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "8443"
|
||||
|
||||
Reference in New Issue
Block a user