위키링크 추가, source: openmemory 제거, Claude Code 인스트럭션 문서화
- 전체 파일에 [[위키링크]] 추가 (Obsidian 그래프 연결) - frontmatter에서 source: openmemory 제거 - infra-hosts.md에 서비스 위치/Incus 프로젝트 테이블 추가 - dev/claude-code-setup.md 신규 (CLAUDE.md 인스트럭션 Vault 버전)
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
---
|
||||
title: APISIX 설정 및 운영
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## 아키텍처
|
||||
|
||||
구성: 고객 도메인 → Cloudflare(DNS) → SafeLine WAF → APISIX(라우팅) → 고객 오리진
|
||||
구성: 고객 도메인 → [[cloudflare]](DNS) → [[crowdsec-safeline|SafeLine WAF]] → APISIX(라우팅) → 고객 오리진
|
||||
|
||||
## ironclad.it.com 라우트
|
||||
|
||||
ironclad.it.com Cloudflare DNS origin: 172.233.93.180 (osaka), zone ID: bc8761b398cc52cf731f804bd3cbf388. APISIX 라우트 ironclad-it-com → web 컨테이너 10.253.100.159:80. SSL: Google Trust Services wildcard cert (*.ironclad.it.com) in APISIX.
|
||||
ironclad.it.com Cloudflare DNS origin: 172.233.93.180 (osaka), zone ID: bc8761b398cc52cf731f804bd3cbf388. APISIX 라우트 ironclad-it-com → web 컨테이너 10.253.100.159:80. SSL: Google Trust Services wildcard cert (*.ironclad.it.com) in APISIX. → [[cert-manager]]
|
||||
|
||||
## SSL ID 규칙
|
||||
|
||||
@@ -22,11 +21,11 @@ APISIX 연동: ip-restriction + geoip-restriction 플러그인
|
||||
|
||||
## Twilio 라우트
|
||||
|
||||
APISIX 라우트 ID: twilio-jp-inouter-com
|
||||
APISIX 라우트 ID: twilio-jp-inouter-com → [[twilio]]
|
||||
|
||||
## Gitea POST 변환
|
||||
|
||||
Gitea가 POST 미지원(AuthenticateNotImplemented, 404)하므로 APISIX에서 POST body 파라미터를 GET query string으로 변환
|
||||
[[gitea]]가 POST 미지원(AuthenticateNotImplemented, 404)하므로 APISIX에서 POST body 파라미터를 GET query string으로 변환
|
||||
|
||||
## CrowdSec 로그 연동
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
---
|
||||
title: cert-manager SSL 인증서 관리
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## 인증
|
||||
|
||||
Bearer token is from Vault secret/infra/cert-manager's api_token
|
||||
Bearer token is from [[vault]] secret/infra/cert-manager's api_token
|
||||
|
||||
## 배포 엔드포인트
|
||||
|
||||
@@ -18,11 +17,11 @@ cert-manager 도메인-인스턴스 매핑: config.json의 domain_instance_map
|
||||
|
||||
## 보안/신뢰성
|
||||
|
||||
cert-manager 보안/신뢰성: Bearer 토큰 인증 (/health 제외), 도메인 입력 검증 (path traversal 차단), tenacity 재시도 (APISIX, Google EAB), Discord DM 알림 (실패 시 봇 DarkRouter가 DM), Vault 토큰 만료 대응 (auto_renew 전 config 리로드 + 403 감지). 매일 03:00 UTC 자동 갱신 (만료 30일 이내)
|
||||
cert-manager 보안/신뢰성: Bearer 토큰 인증 (/health 제외), 도메인 입력 검증 (path traversal 차단), tenacity 재시도 ([[apisix]], Google EAB), Discord DM 알림 (실패 시 봇 DarkRouter가 DM), [[vault]] 토큰 만료 대응 (auto_renew 전 config 리로드 + 403 감지). 매일 03:00 UTC 자동 갱신 (만료 30일 이내)
|
||||
|
||||
## Gitea 레포
|
||||
|
||||
Gitea repository is https://gitea.anvil.it.com/kaffa/cert-manager (private)
|
||||
[[gitea]] repository is https://gitea.anvil.it.com/kaffa/cert-manager (private)
|
||||
|
||||
## DNS
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: Cloudflare 서비스
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## Zone
|
||||
@@ -10,7 +9,7 @@ Cloudflare zone: ironclad.it.com (zone ID: bc8761b398cc52cf731f804bd3cbf388)
|
||||
|
||||
## Workers
|
||||
|
||||
Cloudflare Workers로 텔레그램 웹훅 처리
|
||||
Cloudflare Workers로 [[telegram-bot|텔레그램]] 웹훅 처리
|
||||
|
||||
## R2 스토리지
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: CrowdSec 및 SafeLine WAF
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## DB 테이블
|
||||
@@ -14,4 +13,4 @@ DB 테이블은 blocklist (ip PK, reason, origin, expires_at), verified_ips, met
|
||||
|
||||
## Bouncer
|
||||
|
||||
Bouncer 목록: apisix-waf-bouncer, bunny-cdn-bouncer, cs-cf-worker-bouncer
|
||||
Bouncer 목록: [[apisix]]-waf-bouncer, bunny-cdn-bouncer, cs-[[cloudflare|cf]]-worker-bouncer
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: Forge 인프라 에이전트
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## 지식 베이스
|
||||
@@ -14,4 +13,4 @@ infra.yaml 지식 베이스 + enrichment(IP→네트워크/인스턴스 레이
|
||||
|
||||
## MCP 구조
|
||||
|
||||
구조는 server.py(초기화), config.py(설정), haproxy_client.py(Runtime API), ssh_ops.py(SSH), db.py(SQLite), tools/(domains, servers, health, monitoring, configuration, certificates)로 구성되어 있다.
|
||||
구조는 server.py(초기화), config.py(설정), haproxy_client.py(Runtime API), ssh_ops.py(SSH), db.py(SQLite), tools/(domains, servers, health, monitoring, configuration, certificates)로 구성되어 있다. → [[infra-hosts]], [[apisix]]
|
||||
|
||||
@@ -1,13 +1,44 @@
|
||||
---
|
||||
title: 인프라 호스트 및 네트워크
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## SSH 접속 정보
|
||||
|
||||
인프라 호스트 SSH 접속 정보: incus-jp1 (공인 42.125.196.116, Tailscale 100.109.123.1), incus-kr1 (공인 220.120.65.245, Tailscale 100.84.111.28), osaka(gw) (ssh root@100.108.39.107, 공인 172.233.93.180), Synology NAS (SSH 불가, Tailscale 100.126.100.82)
|
||||
|
||||
## 서버 상세
|
||||
|
||||
| SSH 호스트 | Tailscale IP | 역할 | 비고 |
|
||||
|-----------|-------------|------|------|
|
||||
| apisix-osaka | 100.108.39.107 | [[apisix]] API Gateway (오사카) | SSH 직접 접속 |
|
||||
| incus-jp1 | 100.109.123.1 | Incus 호스트 (도쿄) | monitoring, db, default 프로젝트 |
|
||||
| incus-kr1 | 100.84.111.28 | Incus 호스트 (서울) | default, inbest, karakeep, security 프로젝트 |
|
||||
| incus-kr2 | 100.119.109.41 | Incus+K3s 호스트 (서울) | Ryzen 9 6900HX, 24GB RAM, Radeon 680M, Ollama, K3s |
|
||||
| sandbox-tokyo | 100.79.87.48 | 테스트 서버 (도쿄, Linode) | |
|
||||
| jump-seoul | 100.120.61.54 | SSH 점프 서버 (서울, AWS) | nginx stream TCP 포워딩 |
|
||||
| safeline-osaka | 100.100.212.6 | SafeLine WAF (오사카, Linode) | |
|
||||
| synology | 100.126.100.82 | NAS (시놀로지) | |
|
||||
|
||||
## 서비스 위치
|
||||
|
||||
| 서비스 | 위치 | 접근 방법 |
|
||||
|--------|------|-----------|
|
||||
| [[apisix]] | apisix-osaka + kr1 | SSH 직접 접속 / Admin API |
|
||||
| NocoDB | K8s 클러스터 (kr1) | kubectl |
|
||||
| Anvil, Ironclad | K8s 클러스터 (kr1) | kubectl |
|
||||
| Prometheus, Grafana | jp1 (monitoring) | incus exec --project monitoring |
|
||||
| DB 서버 | jp1 (db) | incus exec --project db |
|
||||
| [[vault]] | 인프라 내부 | vault CLI / MCP |
|
||||
| [[gitea]] | 자체 호스팅 (gitea.anvil.it.com) | git push → Gitea Act Runner |
|
||||
| BunnyCDN | 외부 SaaS | BunnyCDN MCP 서버 / API |
|
||||
|
||||
## Incus 프로젝트
|
||||
|
||||
- **jp1**: monitoring, db, default
|
||||
- **kr1**: default, inbest, karakeep, security
|
||||
- **kr2**: default
|
||||
|
||||
## 네트워크 대역
|
||||
|
||||
네트워크 대역: 100.0.0.0/8 (Tailscale VPN), 10.253.0.0/16 (incus-jp1 내부), 10.19.0.0/16 (incus-kr1 내부), 10.42.0.0/16 (k8s 파드), 10.43.0.0/16 (k8s 서비스 ClusterIP), 172.17.0.0/16 (Docker 브릿지, 무시), 192.168.9.0/24 (kaffa 로컬 LAN)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: 인프라 프로비저닝 (OpenTofu)
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## OpenTofu
|
||||
@@ -10,7 +9,7 @@ OpenTofu v1.11.5 installed at /usr/local/bin/tofu
|
||||
|
||||
## Tofu API
|
||||
|
||||
Tofu API (infra-tool 컨테이너, incus-jp1): 포트 8080 (uvicorn --port 8080). 파일 /opt/infra-tool/tofu_router.py. 엔드포인트: GET /tofu/plan, GET /tofu/state, GET /tofu/output, POST /tofu/server(provider/region/plan/label), DELETE /tofu/server/{name}, GET /tofu/plans/{provider}. 접근: ssh kaffa@100.109.123.1 → incus exec infra-tool -- bash. TF 템플릿 경로: /opt/infra/templates/{linode,vultr,alicloud,zenlayer}.tf.tpl. 참고: Forge consumer.py는 아직 tofu API를 사용하지 않고 Linode/Vultr API를 직접 호출하는 구조임.
|
||||
Tofu API (infra-tool 컨테이너, incus-jp1): 포트 8080 (uvicorn --port 8080). 파일 /opt/infra-tool/tofu_router.py. 엔드포인트: GET /tofu/plan, GET /tofu/state, GET /tofu/output, POST /tofu/server(provider/region/plan/label), DELETE /tofu/server/{name}, GET /tofu/plans/{provider}. 접근: ssh kaffa@100.109.123.1 → incus exec infra-tool -- bash. TF 템플릿 경로: /opt/infra/templates/{linode,vultr,alicloud,zenlayer}.tf.tpl. 참고: [[infra-forge|Forge]] consumer.py는 아직 tofu API를 사용하지 않고 Linode/Vultr API를 직접 호출하는 구조임.
|
||||
|
||||
## Zenlayer BM 프로비저닝
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: Vault 시크릿 관리
|
||||
updated: 2026-03-12
|
||||
source: openmemory
|
||||
---
|
||||
|
||||
## Root Token
|
||||
@@ -15,3 +14,7 @@ Vault root token은 만료 없음 (TTL: 0s)
|
||||
## NocoDB
|
||||
|
||||
NocoDB API 토큰: Vault secret/nocodb/api-token (필드: token, url, user)
|
||||
|
||||
## 관련 서비스
|
||||
|
||||
[[cert-manager]], [[gitea]], [[irondesk]] 등에서 Vault 시크릿을 참조
|
||||
|
||||
Reference in New Issue
Block a user