refactor(hosts): split chelsty monolith into chelsty-ha and chelsty-infra
- remove legacy hosts/chelsty/ monolith - chelsty-infra: add capabilities, networking, paths, runtime (mosquitto, zigbee2mqtt, stability-agent) - chelsty-ha: add capabilities - align with site/node model Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8a12b7ff17
commit
9d2f748557
24
hosts/chelsty-ha/capabilities.yaml
Normal file
24
hosts/chelsty-ha/capabilities.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
host: chelsty-ha
|
||||||
|
site: chelsty
|
||||||
|
|
||||||
|
capabilities:
|
||||||
|
networking:
|
||||||
|
reachability: tailscale-only
|
||||||
|
tailscale_ip: 100.122.201.23
|
||||||
|
ingress_suitability: false
|
||||||
|
bandwidth: LTE
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
container_engine: docker
|
||||||
|
os: debian
|
||||||
|
|
||||||
|
operational:
|
||||||
|
connectivity: intermittent
|
||||||
|
availability_target: best-effort
|
||||||
|
offline_first: true
|
||||||
|
uplink: lte
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
suitability:
|
||||||
|
- homeassistant
|
||||||
|
restricted: false
|
||||||
20
hosts/chelsty-ha/host.yaml
Normal file
20
hosts/chelsty-ha/host.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
hostname: chelsty-ha
|
||||||
|
site: chelsty
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- homeassistant
|
||||||
|
|
||||||
|
network:
|
||||||
|
tailscale_ip: 100.122.201.23
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
root: /opt/homelab
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
mode: pull
|
||||||
|
managed_by: saturn
|
||||||
|
|
||||||
|
constraints:
|
||||||
|
connectivity:
|
||||||
|
intermittent: true
|
||||||
|
uplink: lte
|
||||||
6
hosts/chelsty-ha/services.yaml
Normal file
6
hosts/chelsty-ha/services.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
host: chelsty-ha
|
||||||
|
site: chelsty
|
||||||
|
|
||||||
|
services:
|
||||||
|
homeassistant:
|
||||||
|
role: home-automation-controller
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
host: chelsty-infra
|
||||||
|
site: chelsty
|
||||||
|
|
||||||
capabilities:
|
capabilities:
|
||||||
hardware:
|
hardware:
|
||||||
cpu:
|
cpu:
|
||||||
|
|
@ -8,33 +11,34 @@ capabilities:
|
||||||
total_gb: 16
|
total_gb: 16
|
||||||
acceleration:
|
acceleration:
|
||||||
type: none
|
type: none
|
||||||
|
|
||||||
virtualization:
|
virtualization:
|
||||||
supported: true
|
supported: true
|
||||||
type: kvm
|
type: kvm
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
persistence: persistent
|
persistence: persistent
|
||||||
type: ssd
|
type: ssd
|
||||||
capacity_gb: 250
|
capacity_gb: 250
|
||||||
|
|
||||||
networking:
|
networking:
|
||||||
reachability: tailscale-only
|
reachability: tailscale-only
|
||||||
ingress_suitability: false
|
ingress_suitability: false
|
||||||
bandwidth: LTE
|
bandwidth: LTE
|
||||||
|
|
||||||
runtime:
|
runtime:
|
||||||
container_engine: docker
|
container_engine: docker
|
||||||
os: debian
|
os: debian
|
||||||
|
|
||||||
operational:
|
operational:
|
||||||
power_constraint: low-power
|
power_constraint: low-power
|
||||||
connectivity: intermittent
|
connectivity: intermittent
|
||||||
availability_target: best-effort
|
availability_target: best-effort
|
||||||
|
offline_operation_required: true
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
suitability:
|
suitability:
|
||||||
- staging
|
- staging
|
||||||
- homeassistant
|
- infra
|
||||||
- edge
|
- edge
|
||||||
restricted: false
|
restricted: false
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
hostname: chelsty
|
hostname: chelsty-infra
|
||||||
|
site: chelsty
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- edge
|
- edge
|
||||||
- hypervisor
|
- hypervisor
|
||||||
- homeassistant
|
- infra
|
||||||
- staging
|
- staging
|
||||||
|
|
||||||
network:
|
network:
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
host: chelsty
|
host: chelsty-infra
|
||||||
|
|
||||||
uplink:
|
uplink:
|
||||||
type: lte
|
type: lte
|
||||||
|
|
@ -20,7 +20,7 @@ exposure_classes:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
home_automation_lan:
|
home_automation_lan:
|
||||||
purpose: Home Assistant, MQTT, Zigbee coordinator, and local device control.
|
purpose: MQTT broker, Zigbee coordinator, and local device control.
|
||||||
offline_required: true
|
offline_required: true
|
||||||
internet_required_for_core_operation: false
|
internet_required_for_core_operation: false
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
host: chelsty
|
host: chelsty-infra
|
||||||
|
|
||||||
runtime_root: /opt/homelab
|
runtime_root: /opt/homelab
|
||||||
|
|
||||||
|
|
@ -9,12 +9,6 @@ conventions:
|
||||||
logs: /opt/homelab/logs
|
logs: /opt/homelab/logs
|
||||||
|
|
||||||
services:
|
services:
|
||||||
homeassistant:
|
|
||||||
data: /opt/homelab/data/homeassistant
|
|
||||||
config: /opt/homelab/config/homeassistant
|
|
||||||
logs: /opt/homelab/logs/homeassistant
|
|
||||||
backup_priority: critical
|
|
||||||
|
|
||||||
zigbee2mqtt:
|
zigbee2mqtt:
|
||||||
data: /opt/homelab/data/zigbee2mqtt
|
data: /opt/homelab/data/zigbee2mqtt
|
||||||
config: /opt/homelab/config/zigbee2mqtt
|
config: /opt/homelab/config/zigbee2mqtt
|
||||||
|
|
@ -27,13 +21,13 @@ services:
|
||||||
logs: /opt/homelab/logs/mosquitto
|
logs: /opt/homelab/logs/mosquitto
|
||||||
backup_priority: high
|
backup_priority: high
|
||||||
|
|
||||||
backup_sets:
|
stability-agent:
|
||||||
homeassistant:
|
data: /opt/homelab/state
|
||||||
include:
|
config: /opt/homelab/config/stability-agent
|
||||||
- /opt/homelab/config/homeassistant
|
logs: /opt/homelab/events
|
||||||
- /opt/homelab/data/homeassistant
|
backup_priority: low
|
||||||
restore_note: Restore before starting the Home Assistant container.
|
|
||||||
|
|
||||||
|
backup_sets:
|
||||||
zigbee2mqtt:
|
zigbee2mqtt:
|
||||||
include:
|
include:
|
||||||
- /opt/homelab/config/zigbee2mqtt
|
- /opt/homelab/config/zigbee2mqtt
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
services:
|
services:
|
||||||
stability-agent:
|
stability-agent:
|
||||||
environment:
|
environment:
|
||||||
- NODE_NAME=chelsty
|
- NODE_NAME=chelsty-infra
|
||||||
|
- SITE_NAME=chelsty
|
||||||
- REDIS_HOST=100.108.208.3
|
- REDIS_HOST=100.108.208.3
|
||||||
- REDIS_PORT=6379
|
- REDIS_PORT=6379
|
||||||
- REDIS_ENABLED=true
|
- REDIS_ENABLED=true
|
||||||
10
hosts/chelsty-infra/services.yaml
Normal file
10
hosts/chelsty-infra/services.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
host: chelsty-infra
|
||||||
|
site: chelsty
|
||||||
|
|
||||||
|
services:
|
||||||
|
mosquitto:
|
||||||
|
role: local-mqtt-broker
|
||||||
|
zigbee2mqtt:
|
||||||
|
role: zigbee-mqtt-bridge
|
||||||
|
stability-agent:
|
||||||
|
role: node-stability-monitor
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
host: chelsty
|
|
||||||
|
|
||||||
exposure_classes:
|
|
||||||
local-only:
|
|
||||||
description: Reachable only from CHELSTY-local networks or container networks.
|
|
||||||
public_ingress: false
|
|
||||||
tailscale_required: false
|
|
||||||
tailscale-internal:
|
|
||||||
description: Reachable through the Tailscale mesh by approved tailnet clients.
|
|
||||||
public_ingress: false
|
|
||||||
tailscale_required: true
|
|
||||||
public:
|
|
||||||
description: Reachable from the public internet through an explicit ingress path.
|
|
||||||
public_ingress: true
|
|
||||||
tailscale_required: false
|
|
||||||
|
|
||||||
operational_constraints:
|
|
||||||
uplink: lte
|
|
||||||
connectivity: intermittent
|
|
||||||
offline_operation_required: true
|
|
||||||
must_not_depend_on:
|
|
||||||
- saturn
|
|
||||||
- vps
|
|
||||||
- forgejo
|
|
||||||
|
|
||||||
services:
|
|
||||||
homeassistant:
|
|
||||||
role: home-automation-controller
|
|
||||||
deployment_model: docker-compose
|
|
||||||
exposure: tailscale-internal
|
|
||||||
offline_required: true
|
|
||||||
depends_on:
|
|
||||||
local:
|
|
||||||
- mosquitto
|
|
||||||
- zigbee2mqtt
|
|
||||||
external: []
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
container_port: 8123
|
|
||||||
protocol: tcp
|
|
||||||
runtime:
|
|
||||||
config_path: /opt/homelab/config/homeassistant
|
|
||||||
data_path: /opt/homelab/data/homeassistant
|
|
||||||
logs_path: /opt/homelab/logs/homeassistant
|
|
||||||
backup:
|
|
||||||
recommended: true
|
|
||||||
include:
|
|
||||||
- /opt/homelab/config/homeassistant
|
|
||||||
- /opt/homelab/data/homeassistant
|
|
||||||
notes:
|
|
||||||
- Back up before Home Assistant core, supervisor-equivalent, or integration upgrades.
|
|
||||||
- Keep local restore copies on CHELSTY because LTE connectivity may be unavailable during recovery.
|
|
||||||
|
|
||||||
zigbee2mqtt:
|
|
||||||
role: zigbee-mqtt-bridge
|
|
||||||
deployment_model: docker-compose
|
|
||||||
exposure: local-only
|
|
||||||
offline_required: true
|
|
||||||
depends_on:
|
|
||||||
local:
|
|
||||||
- mosquitto
|
|
||||||
external:
|
|
||||||
- slzb-06u
|
|
||||||
coordinator:
|
|
||||||
name: slzb-06u
|
|
||||||
connection: network
|
|
||||||
usb_device: null
|
|
||||||
ports:
|
|
||||||
- name: frontend
|
|
||||||
container_port: 8080
|
|
||||||
protocol: tcp
|
|
||||||
exposure: tailscale-internal
|
|
||||||
runtime:
|
|
||||||
config_path: /opt/homelab/config/zigbee2mqtt
|
|
||||||
data_path: /opt/homelab/data/zigbee2mqtt
|
|
||||||
logs_path: /opt/homelab/logs/zigbee2mqtt
|
|
||||||
backup:
|
|
||||||
recommended: true
|
|
||||||
include:
|
|
||||||
- /opt/homelab/config/zigbee2mqtt
|
|
||||||
- /opt/homelab/data/zigbee2mqtt
|
|
||||||
notes:
|
|
||||||
- Include configuration.yaml, database.db, coordinator backup files, and network key material.
|
|
||||||
- Restore Zigbee2MQTT state together with the SLZB-06U coordinator state when replacing hardware.
|
|
||||||
|
|
||||||
mosquitto:
|
|
||||||
role: local-mqtt-broker
|
|
||||||
deployment_model: docker-compose
|
|
||||||
exposure: local-only
|
|
||||||
offline_required: true
|
|
||||||
depends_on:
|
|
||||||
local: []
|
|
||||||
external: []
|
|
||||||
ports:
|
|
||||||
- name: mqtt
|
|
||||||
container_port: 1883
|
|
||||||
protocol: tcp
|
|
||||||
runtime:
|
|
||||||
config_path: /opt/homelab/config/mosquitto
|
|
||||||
data_path: /opt/homelab/data/mosquitto
|
|
||||||
logs_path: /opt/homelab/logs/mosquitto
|
|
||||||
backup:
|
|
||||||
recommended: true
|
|
||||||
include:
|
|
||||||
- /opt/homelab/config/mosquitto
|
|
||||||
- /opt/homelab/data/mosquitto
|
|
||||||
notes:
|
|
||||||
- Retain ACL, password, persistence, and bridge configuration if enabled.
|
|
||||||
|
|
||||||
stability-agent:
|
|
||||||
role: node-stability-monitor
|
|
||||||
deployment_model: docker-compose
|
|
||||||
exposure: local-only
|
|
||||||
offline_required: true
|
|
||||||
depends_on:
|
|
||||||
local:
|
|
||||||
- mosquitto
|
|
||||||
external: []
|
|
||||||
runtime:
|
|
||||||
config_path: /opt/homelab/config/stability-agent
|
|
||||||
data_path: /opt/homelab/state
|
|
||||||
logs_path: /opt/homelab/events
|
|
||||||
backup:
|
|
||||||
recommended: false
|
|
||||||
notes:
|
|
||||||
- Events and state are transient or can be reconstructed; high-frequency writes.
|
|
||||||
Loading…
Reference in a new issue