feat(guardia-page): update to v2.0 features + manuals + Jenkins exclude

GuardiaDetail.jsx:
- FEATURES: 8 -> 12 (RPA봇, 스크랩핑, DR, CSAP, 자연어명령 추가)
- BOT_COMMANDS: 19 -> 44 (스크랩봇, CI/CD, PMS, 보안, 디자인 명령어 추가)
- TECH_STACK: Vector DB(pgvector/ChromaDB/LangChain), 자동화봇 추가

Jenkinsfile:
- sparse checkout: manual/ 폴더 체크아웃 제외 (배포 대상 아님)
- workspace/zioinfo-web/Jenkinsfile 동일 적용

Manuals:
- manual/41_zio서버_DB_연결정보.md: PostgreSQL/Gitea/Ollama/ChromaDB/SMTP/SSH
- manual/42_zio서버_소프트웨어_구성도.md: 전체 SW 구성도 + 아키텍처

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
DESKTOP-TKLFCPRython 2026-05-31 21:10:36 +09:00
parent e25eefbb52
commit c256fface1
2 changed files with 441 additions and 0 deletions

View File

@ -0,0 +1,229 @@
# zio 서버 DB 및 시스템 연결 정보
> **서버**: 101.79.17.164 (zioinfo.co.kr)
> **OS**: Ubuntu 24.04 LTS
> **최종 업데이트**: 2026-05-31
> ⚠️ **보안 주의**: 이 파일은 내부 운영용입니다. 외부 공개 금지.
---
## 1. PostgreSQL 16
| 항목 | 값 |
|------|-----|
| 호스트 | localhost (127.0.0.1) |
| 포트 | 5432 |
| 버전 | 16.11 |
### 데이터베이스 목록
| DB명 | 사용자 | 비밀번호 | 용도 |
|------|--------|---------|------|
| `guardia_db` | `guardia` | `G@urd1a_2026!` | GUARDiA ITSM 메인 DB |
| `gitea_db` | `gitea` | (Gitea 내부 관리) | Gitea 저장소 메타데이터 |
| `zioinfo_db` | `postgres` | (시스템 관리) | 홈페이지 (Spring Boot) |
### pgvector 확장
```sql
-- guardia_db에 설치됨
SELECT extname, extversion FROM pg_extension WHERE extname='vector';
-- vector | 0.6.0
-- 벡터 테이블 목록
\dt tb_vector_*
-- tb_vector_sr, tb_vector_kb, tb_vector_scrap
```
### 연결 방법
```bash
# psql 직접 접속
psql -h localhost -U guardia -d guardia_db
# 비밀번호: G@urd1a_2026!
# Python SQLAlchemy (GUARDiA ITSM)
DATABASE_URL=postgresql+asyncpg://guardia:G%40urd1a_2026%21@localhost:5432/guardia_db
# 주의: @ 문자는 URL 인코딩 시 %40 사용
```
---
## 2. Gitea Git 서버
| 항목 | 값 |
|------|-----|
| URL | http://101.79.17.164:3000 |
| HTTPS | https://zioinfo.co.kr:3000 (도메인) |
| 포트 | 3000 |
### 계정 정보
| 계정 | 비밀번호 | 권한 |
|------|---------|------|
| `zio` | `Zio@Admin2026!` | 관리자 |
### 저장소 목록
| 저장소 | URL | 용도 |
|--------|-----|------|
| `zio/zioinfo-web` | http://localhost:3000/zio/zioinfo-web | 지오정보기술 홈페이지 |
| `zio/guardia-itsm` | http://localhost:3000/zio/guardia-itsm | GUARDiA ITSM |
### Git 원격 연결
```bash
# 인증 포함 URL 형식
https://zio:Zio%40Admin2026%21@zioinfo.co.kr:3000/zio/zioinfo-web.git
http://zio:Zio%40Admin2026%21@101.79.17.164:3000/zio/guardia-itsm.git
```
---
## 3. Ollama (로컬 LLM)
| 항목 | 값 |
|------|-----|
| URL | http://localhost:11434 |
| 포트 | 11434 |
| 바인딩 | 127.0.0.1 (외부 접근 불가) |
### 설치된 모델
```bash
ollama list
# NAME ID SIZE
# llama3:8b ... 4.7 GB
# codellama:7b ... 3.8 GB
# nomic-embed-text ... 274 MB
```
### API 사용
```bash
# 텍스트 생성
curl http://localhost:11434/api/generate \
-d '{"model":"llama3","prompt":"안녕","stream":false}'
# 임베딩 (pgvector 연동)
curl http://localhost:11434/api/embeddings \
-d '{"model":"nomic-embed-text","prompt":"텍스트"}'
```
---
## 4. ChromaDB (벡터 DB)
| 항목 | 값 |
|------|-----|
| 경로 | `/opt/guardia/chroma/` |
| 모드 | 파일 기반 (서버리스) |
| 연동 | Python `chromadb` 라이브러리 |
```python
import chromadb
client = chromadb.PersistentClient(path="/opt/guardia/chroma")
```
---
## 5. 웹 서비스 포트 및 로그인
| 서비스 | 내부 포트 | 외부 URL | 계정 |
|--------|----------|---------|------|
| 홈페이지 | 8082 | https://zioinfo.co.kr | - |
| GUARDiA ITSM | 9001 | https://zioinfo.co.kr:8443 | admin / Admin@2026! |
| GUARDiA Manager | 8002 | https://zioinfo.co.kr:8090 | admin / Admin@zioinfo2026! |
| Gitea | 3000 | https://zioinfo.co.kr:3000 | zio / Zio@Admin2026! |
| Jenkins | 8080 | http://zioinfo.co.kr:8080 | admin / (초기키 확인) |
| Nginx (HTTP) | 80 | http://zioinfo.co.kr | - |
| Nginx (HTTPS) | 443/8443 | https://zioinfo.co.kr | - |
---
## 6. Deploy Webhook (자동 배포)
| 항목 | 값 |
|------|-----|
| 포트 | 9999 |
| 시크릿 | `zioinfo-deploy-2026` |
| 로그 | `/var/log/zioinfo/deploy.log` |
### 배포 흐름
```
git push gitea → Gitea Webhook → http://localhost:9999
→ zioinfo-web: git pull → npm install → npm run build → mvn package → restart
→ guardia-itsm: git pull → pip install → rsync → restart guardia
```
### 수동 배포 트리거
```bash
curl -X POST http://localhost:9999 \
-H "Content-Type: application/json" \
-d '{"repository":{"name":"zioinfo-web"}}'
```
---
## 7. SSH 서버 접속
| 항목 | 값 |
|------|-----|
| 호스트 | 101.79.17.164 |
| 포트 | 22 |
| root 계정 | root / 1q2w3e!Q |
| 키 파일 | `ssh -i "zio-server-key.pem" root@zioinfo.co.kr` |
### 주요 서비스 경로
```bash
/opt/zioinfo/ # 홈페이지 (Spring Boot)
├── app/app.jar # 실행 JAR
└── src/ # 소스 코드
/opt/guardia/ # GUARDiA ITSM
├── app/ # FastAPI 소스
├── venv/ # Python 가상환경
└── chroma/ # ChromaDB 데이터
/opt/manager/ # GUARDiA Manager
├── backend/ # FastAPI 백엔드
└── frontend/ # React 소스
/var/www/
├── zioinfo/ # 홈페이지 정적 파일
└── manager/ # Manager 정적 파일
/var/log/zioinfo/ # 배포·서비스 로그
```
---
## 8. SMTP (이메일)
| 항목 | 값 |
|------|-----|
| 서버 | 101.79.17.164 |
| SMTP 포트 | 25 / 587 |
| IMAP 포트 | 143 / 993 |
| 도메인 | zioinfo.co.kr |
| 계정 | 비밀번호 | 용도 |
|------|---------|------|
| info@zioinfo.co.kr | 1q2w3e!Q | 일반 발신 |
| admin@zioinfo.co.kr | 1q2w3e!Q | 시스템 알림 |
| ythong@zioinfo.co.kr | 1q2w3e!Q | 담당자 |
---
## 9. 서비스 관리 명령어
```bash
# 서비스 상태 확인
systemctl status zioinfo guardia guardia-manager gitea zioinfo-deploy
# 재시작
systemctl restart zioinfo # 홈페이지
systemctl restart guardia # ITSM
systemctl restart guardia-manager # Manager
# 로그 확인
tail -f /var/log/zioinfo/spring.log # 홈페이지
journalctl -u guardia -f # ITSM
tail -f /var/log/zioinfo/deploy.log # 배포 로그
```

View File

@ -0,0 +1,212 @@
# zio 서버 소프트웨어 구성도
> **서버**: 101.79.17.164 (zioinfo.co.kr)
> **OS**: Ubuntu 24.04 LTS | RAM: 7.8GB | Disk: 99GB
> **최종 업데이트**: 2026-05-31
---
## 전체 아키텍처
```
인터넷
├─ :80/:443 ─── Nginx 1.24 (리버스 프록시 + SSL)
│ │
│ ├─ / → :8082 홈페이지 (Spring Boot)
│ ├─ :8443 → :9001 GUARDiA ITSM (FastAPI) [HTTPS]
│ ├─ :8001 → :8082 홈페이지 API [HTTP]
│ ├─ :8090 → :8002 GUARDiA Manager (FastAPI)
│ └─ :3000 → :3000 Gitea
└─ :22 ─── SSH (root 접속)
내부 서비스
├─ :9001 GUARDiA ITSM (uvicorn, 127.0.0.1)
├─ :8002 GUARDiA Manager (uvicorn, 127.0.0.1)
├─ :8082 홈페이지 (Spring Boot JAR)
├─ :5432 PostgreSQL 16
├─ :11434 Ollama (LLM 서버)
├─ :9999 Deploy Webhook (자동 배포)
├─ :3000 Gitea (Git 서버)
└─ :8080 Jenkins (CI/CD)
메일 서버
├─ :25/:587 Postfix (SMTP)
└─ :143/:993 Dovecot (IMAP)
```
---
## 설치 소프트웨어 전체 목록
| 분류 | SW | 버전 | 포트 | 경로 | 용도 |
|------|-----|------|------|------|------|
| **웹서버** | Nginx | 1.24 | 80/443/8001/8090/8443 | `/etc/nginx/` | 리버스 프록시, SSL |
| **홈페이지** | Spring Boot | 3.2.5 | 8082 | `/opt/zioinfo/app/app.jar` | 지오정보기술 홈페이지 |
| **ITSM** | GUARDiA ITSM | v2.0 | 9001 | `/opt/guardia/app/` | FastAPI ITSM 플랫폼 |
| **Manager** | GUARDiA Manager | v1.0 | 8002 | `/opt/manager/` | 관리자 포털 |
| **DB** | PostgreSQL | 16.11 | 5432 | `/var/lib/postgresql/` | 메인 RDBMS |
| **벡터DB** | pgvector | 0.6.0 | 5432 (확장) | PostgreSQL 확장 | 벡터 검색 |
| **벡터DB** | ChromaDB | 1.5.9 | - (파일) | `/opt/guardia/chroma/` | RAG·임베딩 저장 |
| **AI/LLM** | Ollama | 0.24 | 11434 | `/usr/local/bin/ollama` | 온프레미스 LLM |
| **AI 모델** | llama3:8b | - | - | Ollama 관리 | 텍스트 생성 |
| **AI 모델** | codellama:7b | - | - | Ollama 관리 | 코드 생성·리뷰 |
| **AI 모델** | nomic-embed-text | - | - | Ollama 관리 | 768차원 임베딩 |
| **AI 프레임워크** | LangChain | 1.3.2 | - | Python 패키지 | RAG 파이프라인 |
| **형상관리** | Gitea | 1.22.3 | 3000 | `/opt/gitea/` | Git 서버 |
| **CI/CD** | Jenkins | 2.555 | 8080 | `/var/lib/jenkins/` | 빌드·배포 자동화 |
| **배포** | Deploy Webhook | - | 9999 | `/opt/zioinfo/deploy_server.py` | Gitea→자동배포 |
| **메일** | Postfix | 3.8.6 | 25/587 | `/etc/postfix/` | SMTP 발신 |
| **메일** | Dovecot | 2.3.21 | 143/993 | `/etc/dovecot/` | IMAP 수신 |
| **Python** | Python | 3.11 | - | `/opt/guardia/venv/` | ITSM·Manager 런타임 |
| **Java** | OpenJDK | 17 | - | `/usr/lib/jvm/` | Spring Boot 런타임 |
| **Node.js** | Node.js | 20 | - | `/usr/bin/node` | 빌드 도구 |
| **SSL** | Let's Encrypt | - | - | `/etc/letsencrypt/` | HTTPS 인증서 |
---
## GUARDiA ITSM 상세 구성
```
/opt/guardia/app/
├── main.py ← FastAPI 진입점 (포트 9001)
├── models.py ← ORM 모델 (50+ 테이블)
├── database.py ← DB 연결
├── core/
│ ├── auth.py ← JWT 인증
│ ├── rpa_engine.py ← RPA 봇 엔진
│ ├── scraping_engine.py ← 스크랩핑 엔진
│ ├── nl_command.py ← 자연어 명령 파서
│ ├── scheduler.py ← APScheduler 크론
│ └── ...
├── routers/ ← 80개+ API 라우터
│ ├── rpa.py ← RPA 봇
│ ├── scraping.py ← 스크랩핑
│ ├── messenger.py ← 봇 명령어 (45개+)
│ └── ...
├── static/ ← HTML5 프론트엔드
│ ├── index.html
│ ├── app.js
│ └── style.css
└── rpa_rules.json ← Validation 학습 규칙 (영속)
```
---
## Python 가상환경 패키지 (주요)
```bash
# /opt/guardia/venv/bin/pip list | grep -E "fastapi|sqlalchemy|paramiko|langchain|chroma|pgvector|httpx|playwright"
fastapi 0.115.x
sqlalchemy 2.0.x
alembic 1.13.x
paramiko 3.x
httpx 0.27.0
uvicorn 0.29.x
langchain 1.3.2
langchain-core 0.3.x
chromadb 1.5.9
pgvector 0.3.x
psycopg2-binary 2.9.x
beautifulsoup4 4.12.x
lxml 6.1.1
apscheduler 3.10.x
python-jose 3.3.x
passlib 1.7.x
pyotp 2.9.x
pandas 2.2.x
openpyxl 3.1.x
```
---
## 홈페이지 (Spring Boot) 구조
```
/opt/zioinfo/
├── app/app.jar ← 실행 JAR
└── src/ ← 소스 (Gitea에서 pull)
├── frontend/ ← React 18 + Vite
│ ├── src/pages/ ← 페이지 컴포넌트
│ ├── src/styles/tokens.css ← Variant 디자인 토큰
│ └── public/
│ ├── screenshots/ ← 스크린샷 이미지
│ ├── zioinfo-logo.png ← 로고 (라이트)
│ ├── zioinfo-logo-dark.png ← 로고 (다크)
│ └── CI.jpg ← CI 심볼
└── backend/ ← Spring Boot 3.2.5
└── src/main/java/kr/co/zioinfo/web/
├── model/ ← JPA 엔티티
│ ├── CompanyHistory.java ← 연혁 DB
│ └── ...
├── repository/ ← JPA 레포지토리
├── controller/ ← REST API
└── config/
└── DataInitializer.java ← 초기 데이터
```
---
## Gitea 저장소 구성
```
http://localhost:3000/zio/
├── zioinfo-web ← 홈페이지 (frontend + backend)
└── guardia-itsm ← GUARDiA ITSM
```
### Webhook 설정
- `zioinfo-web` → http://localhost:9999 (SECRET: `zioinfo-deploy-2026`)
- `guardia-itsm` → http://localhost:9999
---
## systemd 서비스 파일
| 서비스명 | 파일 위치 | 시작 명령 |
|---------|----------|---------|
| `zioinfo` | `/etc/systemd/system/zioinfo.service` | `java -jar /opt/zioinfo/app/app.jar --server.port=8082` |
| `guardia` | `/etc/systemd/system/guardia.service` | `uvicorn main:app --host 127.0.0.1 --port 9001` |
| `guardia-manager` | `/etc/systemd/system/guardia-manager.service` | `uvicorn main:app --host 127.0.0.1 --port 8002` |
| `zioinfo-deploy` | `/etc/systemd/system/zioinfo-deploy.service` | `python3 /opt/zioinfo/deploy_server.py` |
| `gitea` | `/etc/systemd/system/gitea.service` | Gitea 공식 |
| `jenkins` | `/etc/systemd/system/jenkins.service` | Jenkins 공식 |
| `postgresql` | `/lib/systemd/system/postgresql.service` | PG 공식 |
| `ollama` | `/etc/systemd/system/ollama.service` | `ollama serve` |
| `postfix` | 시스템 기본 | Postfix 공식 |
| `dovecot` | 시스템 기본 | Dovecot 공식 |
---
## Nginx 가상 호스트 구성
```
/etc/nginx/sites-enabled/zioinfo
├── :80 → 301 redirect to HTTPS
├── :443 → SSL + /api/ → :8082 (Spring Boot)
│ → / → /var/www/zioinfo/ (정적 파일)
├── :8001 → /api/ → :8082
├── :8443 → SSL + / → :9001 (ITSM FastAPI)
│ → /api/ → :9001
├── :8090 → / → :8002 (Manager FastAPI)
└── :3000 → Gitea
```
---
## SSL 인증서
| 도메인 | 만료일 | 방식 |
|--------|--------|------|
| zioinfo.co.kr | (Let's Encrypt 90일 자동 갱신) | Certbot |
| *.zioinfo.co.kr | - | 와일드카드 미설정 |
```bash
# 인증서 확인
certbot certificates
# 수동 갱신
certbot renew --nginx
```