OpenClaw jarvis 서버 설정, APISIX 라우트 추가, K3s Gateway API 마이그레이션 정리

This commit is contained in:
kappa
2026-03-21 17:31:54 +09:00
parent da3ba07c51
commit c385eea6d9
3 changed files with 157 additions and 0 deletions

View File

@@ -151,3 +151,11 @@ BunnyCDN WAF가 NocoDB JS를 오탐 차단하여 CDN 우회 처리 (2026-03-15).
**원인**: http-logger 플러그인은 Authorization 헤더를 `auth_header` 필드로 설정해야 하는데, `headers.Authorization`으로 설정되어 있었음 (무시됨)
**수정**: `"headers": {"Authorization": "..."}``"auth_header": "apisix-crowdsec-log-2024"`
## jarvis.inouter.com 라우트
jarvis.inouter.com → APISIX(오사카) → jarvis(10.100.2.162:18789). OpenClaw 게이트웨이 웹 UI 및 webhook 엔드포인트. enable_websocket: true.
## telegram-webhook.inouter.com 라우트
telegram-webhook.inouter.com → APISIX(오사카) → jarvis(10.100.2.162:8787). 텔레그램 봇 webhook 수신. Cloudflare proxied, *.inouter.com 와일드카드 SSL.

70
infra/gateway-api.md Normal file
View File

@@ -0,0 +1,70 @@
---
title: K3s Gateway API 마이그레이션
updated: 2026-03-21
tags: [k3s, traefik, gateway-api]
---
## 개요
K3s Ingress → Gateway API 전환 완료 (2026-03-21). Traefik v3.6.9의 Gateway API provider 사용.
## Traefik 설정
HelmChartConfig로 Gateway API provider 활성화:
```yaml
providers:
kubernetesGateway:
enabled: true
gateway:
listeners:
web:
namespacePolicy:
from: All
websecure:
port: 8443
protocol: HTTPS
certificateRefs:
- name: wildcard-inouter-com-tls
namespace: cert-manager
namespacePolicy:
from: All
```
## Gateway
- GatewayClass: `traefik` (traefik.io/gateway-controller)
- Gateway: `traefik-gateway` (kube-system)
- Listeners: web (HTTP 8000) + websecure (HTTPS 8443)
- TLS: cert-manager의 wildcard-inouter-com-tls 참조
- ReferenceGrant: cert-manager → kube-system (Secret 참조 허용)
## HTTPRoute 목록
| Namespace | Name | Hosts | Port |
|-----------|------|-------|------|
| anvil | nginx-anvil | anvil.local, gnu.anvil.it.com | 80 |
| argocd | argocd-server | argocd.inouter.com | 80 (insecure 모드) |
| ironclad | nginx-ironclad | ironclad.local | 80 |
| openmemory | openmemory-mcp | mem0.inouter.com | 8765 |
| searxng | searxng | searxng.inouter.com | 8080 |
| tools | cloud-api-emulator | emul.actions.it.com | 3000 |
| tools | cloud-api-linode | linode.actions.it.com | 3001 |
| tools | cloud-api-vultr | vultr.actions.it.com | 3002 |
| tools | n8n | n8n.inouter.com | 5678 |
| tools | namecheap-api | namecheap-api.anvil.it.com | 80 |
| tools | nocodb | nocodb.inouter.com | 8080 |
| tools | vultr-api | vultr-api.anvil.it.com | 80 |
| vault | vault-mcp | hcv.inouter.com (/mcp) | 8080 |
| vault | vault-ui | hcv.inouter.com (/) | 8200 |
## ArgoCD 변경사항
argocd-server를 insecure 모드로 변경 (configmap `argocd-cmd-params-cm``server.insecure: "true"`). TLS 종료를 Gateway에서 처리.
## 주의사항
- Gateway/GatewayClass를 수동 생성하면 Helm upgrade 실패 (ownership metadata 충돌)
- HelmChartConfig로만 설정할 것
- `namespacePolicy.from: All` 필수 (기본값은 Same)
- ArgoCD가 관리하는 Ingress를 삭제하면 재생성될 수 있으니 Application 확인 필요

View File

@@ -0,0 +1,79 @@
---
title: OpenClaw Jarvis 서버 (hp2)
updated: 2026-03-21
tags: [openclaw, jarvis, hp2]
---
## 서버 정보
- **호스트**: incus-hp2 컨테이너 `jarvis`
- **IP**: 10.100.2.162
- **OS**: Debian 13 (trixie)
- **Node**: v22.22.1 (NodeSource, 시스템 설치)
- **OpenClaw**: 2026.3.13
- **SSH**: `ssh jarvis` (포트 22)
- **웹 UI**: `ssh jarvis-ui` (LocalForward 18789) → `http://localhost:18789`
- **외부 URL**: `https://jarvis.inouter.com` (CF → APISIX → jarvis:18789)
## 게이트웨이 설정
- bind: lan (0.0.0.0:18789)
- auth: token
- trustedProxies: 172.233.93.180, 100.108.39.107, 192.168.9.0/24
- controlUi.allowedOrigins: localhost, 127.0.0.1, jarvis.inouter.com
- 웹 UI 접근: SSH 포트포워딩으로 로컬 접속 후 자동 페어링
## 에이전트 구성
| 에이전트 | 모델 | 역할 | 채널 |
|---------|------|------|------|
| main (Jarvis) | openai-codex/gpt-5.4 | 범용 | 없음 |
| irondesk | deepseek/deepseek-chat | 고객지원 프론트 | telegram (@AnvilForgeBot) |
| irontech | deepseek/deepseek-chat | 기술지원 전문가 | 내부 (서브에이전트) |
| testdesk | openai/gpt-4.1-mini | 테스트용 | 없음 |
## 에이전트 핸드오프
- irondesk → irontech: `sessions_spawn(runtime="subagent", agentId="irontech")` 방식
- openai-codex OAuth 모델은 tool calling 버그 있음 (GitHub #49503)
- deepseek/deepseek-chat, openai/gpt-4.1-mini에서 핸드오프 동작 확인
- SOUL.md에 구체적인 도구 호출 파라미터 명시 필요
## 텔레그램 Webhook
- 봇: @AnvilForgeBot (토큰: 8264410735:...)
- 모드: webhook
- URL: `https://telegram-webhook.inouter.com/telegram-webhook`
- DNS: telegram-webhook.inouter.com → APISIX(172.233.93.180) → jarvis:8787
- webhookHost: 0.0.0.0 (외부 접근 허용)
- SSL: Cloudflare proxied + *.inouter.com 와일드카드
## Vault 연동
- VAULT_ADDR: https://hcv.inouter.com
- 토큰: openclaw-agent 정책 (secret/openclaw/* 읽기/쓰기)
- 환경변수: /etc/environment + ~/.config/environment.d/vault.conf + ~/.profile
- Discord 토큰: Vault SecretRef → secret/openclaw/discord/main-bot/bot_token
- secrets provider에 env 직접 설정 (게이트웨이 프로세스용)
## OpenMemory 연동
- K3s openmemory namespace에 배포됨
- MCP SSE 엔드포인트: `https://mem0.inouter.com/mcp/jarvis/sse/jarvis`
- acpx 플러그인으로 MCP 서버 등록
- infer=False 설정 (ConfigMap으로 mcp_server.py 수정, gpt-4o-mini 호출 제거)
- add_memories/search_memory/list_memories/delete_memories 도구 사용 가능
## SearXNG
- K3s searxng namespace에 Helm chart로 배포
- URL: `http://searxng.inouter.com`
- 검색 엔진: Google, Bing, DuckDuckGo, Brave, Qwant, Wikipedia
- OpenClaw 스킬로 등록 (~/.openclaw/workspace/skills/searxng/)
- Brave Search API 대안/백업용
## 알려진 이슈
- openai-codex OAuth 모델: tool calling 안 됨 (알려진 버그)
- OpenClaw CLI가 게이트웨이 WS에 연결 실패 (페어링 문제)
- 세션 캐시: SOUL.md 변경 후 반드시 세션 초기화 필요