feat: add home-assistant-dashboard-conventions skill + update multiple skills
- New: smart-home/home-assistant-dashboard-conventions (Mushroom cards, view tabs, no Bubble Cards) - Updated: rke2, ceph, galera, proxmox, brainstorming, compound-learning, 1password-cli, smart-home-automation skills - New references: ceph-cluster-administration, docker-volume-forensics, ceph-crush-weight, ceph-ec-mixed-size
This commit is contained in:
+60
-38
@@ -1,67 +1,98 @@
|
||||
# Homelab Galera/MaxScale Topology
|
||||
# Homelab Galera/MaxScale Topology (Updated 2026-07-13)
|
||||
|
||||
## MariaDB Galera Cluster (3 nodes)
|
||||
## MariaDB Galera Cluster (3 nodes — quorum-safe: 3 different PVE hosts)
|
||||
|
||||
| Node | VM ID | Proxmox Host | IP | Hostname |
|
||||
|------|-------|---------------|----|----------|
|
||||
| db1 | 300 | proxmox2 (10.0.20.20) | 10.0.30.71 | mariadb-01 |
|
||||
| db2 | 301 | proxmox6 (10.0.20.60) | 10.0.30.72 | mariadb-02 |
|
||||
| db3 | 302 | proxmox4 (10.0.20.40) | 10.0.30.73 | mariadb-03 |
|
||||
| Node | VM ID | Proxmox Host | IP | Hostname | RAM |
|
||||
|------|-------|---------------|----|----------|-----|
|
||||
| db1 | 300 | n5pro (10.0.20.91) | 10.0.30.71 | mariadb-01 | 8 GB |
|
||||
| db2 | 301 | proxmox3 (10.0.20.30) | 10.0.30.72 | mariadb-02 | 8 GB |
|
||||
| db3 | 302 | proxmox6 (10.0.20.60) | 10.0.30.73 | mariadb-03 | 8 GB |
|
||||
|
||||
- MariaDB version: 11.4.10-MariaDB-deb12
|
||||
- Cluster name: `mariadb-galera`
|
||||
- Galera address: `gcomm://10.0.30.71,10.0.30.72,10.0.30.73`
|
||||
- DB size: ~18GB (homeassistant schema)
|
||||
- **Effective RAM usage**: ~5.5 GB per node (4 GB innodb_buffer_pool + 1.5 GB OS/Galera)
|
||||
- `balloon: 0` on all Galera VMs — see SKILL.md §5.3b for rationale
|
||||
- **Quorum guarantee**: Any single PVE host failure leaves ≥2 Galera nodes alive
|
||||
- **Note**: PVE HA may migrate VMs. Always verify current placement
|
||||
with `qm list` on each node before operating.
|
||||
|
||||
## MaxScale Proxy (1 active + VIP)
|
||||
## MaxScale Proxy (2 instances + VIP)
|
||||
|
||||
| Node | VM ID | Proxmox Host | IP | Hostname | Status |
|
||||
|------|-------|--------------|----|----------|--------|
|
||||
| maxscale-01 | 310 | proxmox4 (10.0.20.40) | 10.0.30.81 | maxscale-01 | Active |
|
||||
| VIP | — | — | 10.0.30.70 | keepalived VIP | — |
|
||||
| Node | VM ID | Proxmox Host | IP | Hostname | RAM | Status |
|
||||
|------|-------|---------------|----|----------|-----|--------|
|
||||
| maxscale-01 | 310 | n5pro (10.0.20.91) | 10.0.30.81 | maxscale-01 | 2 GB | Active |
|
||||
| maxscale-02 | 311 | proxmox3 (10.0.20.30) | 10.0.30.82 | maxscale-02 | 2 GB | Standby |
|
||||
| VIP | — | — | 10.0.30.70 | keepalived VIP | — | — |
|
||||
|
||||
- MaxScale version: 24.02.9
|
||||
- Services: `rw-router` (readwritesplit), `ro-router` (readconnroute)
|
||||
- Monitor: `galera-monitor` (galeramon)
|
||||
- Listener: `rw-listener` on port 3306
|
||||
- **Note**: A second MaxScale VM (VM501 "MaxScale1") exists on
|
||||
proxmox4 but is **stopped**. If a standby MaxScale is needed, check
|
||||
VM501's config. The VIP `10.0.30.70` is the authoritative entry point.
|
||||
|
||||
## HA Rules (PVE 8 rules.cfg)
|
||||
|
||||
```
|
||||
node-affinity: db-nodes
|
||||
nodes n5pro,proxmox3,proxmox6
|
||||
resources vm:300,vm:301,vm:302,vm:310,vm:311
|
||||
strict 1
|
||||
|
||||
resource-affinity: ha-rule-ea9e852a-8d82
|
||||
affinity negative
|
||||
resources vm:310,vm:311
|
||||
|
||||
resource-affinity: ha-rule-d61699eb-2baf
|
||||
affinity negative
|
||||
resources vm:301,vm:302
|
||||
```
|
||||
|
||||
- `db-nodes` (strict=1): Galera + MaxScale VMs restricted to n5pro + proxmox3 + proxmox6 (3 hardware-diverse hosts)
|
||||
- Negative resource-affinity: MaxScale 310↔311 kept apart, Galera 301↔302 kept apart
|
||||
- At node failure, HA manager restarts VM on one of the other 2 allowed nodes (deterministic)
|
||||
- **⚠️ Anti-affinity rules can block `qm migrate`** — check rules.cfg before migrating
|
||||
|
||||
## PVE Host RAM Capacity
|
||||
|
||||
| Host | IP | Physical RAM | Notes |
|
||||
|------|-----|-------------|-------|
|
||||
| n5pro | 10.0.20.91 | 91 GB | Massive headroom, primary DB host |
|
||||
| proxmox3 | 10.0.20.30 | 31 GB | Good headroom, secondary DB host |
|
||||
| proxmox6 | 10.0.20.60 | 15 GB | Tight — 113% overcommit with Galera VM, but effective use is only 5.5 GB |
|
||||
| proxmox1-2,4-5,7 | 10.0.20.{10,20,40,50,??} | 15 GB each | NOT in db-nodes rule — DB VMs cannot failover here |
|
||||
|
||||
## SSH Access
|
||||
|
||||
```bash
|
||||
# MariaDB VMs (user: debian)
|
||||
# MariaDB VMs (user: debian) — may vary if HA migrated the VM
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox debian@10.0.30.71
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox debian@10.0.30.72
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox debian@10.0.30.73
|
||||
|
||||
# MaxScale VMs (user: debian)
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox debian@10.0.30.81
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox debian@10.0.30.70
|
||||
|
||||
# Proxmox hosts (user: root)
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox root@10.0.20.10 # proxmox1 (HA VM host)
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox root@10.0.20.10 # proxmox1
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox root@10.0.20.30 # proxmox3
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox root@10.0.20.60 # proxmox6
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox root@10.0.20.91 # n5pro
|
||||
```
|
||||
|
||||
## Credentials
|
||||
|
||||
All credentials stored in 1Password Vault "Hermes", item `mariadb-galera-vm`:
|
||||
- `root-password` — MySQL root (localhost only on each node, not accessible via MaxScale VIP)
|
||||
- `maxscale-password` — MaxScale MySQL user with `SUPER` privilege — **can run `SET GLOBAL` via VIP** (see Section 6)
|
||||
Credentials in 1Password Vault "Kubernetes ESO" (ID: `334ykdtj5kar3jlpcrztjvx2fu`):
|
||||
- `mariadb-root` — root password (localhost only, `sudo mariadb` on node)
|
||||
- `mariadb-app-user` — username=dominik, app access
|
||||
- `gitea-db` — Gitea database user/password
|
||||
|
||||
Legacy item `mariadb-galera-vm` in vault "Hermes" may still contain:
|
||||
- `maxscale-password` — MaxScale MySQL user with SUPER privilege
|
||||
- `mariabackup-password` — Galera SST transfer auth
|
||||
- `ha-recorder-password` — HA Recorder MySQL user, has SELECT/INSERT/UPDATE on `homeassistant` DB
|
||||
- `ha-recorder-password` — HA Recorder MySQL user
|
||||
- `keepalived-auth-pass` — keepalived VIP failover auth
|
||||
|
||||
Retrieve all fields:
|
||||
```bash
|
||||
op item get "mariadb-galera-vm" --vault "Hermes" --reveal --fields password,root-password,mariabackup-password,maxscale-password,ha-recorder-password
|
||||
```
|
||||
|
||||
Note: The generic `password` field is empty. Use the named fields instead.
|
||||
|
||||
## Firewall (UFW on MariaDB VMs)
|
||||
|
||||
- Port 3306: ALLOW from 10.0.30.81, 10.0.30.82 (MaxScale only)
|
||||
@@ -75,18 +106,9 @@ Note: The generic `password` field is empty. Use the named fields instead.
|
||||
- Config: `/mnt/data/supervisor/homeassistant/configuration.yaml`
|
||||
- Recorder DB URL: `mysql://ha_recorder:***@10.0.30.70:3306/homeassistant`
|
||||
- InfluxDB: 10.0.30.109:8086, bucket `ha_hot_90d` (long-term history)
|
||||
- HA masks passwords with `***` in configuration.yaml — retrieve real passwords from 1Password, not the config file
|
||||
|
||||
### HAOS SSH Access (Port 22222)
|
||||
|
||||
HAOS exposes SSH on port 22222 (requires SSH addon enabled):
|
||||
```bash
|
||||
ssh -i ~/.ssh/id_ed25519_proxmox root@10.0.30.10 -p 22222
|
||||
```
|
||||
Inside HAOS, HA runs as Docker container `homeassistant`:
|
||||
```bash
|
||||
docker exec homeassistant cat /config/configuration.yaml
|
||||
docker exec homeassistant python3 -c "..."
|
||||
docker logs homeassistant 2>&1 | grep -i recorder | tail -20
|
||||
```
|
||||
Note: `pip` modules like `pymysql` are NOT available inside the HA container. Use `sqlalchemy` (bundled with HA) or query the DB from outside.
|
||||
|
||||
Reference in New Issue
Block a user