English
Decision (current schema)
- Canonical identifier for placement, metrics, and GitHub Actions is
nodes.node_idin Control Plane D1 (see migration0006_nodes.sqlin prego-control-plane). - There is no
hetzner_server_idcolumn onnodesin the current migrations. Operators can still track the mapping outside D1 until a schema change is approved.
When you need an explicit Hetzner ID
- You run a sidecar script that calls the Hetzner Cloud API and must map API responses to
node_id. - You need incident correlation between Hetzner console and
/cp/infra.
Options
| Option | Pros | Cons |
|---|---|---|
| A — Ops spreadsheet / CMDB | No migration; fast | Manual drift |
B — D1 migration adds optional hetzner_server_id on nodes | Single source of truth | Requires migration + Worker read/write paths |
C — Labels in Hetzner (labels.node_id=...) | Visible in cloud UI | Must match node_id exactly |
Recommendation: start with A or C for production; promote to B if automation requires joins.
Template (copy as CSV or table)
| node_id | region | host (IP or DNS) | hetzner_server_id (optional) | management_dns (optional) | server_role (shared or dedicated) | notes |
|---|---|---|---|---|---|---|
node_sg_01 | sg | 203.0.113.10 | 12345678 | node-01.pregoi.com | shared | app pool |
Add one row per server. Fill optional columns when Hetzner console or DNS names must be tracked alongside D1.
Related
한국어
현재 스키마 정책
- 배치·메트릭·프로비저닝 파이프라인의 기준 키는 D1
nodes.node_id입니다. - 현재 마이그레이션 기준으로
nodes테이블에 Hetzner server id 전용 컬럼은 없습니다. 필요 시 운영 매핑표 또는 Hetzner 라벨로 보조합니다.
Hetzner ID가 필요한 경우
- Hetzner API로 메트릭·상태를 가져와
node_id와 붙여야 할 때 - 콘솔의 서버 ID와 CP
/cp/infra를 연결할 때
선택지
- 운영 표(A), Hetzner 라벨(C), 또는 향후 D1 마이그레이션(B) — 위 영문 표 참고.
템플릿
위 영문 테이블을 복사해 리전별로 채웁니다.
관련 문서: 메트릭 푸시 런북, Provision 필드 매핑