feat(obsidian): Bases 쿼리용 frontmatter 스키마 + 호스트 파일럿 3개
- dev/obsidian-schema.md: type별 frontmatter 규약 문서화
- infra/hosts/{incus-hp2,incus-kr1,zlambda}.md: 구조화된 필드로 파일럿 3개
- infra/hosts.base: Bases 쿼리 (전체/서울/K3s/유료/Critical 뷰)
기존 infra-hosts.md 본문은 그대로 유지. 파일럿 검증 후 나머지 호스트 확장 예정.
This commit is contained in:
110
dev/obsidian-schema.md
Normal file
110
dev/obsidian-schema.md
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
title: Obsidian Frontmatter 스키마
|
||||
updated: 2026-04-13
|
||||
tags: [dev, obsidian, schema, convention]
|
||||
---
|
||||
|
||||
## 목적
|
||||
|
||||
[[infra-hosts|인프라 호스트]]나 [[outline|서비스]] 등 정본 문서에 **Bases/Dataview로 쿼리 가능한 구조화된 필드**를 추가해서 빠른 조회·필터링이 가능하게 한다. 기존 본문(prose)과 공존.
|
||||
|
||||
- Obsidian **Bases** (core plugin, 2026년 정식) 기본 사용
|
||||
- 필요 시 Dataview 플러그인 추가 (커뮤니티, DQL 쿼리)
|
||||
|
||||
## 공통 필드
|
||||
|
||||
모든 문서 공통:
|
||||
|
||||
| 필드 | 타입 | 필수 | 설명 |
|
||||
|------|------|------|------|
|
||||
| `title` | string | ✅ | 문서 제목 (파일명과 별개) |
|
||||
| `updated` | date (YYYY-MM-DD) | ✅ | 최근 업데이트. 변경 사유는 뒤에 자유 텍스트 |
|
||||
| `tags` | array[string] | ✅ | 분류 태그. type 태그(`host`, `service`, `product`) 포함 권장 |
|
||||
|
||||
## Type별 필드
|
||||
|
||||
### `type: host` (서버/컨테이너/라우터/NAS)
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: incus-hp2
|
||||
updated: 2026-04-13
|
||||
tags: [infra, host]
|
||||
type: host
|
||||
host_kind: server # server | container | router | nas | vm
|
||||
location: seoul # seoul | tokyo | osaka | aws-kr | ...
|
||||
provider: self-hosted # self-hosted | linode | aws-lightsail | google-cloud | vultr
|
||||
status: active # active | maintenance | retired
|
||||
ssh_host: incus-hp2 # ssh 단축 별칭 (tssh 포함)
|
||||
public_ip: null # 공인 IP (없으면 null)
|
||||
tailscale_ip: 100.100.52.34
|
||||
lan_ip: 192.168.9.134
|
||||
os: Debian 13
|
||||
cpu_model: Xeon E5-2670
|
||||
cpu_cores: 32
|
||||
ram_gb: 188
|
||||
k3s_role: worker # control-plane | worker | null
|
||||
critical: true # 다운 시 서비스 영향 큰지
|
||||
monthly_cost_usd: 0 # 자체 운영 0, 클라우드는 실제 비용
|
||||
---
|
||||
```
|
||||
|
||||
### `type: service` (K3s 서비스, 외부 SaaS 등)
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: Gitea
|
||||
updated: 2026-04-13
|
||||
tags: [service, devtools]
|
||||
type: service
|
||||
category: devtools # devtools | observability | edge | storage | ai | messaging | ...
|
||||
deployment: helm # helm | kubectl | docker-compose | bare-metal | saas
|
||||
cluster: k3s-seoul # k3s-seoul | k3s-tokyo | null(외부) | saas
|
||||
namespace: gitea # K8s 네임스페이스
|
||||
url: https://gitea.inouter.com
|
||||
criticality: high # high | medium | low
|
||||
status: active
|
||||
depends_on: [postgresql-ha, traefik, cert-manager] # 내부 문서 슬러그
|
||||
---
|
||||
```
|
||||
|
||||
### `type: product` (사내 제품/서비스 브랜드)
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: 아이언클래드
|
||||
updated: 2026-04-13
|
||||
tags: [product, anvil]
|
||||
type: product
|
||||
brand: ironclad
|
||||
status: live # live | beta | planning | retired
|
||||
url: https://ironclad.it.com
|
||||
owner: kaffa
|
||||
---
|
||||
```
|
||||
|
||||
### `type: reference` (외부 서비스/문서 레퍼런스)
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: BunnyCDN
|
||||
updated: 2026-04-13
|
||||
tags: [services, cdn]
|
||||
type: reference
|
||||
category: cdn
|
||||
vendor: Bunny.net
|
||||
---
|
||||
```
|
||||
|
||||
## 스키마 진화 규칙
|
||||
|
||||
- 필드는 **추가**만 자유롭게. 제거/이름 변경은 기존 파일도 같이 수정
|
||||
- 모르는 값은 `null` 보다 필드 **생략** 선호 (Bases에서 자동 무시)
|
||||
- 날짜는 ISO `YYYY-MM-DD` 고정
|
||||
- 배열은 `[a, b, c]` 인라인, 5개 초과 시 블록 스타일
|
||||
- 문자열에 콜론·대괄호 있으면 따옴표 필수
|
||||
|
||||
## 참고
|
||||
|
||||
- Bases 쿼리 예시: [[hosts|hosts.base]]
|
||||
- Obsidian Bases 공식: https://help.obsidian.md/bases
|
||||
94
infra/hosts.base
Normal file
94
infra/hosts.base
Normal file
@@ -0,0 +1,94 @@
|
||||
filters:
|
||||
and:
|
||||
- file.hasProperty("type")
|
||||
- property("type") == "host"
|
||||
formulas:
|
||||
display_ip: 'if(property("public_ip"), property("public_ip"), property("tailscale_ip"))'
|
||||
properties:
|
||||
note.title:
|
||||
displayName: 호스트
|
||||
note.location:
|
||||
displayName: 지역
|
||||
note.host_kind:
|
||||
displayName: 종류
|
||||
note.provider:
|
||||
displayName: 공급자
|
||||
note.cpu_cores:
|
||||
displayName: 코어
|
||||
note.ram_gb:
|
||||
displayName: RAM(GB)
|
||||
note.k3s_role:
|
||||
displayName: K3s
|
||||
note.monthly_cost_usd:
|
||||
displayName: 월비용($)
|
||||
note.critical:
|
||||
displayName: Critical
|
||||
note.status:
|
||||
displayName: 상태
|
||||
views:
|
||||
- type: table
|
||||
name: 전체 호스트
|
||||
order:
|
||||
- note.title
|
||||
- note.location
|
||||
- note.host_kind
|
||||
- note.cpu_cores
|
||||
- note.ram_gb
|
||||
- note.k3s_role
|
||||
- note.monthly_cost_usd
|
||||
- note.status
|
||||
sort:
|
||||
- property: note.location
|
||||
direction: ASC
|
||||
- property: note.title
|
||||
direction: ASC
|
||||
- type: table
|
||||
name: 서울 서버
|
||||
filters:
|
||||
and:
|
||||
- property("location") == "seoul"
|
||||
order:
|
||||
- note.title
|
||||
- note.host_kind
|
||||
- note.cpu_cores
|
||||
- note.ram_gb
|
||||
- note.k3s_role
|
||||
- note.critical
|
||||
sort:
|
||||
- property: note.ram_gb
|
||||
direction: DESC
|
||||
- type: table
|
||||
name: K3s 노드
|
||||
filters:
|
||||
and:
|
||||
- property("k3s_role") != null
|
||||
order:
|
||||
- note.title
|
||||
- note.k3s_role
|
||||
- note.location
|
||||
- note.cpu_cores
|
||||
- note.ram_gb
|
||||
- note.lan_ip
|
||||
- type: table
|
||||
name: 유료 호스트 (월비용)
|
||||
filters:
|
||||
and:
|
||||
- property("monthly_cost_usd") > 0
|
||||
order:
|
||||
- note.title
|
||||
- note.provider
|
||||
- note.location
|
||||
- note.monthly_cost_usd
|
||||
- note.status
|
||||
sort:
|
||||
- property: note.monthly_cost_usd
|
||||
direction: DESC
|
||||
- type: card
|
||||
name: Critical 호스트
|
||||
filters:
|
||||
and:
|
||||
- property("critical") == true
|
||||
order:
|
||||
- note.title
|
||||
- note.location
|
||||
- note.k3s_role
|
||||
43
infra/hosts/incus-hp2.md
Normal file
43
infra/hosts/incus-hp2.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: incus-hp2
|
||||
updated: 2026-04-13
|
||||
tags: [infra, host, incus, k3s, seoul]
|
||||
type: host
|
||||
host_kind: server
|
||||
location: seoul
|
||||
provider: self-hosted
|
||||
status: active
|
||||
ssh_host: incus-hp2
|
||||
public_ip: null
|
||||
tailscale_ip: 100.100.52.34
|
||||
lan_ip: 192.168.9.134
|
||||
os: Debian 13
|
||||
cpu_model: Xeon E5-2670
|
||||
cpu_cores: 32
|
||||
ram_gb: 188
|
||||
k3s_role: worker
|
||||
critical: true
|
||||
monthly_cost_usd: 0
|
||||
---
|
||||
|
||||
## 역할
|
||||
|
||||
Incus + K3s 워커 호스트 (서울존). 홈랩 bare-metal 서버. Incus 프로젝트 `default`, `inbest`. K3s 클러스터에서 worker(k3s-agent)로 참여.
|
||||
|
||||
## 주요 워크로드
|
||||
|
||||
- K3s Pod 42개 (2026-04-13 기준): APISIX, Gitea, Outline, VictoriaMetrics, n8n, Teleport 등
|
||||
- Longhorn storage replica 참여
|
||||
- Incus VM: `gitea-runner`, `juice-shop`, `k8s` 등
|
||||
|
||||
## 네트워크
|
||||
|
||||
- LAN: 192.168.9.134 (K3s intra-cluster)
|
||||
- Tailscale: 100.100.52.34
|
||||
|
||||
## 상세
|
||||
|
||||
- Incus 컨테이너이므로 커널은 호스트 bare-metal과 공유 (커널 업데이트는 호스트에서)
|
||||
- 2026-04-13 drain+reboot 테스트 완료 → [[../../tasks|tasks.md]] 참조
|
||||
|
||||
상세 인프라 컨텍스트: [[../infra-hosts]]
|
||||
45
infra/hosts/incus-kr1.md
Normal file
45
infra/hosts/incus-kr1.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: incus-kr1
|
||||
updated: 2026-04-13
|
||||
tags: [infra, host, incus, k3s, seoul]
|
||||
type: host
|
||||
host_kind: server
|
||||
location: seoul
|
||||
provider: self-hosted
|
||||
status: active
|
||||
ssh_host: incus-kr1
|
||||
public_ip: 220.120.65.245
|
||||
tailscale_ip: 100.84.111.28
|
||||
lan_ip: 192.168.9.214
|
||||
os: Debian 13
|
||||
cpu_model: unknown
|
||||
cpu_cores: null
|
||||
ram_gb: 64
|
||||
k3s_role: control-plane
|
||||
critical: true
|
||||
monthly_cost_usd: 0
|
||||
gpu: GTX 1080 Ti
|
||||
---
|
||||
|
||||
## 역할
|
||||
|
||||
Incus + K3s control-plane 호스트 (서울존). GPU 워크로드 가능(GTX 1080 Ti). Incus 프로젝트 `default`.
|
||||
|
||||
## 주요 워크로드
|
||||
|
||||
- K3s API 서버 (control-plane 2/2)
|
||||
- Patroni PostgreSQL replica 1개 (10.100.3.185)
|
||||
- heimdall 에이전트 컨테이너 (ops 프로젝트)
|
||||
|
||||
## 네트워크
|
||||
|
||||
- LAN: 192.168.9.214
|
||||
- Tailscale: 100.84.111.28
|
||||
- 공인: 220.120.65.245 (LG U+ 회선, OpenWrt 라우터 경유)
|
||||
|
||||
## 상세
|
||||
|
||||
- heimdall ops 에이전트는 이 호스트의 incus 컨테이너에 상주
|
||||
- K3s kine 엔드포인트는 OpenWrt HAProxy 192.168.9.1:5432 → Patroni leader 자동 감지
|
||||
|
||||
상세 인프라 컨텍스트: [[../infra-hosts]]
|
||||
47
infra/hosts/zlambda.md
Normal file
47
infra/hosts/zlambda.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: zlambda
|
||||
updated: 2026-04-13
|
||||
tags: [infra, host, nixos, tokyo, linode]
|
||||
type: host
|
||||
host_kind: vm
|
||||
location: tokyo
|
||||
provider: linode
|
||||
status: active
|
||||
ssh_host: zlambda
|
||||
public_ip: 139.162.71.52
|
||||
tailscale_ip: 100.78.51.18
|
||||
lan_ip: null
|
||||
os: NixOS 25.05
|
||||
cpu_cores: 1
|
||||
ram_gb: 2
|
||||
k3s_role: null
|
||||
critical: false
|
||||
monthly_cost_usd: 5
|
||||
aliases: [sandbox-tokyo]
|
||||
---
|
||||
|
||||
## 역할
|
||||
|
||||
NixOS 베이스 호스트 (도쿄, Linode nano). 이전 `sandbox-tokyo` 장비를 2026-04-08에 Debian → NixOS로 전환. 경량 docker + tailscale + sshd.
|
||||
|
||||
## 이전된/제거된 구성
|
||||
|
||||
- APISIX + etcd (Netbis DR) — 제거
|
||||
- microsocks — 제거
|
||||
- tlsproxy, vault-prod, wg-easy — 제거
|
||||
|
||||
## 현재 구성
|
||||
|
||||
- sshd, tailscale, docker
|
||||
- Linode 프로필: kernel `linode/direct-disk`
|
||||
- BBR + fq + sysctl 튜닝
|
||||
- NixOS configuration: Gitea [kaffa/nixos-infra](https://gitea.inouter.com/kaffa/nixos-infra)
|
||||
- kaffa-macmini: `~/nixos-infra/`
|
||||
- zlambda: `/root/nixos-infra/`
|
||||
|
||||
## 용도 검토
|
||||
|
||||
- K3s worker 편입 후보 (taint geo=tokyo) — [[../k3s-migration|검토 중]]
|
||||
- 도쿄 POP 엣지 워크로드 용도
|
||||
|
||||
상세 인프라 컨텍스트: [[../infra-hosts]]
|
||||
Reference in New Issue
Block a user