| name | hetzner-proxmox-deploy |
| description | Use when deploying or operating workloads on the hetzner-master Proxmox lab (single Hetzner box at 195.201.80.242, Proxmox VE 8 + ZFS + Tailscale subnet router) โ adding LXC containers, integrating with the Prometheus/Grafana stack, exposing services through the firewall, or troubleshooting infrastructure issues specific to this lab |
hetzner-proxmox-deploy
์ด skill์ hetzner-master ๋ ํฌ๊ฐ ๊ด๋ฆฌํ๋ ๋จ์ผ Hetzner Proxmox ๋ฐ์ค์ ์ํฌ๋ก๋๋ฅผ ๋ฐฐํฌยท์ด์ํ ๋ ์ฌ์ฉํ๋ค. ๋ค๋ฅธ Proxmox ํด๋ฌ์คํฐ์๋ ์ ์ฉ๋์ง ์์ (๋คํธ์ํฌ ๊ฐ์ /IP ๋์ญ/access pattern ๋ชจ๋ ์ด ๋ฐ์ค์ ์ข
์).
ํ ์ค ์ปจํ
์คํธ
- ํธ์คํธ:
pve-master (195.201.80.242), Proxmox VE 8.4, ZFS mirror data pool 378GB
- ๋ด๋ถ ๋คํธ์ํฌ: vmbr1 = 10.10.10.0/24 NAT, gateway 10.10.10.1 (ํธ์คํธ)
- ์ธ๋ถ ์ ๊ทผ: Tailscale subnet router (CT 100, 10.10.10.10) ๊ฒฝ์ โ Mac์์ 10.10.10.x ์ง์ ๋๋ฌ
- ๋ชจ๋ํฐ๋ง: CT 101 monitor (10.10.10.20) โ Prometheus + Grafana + Alertmanager + node_exporter (๋ชจ๋ LXC ์๋ ์คํฌ๋ ์ดํ)
- ๋ฐฉํ๋ฒฝ: ์ธ๋ถ ingress = ICMP + Tailscale UDP 41641๋ง, ๋ด๋ถ๋ Tailnet 100.64.0.0/10๋ง
- IaC ๋ ์ด์ด: bootstrap shell (
bootstrap/) โ terraform bpg/proxmox (terraform/) โ ansible roles (ansible/) โ bats smoke tests (tests/smoke/)
When to Use This Skill
- ์ LXC ์ํฌ๋ก๋ ์ปจํ
์ด๋๋ฅผ ์ถ๊ฐํ๊ณ ์ถ์ ๋
- PostgreSQL ๊ด๋ฆฌํ appliance instance ๋ฅผ ์์ฑํ๊ฑฐ๋ ์ด์ํ๊ณ ์ถ์ ๋
- ๊ธฐ์กด ์ํฌ๋ก๋์ ๋ชจ๋ํฐ๋ง/์๋ฆผ์ ์
์
ํ ๋
- Mac/์ธ๋ถ์์ ์ ์๋น์ค์ ์ ๊ทผํ ์ ์๊ฒ ๋ฐฉํ๋ฒฝ์ ์กฐ์ ํ ๋
- ํธ์คํธ ๋๋ ์ปจํ
์ด๋์์ ๋คํธ์ํฌ/์คํ ๋ฆฌ์ง/Tailscale ๊ด๋ จ ๋ฌธ์ ๋ฅผ ์ง๋จํ ๋
- ์ธํ๋ผ ์ ๊ธฐ ์ ๊ฒ (๋ฐฑ์
, ํค ํ์ , Proxmox ์
๊ทธ๋ ์ด๋)
When NOT to Use
- ๋ค๋ฅธ Hetzner ๋ฐ์ค / ๋ค๋ฅธ Proxmox ํด๋ฌ์คํฐ โ ์ด skill์ IP/ํจํด ๊ฐ์ ์ ๋ง์.
bootstrap/์ ์ฒ์๋ถํฐ ๋ค์ ๋๋ฆด ๊ฒ
- ๋จ์ Proxmox UI ํด๋ฆญ ์์
โ IaC drift ๋ง๋ฆ. ํญ์ terraform/ansible ํตํด์ ๋ณ๊ฒฝ
- 1ํ์ฑ ๋๋ฒ๊น
SSH โ ๊ทธ๋ฅ
just ssh-host ํ ์์
, skill ๋ถํ์
์์
๋ผ์ฐํ
(์ด๋ reference๋ฅผ ์ฝ์์ง)
์ฒ์ ์ง์
ํ ๋: 01 โ (๋ชฉ์ ๋ณ 02~04 ๋๋ 08) โ 05 (์ค์ ์์ฑ) โ 06 (๋งํ๋ฉด). ์ฌ์
๋ก์ง(์ธ์ฆ/๊ฒฐ์ /์ฌ์ดํธ)์ ๋ง์ง๋ฌ ์๋ค๋ฉด 09 ๋ถํฐ. ํ ๋ฒ์ ๋ค ์ฝ์ง ๋ง ๊ฒ.
์ฌ์ ์กฐ๊ฑด (Mac์์)
brew install just terraform ansible bats-core jq tailscale
ls -1 ~/.ssh/hetzner_pve
tailscale status | grep ts-router
test -f secrets/proxmox-api.env && source secrets/proxmox-api.env
echo "$PROXMOX_VE_ENDPOINT"
cd <hetzner-master ๋ ํฌ ๊ฒฝ๋ก>
CT 130 agent-host ์์ ์คํํ ๋
Terraform state๋ CT 130 agent-host ์ HTTP backend (http://10.10.10.40:8800/state/prod)๊ฐ canonical์ด๋ค. backend ํ์ผ์ CT 130์ /var/lib/terraform-http-backend ์ ์๊ณ Basic auth credential์ gitignored secrets/terraform-backend.env ์ ๋๋ค. LXC ๋ฐฐํฌ/๋ณ๊ฒฝ์ ์ํํ๋ค๋ฉด Terraform ์ ์ ๋ฐ๋์ ์๋ preflight ๋ฅผ ๋จผ์ ํต๊ณผ์ํจ๋ค:
test -f secrets/proxmox-api.env
test -f secrets/terraform-backend.env
. secrets/proxmox-api.env
curl -kfsS --max-time 5 \
-H "Authorization: PVEAPIToken=${PROXMOX_VE_API_TOKEN}" \
"${PROXMOX_VE_ENDPOINT%/}/api2/json/version" >/dev/null
์ดํ raw terraform plan/apply ๋์ just tf-plan / just tf-apply ๋ฅผ ์ฌ์ฉํ๋ค. Justfile ์ด Proxmox API credential๊ณผ HTTP backend credential์ source ํ๊ธฐ ๋๋ฌธ์ด๋ค. ํ์ผ์ด ์๊ฑฐ๋ ํ ํฐ์ด stale ํด์ 401/permission denied ๊ฐ ๋๋ฉด ํ ํฐ์ ์ถ์ธกยท์ฌ๋ฐ๊ธํ์ง ๋ง๊ณ ์ฌ์ฉ์์๊ฒ provisioning ์ ์์ฒญํ๋ค. plan์ secret์ด ์๋ ์ด๋ค checkout์์๋ ๊ฐ๋ฅํ์ง๋ง, apply๋ ์ด์ ๋ก๊ทธ์ context ์ง์ค์ ์ํด CT 130์์ ์ํํ๋ ๊ฒ์ ๊ธฐ๋ณธ์ผ๋ก ํ๋ค.
Terraform state safety (HARD GATE)
ํ์ฌ state๋ CT 130 agent-host ์์ ์คํ๋๋ Terraform HTTP backend๊ฐ ๋ณด๊ดํ๋ค. local terraform.tfstate ํ์ผ์ legacy backup/diagnostic artifact์ผ ๋ฟ canonical์ด ์๋๋ค. ๋ชจ๋ ์ด์์๋ git pull --ff-only ํ just tf-plan / just tf-apply wrapper๋ฅผ ์ฌ์ฉํด ๊ฐ์ remote state๋ฅผ ์ฝ๋๋ค.
์๋ ๊ท์น์ด canonical์ด๋ค:
- raw
terraform plan/apply ๊ธ์ง. ํญ์ just tf-plan / just tf-apply.
- wrapper๋ plan JSON์ ๊ฒ์ฌํด์ "live์ ์ด๋ฏธ ์กด์ฌํ๋ VMID/CTID๋ฅผ Terraform์ด createํ๋ ค๋" ๊ฒฝ์ฐ ์คํจํ๋ค.
- ์ด ์คํจ๋ stop condition์ด๋ค. guard๋ฅผ ์ฐํํ์ง ๋ง๊ณ live ๋ฆฌ์์ค๋ฅผ state์ import ํ๊ฑฐ๋ stale config๋ฅผ ์ ๊ฑฐํ๋ค.
- live CT/VM์ IaC์ ํก์ํ๋ ๊ฒฝ์ฐ์๋ remote backend๊ฐ initialized ๋ checkout์์
terraform import '<resource address>' pve-master/<vmid> โ just tf-plan clean ํ์ธ ์์๋ก ์งํํ๋ค.
- ์ workload๋ baseline
just tf-plan ์ด ๊ธฐ์กด fleet์ ๋ํด clean ํ ์ํ์์๋ง ์ถ๊ฐํ๋ค.
์์ธํ incident ๊ธฐ๋ก: docs/wisdom/07-terraform-state-split-brain.md.
ํต์ฌ ๋ช
๋ น (Quick Reference)
| ์๋ | ๋ช
๋ น |
|---|
| ์์คํ
์ํ ํ์ธ | just status |
| ๋ชจ๋ smoke test | just test |
| Proxmox UI (Tailscale) | just ui |
| Grafana | just grafana |
| ํธ์คํธ SSH | just ssh-host |
| terraform plan/apply | just tf-plan / just tf-apply |
| ansible workloads ์ ์ฉ | just ansible-workloads |
| ansible site (์ ์ฒด) | just ansible-site |
| inventory ๋๊ธฐํ | just inventory-sync |
4๊ฐ์ง ์์ ์์น
- Proxmox UI์์ ํด๋ฆญ ๊ธ์ง. ์ปจํ
์ด๋ ์์ฑ/์ญ์ /๋ฆฌ์์ค ๋ณ๊ฒฝ์ ํญ์ terraform. UI ํด๋ฆญ์ IaC drift ๋ง๋ฆ.
- ๋ชจ๋ ์ปจํ
์ด๋๋
vmbr1 (10.10.10.0/24). ์ง์ vmbr0 (public)์ ๋ถ์ด์ง ๋ง ๊ฒ โ ํธ์คํธ firewall์ด ๋ณดํธ ๋ชป ํจ.
- ๊ณต๊ฐ ์ธํฐ๋ท์ ์ง์ ๋
ธ์ถ ๊ธ์ง๊ฐ ๊ธฐ๋ณธ. ์ ์๋น์ค๋ Tailnet์์๋ง ์ ๊ทผ. public ๋
ธ์ถ์ด ํ์ํ๋ฉด
04-firewall-and-access.md์ ๋ช
์์ ์ ์ฐจ ๋ฐ๋ฅผ ๊ฒ.
- destructive ๋ช
๋ น (
pct destroy, terraform destroy, zpool destroy)์ ์ฌ์ฉ์ ํ์ธ ํ๋ง ์คํ. ์ด skill์ ๊ท์น์ด ์๋๋ผ cmux/orchestrator ์ ์ฑ
.
๋ณ๊ฒฝ ํ ๊ฒ์ฆ (HARD GATE)
์ํฌ๋ก๋๋ฅผ ์ถ๊ฐ/์์ ํ ๋ค์๋ ๋ฐ๋์ ์๋ ์
๋ค ํต๊ณผํด์ผ "์๋ฃ" ๋ผ๊ณ ๋ณด๊ณ ํ ์ ์๋ค:
just test
just ssh-host 'pct list'
git status
git diff --stat
git add <files> && git commit -m "<scope>: <intent>"
git push
UI๋ฅผ ๋
ธ์ถํ๋ค๋ฉด ์ถ๊ฐ๋ก:
curl -fsS http://10.10.10.<new-ct-ip>:<port>/ | head -5
์ push ๊น์ง ๊ฐ์ ํ๋: ๋ผ์ด๋ธ๋ ๋ฐ๋์๋๋ฐ repo ๊ฐ ์ ๋ฐ๋๋ฉด ๋ค์ terraform plan ์ด "๋ผ์ด๋ธ๊ฐ drift ํ๋ค" ๊ณ ์คํํ๊ณ , 01-architecture.md ์ ์ขํํ/์์ฝ ์ฒด๊ณ (.coordination/active.md + pre-commit hook) ๊ฐ ์ฐํ๋๋ค. ๋ก์ปฌ commit ๋ง ํ๊ณ push ์ ํ๋ฉด ๋ค๋ฅธ ๋จธ์ /์ธ์
์ด ๊ฐ์ CTIDยทIP ๋ฅผ ์ฌ์ฌ์ฉํด์ ์ถฉ๋ (incident: 2026-05-18 CT 150).
ํต๊ณผ ๋ชป ํ๋ฉด 06-troubleshooting.md ๋ถํฐ ์ฝ๊ธฐ. push ๊ฐ ๋งํ๋ฉด (pre-commit hook ๊ฑฐ๋ถ ๋ฑ) 01-architecture.md ์ ์ขํํ ์น์
์ฐธ์กฐ.
Red Flags โ STOP
๋ค์ ์ ํธ ๋ณด์ด๋ฉด ์์
๋ฉ์ถ๊ณ ์ฌ์ฉ์์๊ฒ ๋ณด๊ณ :
- "๊ทธ๋ฅ UI์์ ๋ง๋ค๋ฉด ์ ๋ ๊น" โ ์ ๋จ. terraform ํตํด์๋ง.
- "๋ฐฉํ๋ฒฝ ์ ์ ํ๊ณ ์งํ" โ ์ ๋ ๊ธ์ง. ํ์ํ๋ฉด
04์ ๋ช
์์ expose ์ ์ฐจ.
- "ZFS ํ ๋ค์ ๋ง๋ค๋ฉด ๋น ๋ฅด๊ฒ ๋ค" โ ๋ฐ์ดํฐ ์์ค ์ํ. zpool destroy๋ ์ฌ์ฉ์ ํ์ธ ํ.
- "ํ
์คํธ ์คํจํ์ง๋ง ๊ทธ๋ฅ ๋ณด๊ณ ํ์" โ ์คํจ๋ ๊ณง ๋ฏธ์์ฑ. 06 ์ฝ๊ณ ๋๋ฒ๊น
.
- "Proxmox ์ํฐํ๋ผ์ด์ฆ repo ๋์ค๋๋ฐ ๋ฌด์" โ
bootstrap/05๊ฐ ์๋ ์ ๊ฑฐ. ์ ๋๋ฉด docs/wisdom #6.
์ด์ ๋ฉํ
- ๋ ํฌ ๊ฒฝ๋ก: ์ด skill์
<repo>/skills/hetzner-proxmox-deploy/. ๋ ํฌ๊ฐ ์ฎ๊ฒจ์ง๋ฉด install.sh ์ฌ์คํ.
- Wisdom ๋์ : ์ ํจ์ /๊ฒฐ์ ์
docs/wisdom/ ์ ์ถ๊ฐํ๊ณ , ์์ฃผ ๋์ค๋ฉด ์ด skill์ 06/02๋ก ์น๊ฒฉ.
- Codex ํธํ: SKILL.md frontmatter๋ Codex์ Claude Code ์์ชฝ ํ์ค. references/๋ ๋ ๋ค ๋์ผํ๊ฒ follow.