diff --git a/infra/postgresql-ha.md b/infra/postgresql-ha.md index aa4cd75..7d6aead 100644 --- a/infra/postgresql-ha.md +++ b/infra/postgresql-ha.md @@ -54,12 +54,14 @@ incus exec postgres-1 -- /opt/patroni/bin/patronictl -c /etc/patroni.yml reinit | 노드 | 위치 | IP | 방식 | |------|------|-----|------| | etcd-nas | Synology NAS (서울) | 192.168.9.100 | Docker (`quay.io/coreos/etcd:v3.5.21`) | -| etcd-hp2 | Incus 컨테이너 hp2 (서울) | 10.100.2.214 | Alpine + `apk add etcd` (v3.5.16) | +| etcd-mbp | kaffa-macbookpro (서울, Tailscale) | 100.115.154.78 | Docker (`quay.io/coreos/etcd:v3.5.17`) via colima, peer/client는 socat으로 Tailscale 노출 | | etcd-jp1 | Incus 컨테이너 jp1 (도쿄) | 10.253.101.233 | Alpine + `apk add etcd` (v3.5.16) | - NAS: 데이터 `/volume1/docker/etcd/data`, `--restart=always` -- hp2/jp1: openrc 서비스 (`/etc/init.d/etcd`), `command_background=true` +- jp1: openrc 서비스 (`/etc/init.d/etcd`), `command_background=true` +- mbp: docker container `etcd` (named volume `etcd-data`), client/peer 모두 호스트 `127.0.0.1`만 노출 → `socat`이 Tailscale IP `100.115.154.78`의 `2379`/`2380`으로 forward (`~/Library/LaunchAgents/com.kaffa.etcd-socat{,-peer}.plist`) - Patroni etcd namespace: `/patroni` +- 2026-04-08: etcd-hp2(10.100.2.214)를 etcd-mbp로 교체. hp2 incus 컨테이너 삭제됨. ### etcd 확인 명령어 @@ -68,7 +70,7 @@ incus exec postgres-1 -- /opt/patroni/bin/patronictl -c /etc/patroni.yml reinit incus exec postgres-1 -- etcdctl --endpoints=http://192.168.9.100:2379 member list -w table # 엔드포인트 상태 -incus exec postgres-1 -- etcdctl --endpoints=http://192.168.9.100:2379,http://10.100.2.214:2379,http://10.253.101.233:2379 endpoint status -w table +incus exec postgres-1 -- etcdctl --endpoints=http://192.168.9.100:2379,http://100.115.154.78:2379,http://10.253.101.233:2379 endpoint status -w table ``` ### etcd에 저장된 데이터