Files
obsidian/dev/obsidian-schema.md
kappa da4a674719 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 본문은 그대로 유지. 파일럿 검증 후 나머지 호스트 확장 예정.
2026-04-14 09:07:22 +09:00

111 lines
3.2 KiB
Markdown

---
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