mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-06-12 21:49:10 +00:00
서버 main 브랜치 내용으로 현행화 완료
- .gitignore 충돌 해결 - ai-java-back/, ai/ 디렉토리 제외 규칙 추가 - main 브랜치의 모든 변경사항 병합
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Development environment variables for ai-python service
|
||||
resource_group=rg-digitalgarage-02
|
||||
cluster_name=aks-digitalgarage-02
|
||||
@@ -0,0 +1,7 @@
|
||||
# Azure Resource Configuration
|
||||
resource_group=rg-digitalgarage-02
|
||||
cluster_name=aks-digitalgarage-02
|
||||
|
||||
# RAG Service Configuration
|
||||
python_version=3.11
|
||||
app_port=8088
|
||||
@@ -0,0 +1,7 @@
|
||||
# Azure Resource Configuration
|
||||
resource_group=rg-digitalgarage-prod
|
||||
cluster_name=aks-digitalgarage-prod
|
||||
|
||||
# RAG Service Configuration
|
||||
python_version=3.11
|
||||
app_port=8088
|
||||
@@ -0,0 +1,7 @@
|
||||
# Azure Resource Configuration
|
||||
resource_group=rg-digitalgarage-staging
|
||||
cluster_name=aks-digitalgarage-staging
|
||||
|
||||
# RAG Service Configuration
|
||||
python_version=3.11
|
||||
app_port=8088
|
||||
@@ -32,6 +32,13 @@ spec:
|
||||
name: stt
|
||||
port:
|
||||
number: 8080
|
||||
- path: /api/transcripts
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: ai-service
|
||||
port:
|
||||
number: 8087
|
||||
- path: /api/ai/suggestions
|
||||
pathType: Prefix
|
||||
backend:
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
name: AI-Python Service CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
paths:
|
||||
- 'ai-python/**'
|
||||
- '.github/workflows/ai-python-cicd_ArgoCD.yaml'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ENVIRONMENT:
|
||||
description: 'Target environment'
|
||||
required: true
|
||||
default: 'dev'
|
||||
type: choice
|
||||
options:
|
||||
- dev
|
||||
- staging
|
||||
- prod
|
||||
SKIP_TESTS:
|
||||
description: 'Skip Tests'
|
||||
required: false
|
||||
default: 'false'
|
||||
type: choice
|
||||
options:
|
||||
- 'false'
|
||||
- 'true'
|
||||
|
||||
env:
|
||||
REGISTRY: acrdigitalgarage02.azurecr.io
|
||||
IMAGE_ORG: hgzero
|
||||
SERVICE_NAME: ai-python
|
||||
RESOURCE_GROUP: rg-digitalgarage-02
|
||||
AKS_CLUSTER: aks-digitalgarage-02
|
||||
NAMESPACE: hgzero
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Test
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
image_tag: ${{ steps.set_outputs.outputs.image_tag }}
|
||||
environment: ${{ steps.set_outputs.outputs.environment }}
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.13'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'ai-python/requirements.txt'
|
||||
|
||||
- name: Determine environment
|
||||
id: determine_env
|
||||
run: |
|
||||
ENVIRONMENT="${{ github.event.inputs.ENVIRONMENT || 'dev' }}"
|
||||
echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Load environment variables
|
||||
id: env_vars
|
||||
run: |
|
||||
ENV=${{ steps.determine_env.outputs.environment }}
|
||||
|
||||
REGISTRY="acrdigitalgarage02.azurecr.io"
|
||||
IMAGE_ORG="hgzero"
|
||||
RESOURCE_GROUP="rg-digitalgarage-02"
|
||||
AKS_CLUSTER="aks-digitalgarage-02"
|
||||
NAMESPACE="hgzero"
|
||||
|
||||
if [[ -f ".github/config/deploy_env_vars_ai-python_${ENV}" ]]; then
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
[[ "$line" =~ ^#.*$ ]] && continue
|
||||
[[ -z "$line" ]] && continue
|
||||
|
||||
key=$(echo "$line" | cut -d '=' -f1)
|
||||
value=$(echo "$line" | cut -d '=' -f2-)
|
||||
|
||||
case "$key" in
|
||||
"resource_group") RESOURCE_GROUP="$value" ;;
|
||||
"cluster_name") AKS_CLUSTER="$value" ;;
|
||||
esac
|
||||
done < ".github/config/deploy_env_vars_ai-python_${ENV}"
|
||||
fi
|
||||
|
||||
echo "REGISTRY=$REGISTRY" >> $GITHUB_ENV
|
||||
echo "IMAGE_ORG=$IMAGE_ORG" >> $GITHUB_ENV
|
||||
echo "RESOURCE_GROUP=$RESOURCE_GROUP" >> $GITHUB_ENV
|
||||
echo "AKS_CLUSTER=$AKS_CLUSTER" >> $GITHUB_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd ai-python
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run Tests
|
||||
env:
|
||||
SKIP_TESTS: ${{ github.event.inputs.SKIP_TESTS || 'true' }}
|
||||
run: |
|
||||
if [[ "$SKIP_TESTS" == "true" ]]; then
|
||||
echo "⏭️ Skipping Tests (SKIP_TESTS=$SKIP_TESTS)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd ai-python
|
||||
# pytest가 requirements.txt에 있다면 실행
|
||||
if pip list | grep -q "pytest"; then
|
||||
if [ -d "tests" ]; then
|
||||
pytest tests/ --cov=app --cov-report=xml --cov-report=html || echo "⚠️ Tests failed but continuing"
|
||||
else
|
||||
echo "⚠️ No tests directory found, skipping tests"
|
||||
fi
|
||||
else
|
||||
echo "⚠️ pytest not installed, skipping tests"
|
||||
fi
|
||||
|
||||
echo "✅ Tests completed successfully"
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results
|
||||
path: |
|
||||
ai-python/htmlcov/
|
||||
ai-python/coverage.xml
|
||||
|
||||
- name: Set outputs
|
||||
id: set_outputs
|
||||
run: |
|
||||
IMAGE_TAG=$(date +%Y%m%d%H%M%S)
|
||||
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
|
||||
echo "environment=${{ steps.determine_env.outputs.environment }}" >> $GITHUB_OUTPUT
|
||||
|
||||
release:
|
||||
name: Build and Push Docker Image
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables from build job
|
||||
run: |
|
||||
echo "REGISTRY=${{ env.REGISTRY }}" >> $GITHUB_ENV
|
||||
echo "IMAGE_ORG=${{ env.IMAGE_ORG }}" >> $GITHUB_ENV
|
||||
echo "SERVICE_NAME=${{ env.SERVICE_NAME }}" >> $GITHUB_ENV
|
||||
echo "ENVIRONMENT=${{ needs.build.outputs.environment }}" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG=${{ needs.build.outputs.image_tag }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub (prevent rate limit)
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to Azure Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.ACR_USERNAME }}
|
||||
password: ${{ secrets.ACR_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
echo "Building and pushing AI-Python service..."
|
||||
docker build \
|
||||
-f deployment/container/Dockerfile-ai-python \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_ORG }}/${{ env.SERVICE_NAME }}:${{ needs.build.outputs.environment }}-${{ needs.build.outputs.image_tag }} \
|
||||
ai-python/
|
||||
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_ORG }}/${{ env.SERVICE_NAME }}:${{ needs.build.outputs.environment }}-${{ needs.build.outputs.image_tag }}
|
||||
|
||||
echo "✅ Docker image pushed successfully"
|
||||
|
||||
update-manifest:
|
||||
name: Update Manifest Repository
|
||||
needs: [build, release]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set image tag environment variable
|
||||
run: |
|
||||
echo "IMAGE_TAG=${{ needs.build.outputs.image_tag }}" >> $GITHUB_ENV
|
||||
echo "ENVIRONMENT=${{ needs.build.outputs.environment }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Update Manifest Repository
|
||||
run: |
|
||||
# 매니페스트 레포지토리 클론
|
||||
REPO_URL=$(echo "https://github.com/hjmoons/hgzero-manifest.git" | sed 's|https://||')
|
||||
git clone https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_PASSWORD }}@${REPO_URL} manifest-repo
|
||||
cd manifest-repo
|
||||
|
||||
# Kustomize 설치
|
||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
||||
sudo mv kustomize /usr/local/bin/
|
||||
|
||||
# 매니페스트 업데이트
|
||||
cd hgzero-back/kustomize/overlays/${{ env.ENVIRONMENT }}
|
||||
|
||||
# AI-Python 서비스 이미지 태그 업데이트
|
||||
kustomize edit set image acrdigitalgarage02.azurecr.io/hgzero/ai-python:${{ env.ENVIRONMENT }}-${{ env.IMAGE_TAG }}
|
||||
|
||||
# Git 설정 및 푸시
|
||||
cd ../../../..
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git add .
|
||||
git commit -m "🚀 Update AI-Python ${{ env.ENVIRONMENT }} image to ${{ env.ENVIRONMENT }}-${{ env.IMAGE_TAG }}"
|
||||
git push origin main
|
||||
|
||||
echo "✅ 매니페스트 업데이트 완료. ArgoCD가 자동으로 배포합니다."
|
||||
@@ -2,7 +2,7 @@ name: Backend Services CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'user/**'
|
||||
- 'meeting/**'
|
||||
@@ -11,8 +11,8 @@ on:
|
||||
- 'notification/**'
|
||||
- 'common/**'
|
||||
- '.github/**'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
# pull_request:
|
||||
# branches: [ main ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ENVIRONMENT:
|
||||
@@ -143,6 +143,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: app-builds
|
||||
retention-days: 1
|
||||
path: |
|
||||
user/build/libs/*.jar
|
||||
meeting/build/libs/*.jar
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
name: RAG Service CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
paths:
|
||||
- 'rag/**'
|
||||
- '.github/workflows/rag-cicd_ArgoCD.yaml'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ENVIRONMENT:
|
||||
description: 'Target environment'
|
||||
required: true
|
||||
default: 'dev'
|
||||
type: choice
|
||||
options:
|
||||
- dev
|
||||
- staging
|
||||
- prod
|
||||
SKIP_TESTS:
|
||||
description: 'Skip Tests'
|
||||
required: false
|
||||
default: 'true'
|
||||
type: choice
|
||||
options:
|
||||
- 'false'
|
||||
- 'true'
|
||||
|
||||
env:
|
||||
REGISTRY: acrdigitalgarage02.azurecr.io
|
||||
IMAGE_ORG: hgzero
|
||||
SERVICE_NAME: rag
|
||||
RESOURCE_GROUP: rg-digitalgarage-02
|
||||
AKS_CLUSTER: aks-digitalgarage-02
|
||||
NAMESPACE: hgzero
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Test
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
image_tag: ${{ steps.set_outputs.outputs.image_tag }}
|
||||
environment: ${{ steps.set_outputs.outputs.environment }}
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'rag/requirements.txt'
|
||||
|
||||
- name: Determine environment
|
||||
id: determine_env
|
||||
run: |
|
||||
ENVIRONMENT="${{ github.event.inputs.ENVIRONMENT || 'dev' }}"
|
||||
echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Load environment variables
|
||||
id: env_vars
|
||||
run: |
|
||||
ENV=${{ steps.determine_env.outputs.environment }}
|
||||
|
||||
REGISTRY="acrdigitalgarage02.azurecr.io"
|
||||
IMAGE_ORG="hgzero"
|
||||
RESOURCE_GROUP="rg-digitalgarage-02"
|
||||
AKS_CLUSTER="aks-digitalgarage-02"
|
||||
NAMESPACE="hgzero"
|
||||
|
||||
if [[ -f ".github/config/deploy_env_vars_rag_${ENV}" ]]; then
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
[[ "$line" =~ ^#.*$ ]] && continue
|
||||
[[ -z "$line" ]] && continue
|
||||
|
||||
key=$(echo "$line" | cut -d '=' -f1)
|
||||
value=$(echo "$line" | cut -d '=' -f2-)
|
||||
|
||||
case "$key" in
|
||||
"resource_group") RESOURCE_GROUP="$value" ;;
|
||||
"cluster_name") AKS_CLUSTER="$value" ;;
|
||||
esac
|
||||
done < ".github/config/deploy_env_vars_rag_${ENV}"
|
||||
fi
|
||||
|
||||
echo "REGISTRY=$REGISTRY" >> $GITHUB_ENV
|
||||
echo "IMAGE_ORG=$IMAGE_ORG" >> $GITHUB_ENV
|
||||
echo "RESOURCE_GROUP=$RESOURCE_GROUP" >> $GITHUB_ENV
|
||||
echo "AKS_CLUSTER=$AKS_CLUSTER" >> $GITHUB_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd rag
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run Tests
|
||||
env:
|
||||
SKIP_TESTS: ${{ github.event.inputs.SKIP_TESTS || 'true' }}
|
||||
run: |
|
||||
if [[ "$SKIP_TESTS" == "true" ]]; then
|
||||
echo "⏭️ Skipping Tests (SKIP_TESTS=$SKIP_TESTS)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd rag
|
||||
# Run pytest with coverage
|
||||
pytest tests/ --cov=src --cov-report=xml --cov-report=html
|
||||
|
||||
echo "✅ Tests completed successfully"
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results
|
||||
path: |
|
||||
rag/htmlcov/
|
||||
rag/coverage.xml
|
||||
|
||||
- name: Set outputs
|
||||
id: set_outputs
|
||||
run: |
|
||||
IMAGE_TAG=$(date +%Y%m%d%H%M%S)
|
||||
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
|
||||
echo "environment=${{ steps.determine_env.outputs.environment }}" >> $GITHUB_OUTPUT
|
||||
|
||||
release:
|
||||
name: Build and Push Docker Image
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables from build job
|
||||
run: |
|
||||
echo "REGISTRY=${{ env.REGISTRY }}" >> $GITHUB_ENV
|
||||
echo "IMAGE_ORG=${{ env.IMAGE_ORG }}" >> $GITHUB_ENV
|
||||
echo "SERVICE_NAME=${{ env.SERVICE_NAME }}" >> $GITHUB_ENV
|
||||
echo "ENVIRONMENT=${{ needs.build.outputs.environment }}" >> $GITHUB_ENV
|
||||
echo "IMAGE_TAG=${{ needs.build.outputs.image_tag }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub (prevent rate limit)
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to Azure Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.ACR_USERNAME }}
|
||||
password: ${{ secrets.ACR_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
echo "Building and pushing RAG service..."
|
||||
docker build \
|
||||
--no-cache \
|
||||
-f deployment/container/Dockerfile-rag \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_ORG }}/${{ env.SERVICE_NAME }}:${{ needs.build.outputs.environment }}-${{ needs.build.outputs.image_tag }} \
|
||||
rag/
|
||||
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_ORG }}/${{ env.SERVICE_NAME }}:${{ needs.build.outputs.environment }}-${{ needs.build.outputs.image_tag }}
|
||||
|
||||
echo "✅ Docker image pushed successfully"
|
||||
|
||||
update-manifest:
|
||||
name: Update Manifest Repository
|
||||
needs: [build, release]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set image tag environment variable
|
||||
run: |
|
||||
echo "IMAGE_TAG=${{ needs.build.outputs.image_tag }}" >> $GITHUB_ENV
|
||||
echo "ENVIRONMENT=${{ needs.build.outputs.environment }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Update Manifest Repository
|
||||
run: |
|
||||
# 매니페스트 레포지토리 클론
|
||||
REPO_URL=$(echo "https://github.com/hjmoons/hgzero-manifest.git" | sed 's|https://||')
|
||||
git clone https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_PASSWORD }}@${REPO_URL} manifest-repo
|
||||
cd manifest-repo
|
||||
|
||||
# Kustomize 설치
|
||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
||||
sudo mv kustomize /usr/local/bin/
|
||||
|
||||
# 매니페스트 업데이트
|
||||
cd hgzero-back/kustomize/overlays/${{ env.ENVIRONMENT }}
|
||||
|
||||
# RAG 서비스 이미지 태그 업데이트
|
||||
kustomize edit set image acrdigitalgarage02.azurecr.io/hgzero/rag:${{ env.ENVIRONMENT }}-${{ env.IMAGE_TAG }}
|
||||
|
||||
# Git 설정 및 푸시
|
||||
cd ../../../..
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git add .
|
||||
git commit -m "🚀 Update RAG ${{ env.ENVIRONMENT }} image to ${{ env.ENVIRONMENT }}-${{ env.IMAGE_TAG }}"
|
||||
git push origin main
|
||||
|
||||
echo "✅ 매니페스트 업데이트 완료. ArgoCD가 자동으로 배포합니다."
|
||||
+5
-1
@@ -57,4 +57,8 @@ claudedocs/*back*
|
||||
logs/
|
||||
**/logs/
|
||||
*.log
|
||||
**/*.log
|
||||
**/*.log
|
||||
|
||||
# Deprecated/Backup directories
|
||||
ai-java-back/
|
||||
ai/
|
||||
|
||||
Vendored
+215
@@ -0,0 +1,215 @@
|
||||
def PIPELINE_ID = "${env.BUILD_NUMBER}"
|
||||
|
||||
def getImageTag() {
|
||||
def dateFormat = new java.text.SimpleDateFormat('yyyyMMddHHmmss')
|
||||
def currentDate = new Date()
|
||||
return dateFormat.format(currentDate)
|
||||
}
|
||||
|
||||
podTemplate(
|
||||
label: "${PIPELINE_ID}",
|
||||
serviceAccount: 'jenkins',
|
||||
slaveConnectTimeout: 300,
|
||||
idleMinutes: 1,
|
||||
activeDeadlineSeconds: 3600,
|
||||
podRetention: never(),
|
||||
yaml: '''
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 3
|
||||
restartPolicy: Never
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: dedicated
|
||||
operator: Equal
|
||||
value: cicd
|
||||
''',
|
||||
containers: [
|
||||
containerTemplate(
|
||||
name: 'podman',
|
||||
image: "mgoltzsche/podman",
|
||||
ttyEnabled: true,
|
||||
command: 'cat',
|
||||
privileged: true,
|
||||
resourceRequestCpu: '500m',
|
||||
resourceRequestMemory: '2Gi',
|
||||
resourceLimitCpu: '2000m',
|
||||
resourceLimitMemory: '4Gi'
|
||||
),
|
||||
containerTemplate(
|
||||
name: 'gradle',
|
||||
image: 'gradle:jdk21',
|
||||
ttyEnabled: true,
|
||||
command: 'cat',
|
||||
resourceRequestCpu: '500m',
|
||||
resourceRequestMemory: '1Gi',
|
||||
resourceLimitCpu: '1000m',
|
||||
resourceLimitMemory: '2Gi',
|
||||
envVars: [
|
||||
envVar(key: 'DOCKER_HOST', value: 'unix:///run/podman/podman.sock'),
|
||||
envVar(key: 'TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE', value: '/run/podman/podman.sock'),
|
||||
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
||||
]
|
||||
),
|
||||
containerTemplate(
|
||||
name: 'git',
|
||||
image: 'alpine/git:latest',
|
||||
command: 'cat',
|
||||
ttyEnabled: true,
|
||||
resourceRequestCpu: '100m',
|
||||
resourceRequestMemory: '256Mi',
|
||||
resourceLimitCpu: '300m',
|
||||
resourceLimitMemory: '512Mi'
|
||||
)
|
||||
],
|
||||
volumes: [
|
||||
emptyDirVolume(mountPath: '/home/gradle/.gradle', memory: false),
|
||||
emptyDirVolume(mountPath: '/run/podman', memory: false)
|
||||
]
|
||||
) {
|
||||
node(PIPELINE_ID) {
|
||||
def imageTag = getImageTag()
|
||||
def environment = params.ENVIRONMENT ?: 'dev'
|
||||
def services = ['user', 'meeting', 'stt', 'notification']
|
||||
def registry = 'acrdigitalgarage02.azurecr.io'
|
||||
def imageOrg = 'hgzero'
|
||||
|
||||
try {
|
||||
stage("Get Source") {
|
||||
checkout scm
|
||||
|
||||
// 환경 변수 로드
|
||||
def configFile = ".github/config/deploy_env_vars_${environment}"
|
||||
if (fileExists(configFile)) {
|
||||
echo "📋 Loading environment variables for ${environment}..."
|
||||
def props = readProperties file: configFile
|
||||
echo "Config loaded: ${props}"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
container('gradle') {
|
||||
echo "🔨 Building with Gradle..."
|
||||
sh """
|
||||
chmod +x gradlew
|
||||
./gradlew build -x test
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive Artifacts') {
|
||||
echo "📦 Archiving build artifacts..."
|
||||
archiveArtifacts artifacts: '**/build/libs/*.jar', fingerprint: true
|
||||
}
|
||||
|
||||
stage('Build & Push Images') {
|
||||
timeout(time: 30, unit: 'MINUTES') {
|
||||
container('podman') {
|
||||
withCredentials([
|
||||
usernamePassword(
|
||||
credentialsId: 'acr-credentials',
|
||||
usernameVariable: 'ACR_USERNAME',
|
||||
passwordVariable: 'ACR_PASSWORD'
|
||||
),
|
||||
usernamePassword(
|
||||
credentialsId: 'dockerhub-credentials',
|
||||
usernameVariable: 'DOCKERHUB_USERNAME',
|
||||
passwordVariable: 'DOCKERHUB_PASSWORD'
|
||||
)
|
||||
]) {
|
||||
echo "🐳 Building and pushing Docker images..."
|
||||
|
||||
// Login to Docker Hub (prevent rate limit)
|
||||
sh "podman login docker.io --username \$DOCKERHUB_USERNAME --password \$DOCKERHUB_PASSWORD"
|
||||
|
||||
// Login to Azure Container Registry
|
||||
sh "podman login ${registry} --username \$ACR_USERNAME --password \$ACR_PASSWORD"
|
||||
|
||||
// Build and push each service
|
||||
services.each { service ->
|
||||
echo "Building ${service}..."
|
||||
|
||||
def imageTagFull = "${registry}/${imageOrg}/${service}:${environment}-${imageTag}"
|
||||
|
||||
sh """
|
||||
podman build \\
|
||||
--build-arg BUILD_LIB_DIR="${service}/build/libs" \\
|
||||
--build-arg ARTIFACTORY_FILE="${service}.jar" \\
|
||||
-f deployment/container/Dockerfile-backend \\
|
||||
-t ${imageTagFull} .
|
||||
"""
|
||||
|
||||
echo "Pushing ${service}..."
|
||||
sh "podman push ${imageTagFull}"
|
||||
|
||||
echo "✅ ${service} image pushed: ${imageTagFull}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Update Manifest Repository') {
|
||||
container('git') {
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: 'github-credentials-dg0506',
|
||||
usernameVariable: 'GIT_USERNAME',
|
||||
passwordVariable: 'GIT_TOKEN'
|
||||
)]) {
|
||||
echo "📝 Updating manifest repository..."
|
||||
|
||||
sh """
|
||||
# 매니페스트 레포지토리 클론
|
||||
REPO_URL=\$(echo "https://github.com/hjmoons/hgzero-manifest.git" | sed 's|https://||')
|
||||
git clone https://\${GIT_USERNAME}:\${GIT_TOKEN}@\${REPO_URL} manifest-repo
|
||||
cd manifest-repo
|
||||
|
||||
# 각 서비스별 이미지 태그 업데이트 (sed 사용)
|
||||
cd hgzero-back/kustomize/base
|
||||
|
||||
services="user meeting stt notification"
|
||||
for service in \$services; do
|
||||
echo "Updating \$service image tag..."
|
||||
sed -i "s|image: ${registry}/${imageOrg}/\$service:.*|image: ${registry}/${imageOrg}/\$service:${environment}-${imageTag}|g" \\
|
||||
\$service/deployment.yaml
|
||||
|
||||
# 변경 사항 확인
|
||||
echo "Updated \$service deployment.yaml:"
|
||||
grep "image: ${registry}/${imageOrg}/\$service" \$service/deployment.yaml
|
||||
done
|
||||
|
||||
# Git 설정 및 푸시
|
||||
cd ../../..
|
||||
git config user.name "Jenkins"
|
||||
git config user.email "jenkins@hgzero.com"
|
||||
git add .
|
||||
git commit -m "🚀 Update hgzero ${environment} images to ${environment}-${imageTag}"
|
||||
git push origin main
|
||||
|
||||
echo "✅ 매니페스트 업데이트 완료. ArgoCD가 자동으로 배포합니다."
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Pipeline Complete') {
|
||||
echo "🧹 Pipeline completed. Pod cleanup handled by Jenkins Kubernetes Plugin."
|
||||
|
||||
if (currentBuild.result == null || currentBuild.result == 'SUCCESS') {
|
||||
echo "✅ Pipeline completed successfully!"
|
||||
echo "Environment: ${environment}"
|
||||
echo "Image Tag: ${imageTag}"
|
||||
} else {
|
||||
echo "❌ Pipeline failed with result: ${currentBuild.result}"
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
echo "❌ Pipeline failed with exception: ${e.getMessage()}"
|
||||
throw e
|
||||
} finally {
|
||||
echo "🧹 Cleaning up resources and preparing for pod termination..."
|
||||
echo "Pod will be terminated in 3 seconds due to terminationGracePeriodSeconds: 3"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
# HGZero - AI 기반 회의록 작성 및 이력 관리 개선 서비스
|
||||
|
||||
## 1. 소개
|
||||
HGZero는 업무지식이 부족한 회의록 작성자도 누락 없이 정확하게 회의록을 작성하여 공유할 수 있는 AI 기반 서비스입니다.
|
||||
사용자는 실시간 음성 변환(STT), AI 요약, 용어 설명, Todo 자동 추출 등의 기능을 통해 회의록 작성 업무를 효율적으로 수행할 수 있습니다.
|
||||
|
||||
### 1.1 핵심 기능
|
||||
- **실시간 STT**: Azure Speech Services 기반 실시간 음성-텍스트 변환
|
||||
- **AI 요약**: 안건별 2-3문장 자동 요약 (GPT-4o, 2-5초 처리)
|
||||
- **맥락 기반 용어 설명**: 관련 회의록과 업무이력 기반 실용 정보 제공
|
||||
- **Todo 자동 추출**: 회의록에서 액션 아이템 자동 추출 및 배정
|
||||
- **지능형 회의 진행 지원**: 회의 패턴 분석, 안건 추천, 효율성 분석
|
||||
- **실시간 협업**: WebSocket 기반 실시간 회의록 편집 및 동기화
|
||||
|
||||
### 1.2 MVP 산출물
|
||||
- **발표자료**: {발표자료 링크}
|
||||
- **설계결과**:
|
||||
- [유저스토리](design/userstory.md)
|
||||
- [논리 아키텍처](design/backend/logical/logical-architecture.md)
|
||||
- [API 설계서](design/backend/api/API설계서.md)
|
||||
- **Git Repo**:
|
||||
- **메인**: https://gitea.cbiz.kubepia.net/shared-dg05-coffeeQuokka/hgzero.git
|
||||
- **프론트엔드**: {프론트엔드 Repository 링크}
|
||||
- **manifest**: {Manifest Repository 링크}
|
||||
- **시연 동영상**: {시연 동영상 링크}
|
||||
|
||||
## 2. 시스템 아키텍처
|
||||
|
||||
### 2.1 전체 구조
|
||||
마이크로서비스 아키텍처 기반 클라우드 네이티브 애플리케이션
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Frontend │
|
||||
│ React 18 + TypeScript │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ NGINX Ingress │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
┌─────────────────────┼─────────────────────┐
|
||||
│ │ │
|
||||
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
||||
│ User Service │ │Meeting Service│ │ STT Service │
|
||||
│ (Java) │ │ (Java) │ │ (Java) │
|
||||
│ :8081 │ │ :8081/:8082 │ │ :8083 │
|
||||
└───────────────┘ └───────────────┘ └───────────────┘
|
||||
│ │ │
|
||||
│ │ │
|
||||
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
||||
│ AI Service │ │ RAG Service │ │Notification │
|
||||
│ (Java) │ │ (Python) │ │ (Java) │
|
||||
│ :8083 │ │ :8000 │ │ :8084 │
|
||||
└───────────────┘ └───────────────┘ └───────────────┘
|
||||
│ │
|
||||
└───────────────────┤
|
||||
│
|
||||
┌───────────────────┐
|
||||
│ Event Hub │
|
||||
│ (Pub/Sub MQ) │
|
||||
└───────────────────┘
|
||||
│
|
||||
┌─────────┼─────────┐
|
||||
│ │ │
|
||||
┌──────────┐ ┌────────┐ ┌─────────────┐
|
||||
│PostgreSQL│ │ Redis │ │ OpenAI │
|
||||
│ (6 DB) │ │ Cache │ │ │
|
||||
└──────────┘ └────────┘ └─────────────┘
|
||||
```
|
||||
|
||||
### 2.2 마이크로서비스 구성
|
||||
- **User 서비스**: 사용자 인증 (LDAP, JWT) 및 프로필 관리
|
||||
- **Meeting 서비스**: 회의/회의록/Todo 통합 관리, 실시간 동기화 (WebSocket)
|
||||
- **STT 서비스**: 음성 스트리밍, 실시간 STT 변환 (Azure Speech Services)
|
||||
- **AI 서비스**: 회의록 자동요약, Todo 추출, 안건별 AI 요약
|
||||
- **RAG 서비스**: 용어집 검색, 관련자료 검색, 회의록 유사도 검색 (Python/FastAPI)
|
||||
- **Notification 서비스**: 이메일 알림 (회의 시작, 회의록 확정, Todo 배정)
|
||||
|
||||
### 2.3 기술 스택
|
||||
- **프론트엔드**: React 18, TypeScript, React Context API
|
||||
- **백엔드**: Spring Boot 3.2.x, Java 17, FastAPI, Python 3.11+
|
||||
- **인프라**: Azure Kubernetes Service (AKS), Azure Container Registry (ACR)
|
||||
- **CI/CD**: GitHub Actions (CI), ArgoCD (CD - GitOps)
|
||||
- **모니터링**: Prometheus, Grafana, Spring Boot Actuator
|
||||
- **백킹 서비스**:
|
||||
- **Database**: PostgreSQL 15 (Database per Service - 6개 독립 DB)
|
||||
- **Message Queue**: Azure Event Hub (AMQP over TLS)
|
||||
- **Cache**: Azure Redis Cache (Redis 7.x)
|
||||
- **AI/ML**: Azure OpenAI (GPT-4o, text-embedding-3-large), Azure Speech Services, Azure AI Search
|
||||
|
||||
## 3. 백킹 서비스 설치
|
||||
|
||||
### 3.1 Database 설치
|
||||
PostgreSQL 15 설치 (각 서비스별 독립 데이터베이스)
|
||||
|
||||
```bash
|
||||
# Helm 저장소 추가
|
||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
helm repo update
|
||||
|
||||
# User 서비스용 DB
|
||||
helm install hgzero-user bitnami/postgresql \
|
||||
--set global.postgresql.auth.postgresPassword=Passw0rd \
|
||||
--set global.postgresql.auth.username=hgzerouser \
|
||||
--set global.postgresql.auth.password=Passw0rd \
|
||||
--set global.postgresql.auth.database=userdb \
|
||||
--namespace hgzero
|
||||
|
||||
# Meeting 서비스용 DB
|
||||
helm install hgzero-meeting bitnami/postgresql \
|
||||
--set global.postgresql.auth.postgresPassword=Passw0rd \
|
||||
--set global.postgresql.auth.username=hgzerouser \
|
||||
--set global.postgresql.auth.password=Passw0rd \
|
||||
--set global.postgresql.auth.database=meetingdb \
|
||||
--namespace hgzero
|
||||
|
||||
# STT 서비스용 DB
|
||||
helm install hgzero-stt bitnami/postgresql \
|
||||
--set global.postgresql.auth.postgresPassword=Passw0rd \
|
||||
--set global.postgresql.auth.username=hgzerouser \
|
||||
--set global.postgresql.auth.password=Passw0rd \
|
||||
--set global.postgresql.auth.database=sttdb \
|
||||
--namespace hgzero
|
||||
|
||||
# AI 서비스용 DB
|
||||
helm install hgzero-ai bitnami/postgresql \
|
||||
--set global.postgresql.auth.postgresPassword=Passw0rd \
|
||||
--set global.postgresql.auth.username=hgzerouser \
|
||||
--set global.postgresql.auth.password=Passw0rd \
|
||||
--set global.postgresql.auth.database=aidb \
|
||||
--namespace hgzero
|
||||
|
||||
# RAG 서비스용 DB
|
||||
helm install hgzero-rag bitnami/postgresql \
|
||||
--set global.postgresql.auth.postgresPassword=Passw0rd \
|
||||
--set global.postgresql.auth.username=hgzerouser \
|
||||
--set global.postgresql.auth.password=Passw0rd \
|
||||
--set global.postgresql.auth.database=ragdb \
|
||||
--namespace hgzero
|
||||
|
||||
# Notification 서비스용 DB
|
||||
helm install hgzero-notification bitnami/postgresql \
|
||||
--set global.postgresql.auth.postgresPassword=Passw0rd \
|
||||
--set global.postgresql.auth.username=hgzerouser \
|
||||
--set global.postgresql.auth.password=Passw0rd \
|
||||
--set global.postgresql.auth.database=notificationdb \
|
||||
--namespace hgzero
|
||||
```
|
||||
|
||||
**접속 정보 확인**:
|
||||
```bash
|
||||
# 각 서비스별 DB 접속 정보
|
||||
# User DB: hgzero-user-postgresql.hgzero.svc.cluster.local:5432
|
||||
# Meeting DB: hgzero-meeting-postgresql.hgzero.svc.cluster.local:5432
|
||||
# STT DB: hgzero-stt-postgresql.hgzero.svc.cluster.local:5432
|
||||
# AI DB: hgzero-ai-postgresql.hgzero.svc.cluster.local:5432
|
||||
# RAG DB: hgzero-rag-postgresql.hgzero.svc.cluster.local:5432
|
||||
# Notification DB: hgzero-notification-postgresql.hgzero.svc.cluster.local:5432
|
||||
```
|
||||
|
||||
### 3.2 Cache 설치
|
||||
Redis 설치
|
||||
|
||||
```bash
|
||||
# Helm으로 Redis 설치
|
||||
helm install hgzero-redis bitnami/redis \
|
||||
--set auth.password=Passw0rd \
|
||||
--set master.persistence.enabled=true \
|
||||
--set master.persistence.size=8Gi \
|
||||
--namespace hgzero
|
||||
|
||||
# 접속 정보 확인
|
||||
export REDIS_PASSWORD=$(kubectl get secret --namespace hgzero hgzero-redis -o jsonpath="{.data.redis-password}" | base64 -d)
|
||||
echo "Redis Password: $REDIS_PASSWORD"
|
||||
echo "Redis Host: hgzero-redis-master.hgzero.svc.cluster.local"
|
||||
echo "Redis Port: 6379"
|
||||
```
|
||||
|
||||
**Azure Redis Cache 사용 (프로덕션)**:
|
||||
```bash
|
||||
# Azure Portal에서 Redis Cache 생성 후 연결 정보 사용
|
||||
# 또는 Azure CLI 사용
|
||||
az redis create \
|
||||
--name hgzero-redis \
|
||||
--resource-group your-resource-group \
|
||||
--location koreacentral \
|
||||
--sku Basic \
|
||||
--vm-size c0
|
||||
```
|
||||
|
||||
### 3.3 Message Queue 설치
|
||||
Azure Event Hub 설정
|
||||
|
||||
```bash
|
||||
# Azure CLI를 통한 Event Hub 생성
|
||||
az eventhubs namespace create \
|
||||
--name hgzero-eventhub-ns \
|
||||
--resource-group your-resource-group \
|
||||
--location koreacentral \
|
||||
--sku Standard
|
||||
|
||||
az eventhubs eventhub create \
|
||||
--name hgzero-events \
|
||||
--namespace-name hgzero-eventhub-ns \
|
||||
--resource-group your-resource-group \
|
||||
--partition-count 4 \
|
||||
--message-retention 7
|
||||
|
||||
# 연결 문자열 확인
|
||||
az eventhubs namespace authorization-rule keys list \
|
||||
--resource-group your-resource-group \
|
||||
--namespace-name hgzero-eventhub-ns \
|
||||
--name RootManageSharedAccessKey \
|
||||
--query primaryConnectionString \
|
||||
--output tsv
|
||||
```
|
||||
## 4. 빌드 및 배포
|
||||
|
||||
### 4.1 프론트엔드 빌드 및 배포
|
||||
|
||||
#### 1. 애플리케이션 빌드
|
||||
```bash
|
||||
cd frontend
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
#### 2. 컨테이너 이미지 빌드
|
||||
```bash
|
||||
docker build \
|
||||
--build-arg REACT_APP_API_URL="http://api.hgzero.com" \
|
||||
--build-arg REACT_APP_WS_URL="ws://api.hgzero.com/ws" \
|
||||
-f deployment/container/Dockerfile-frontend \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/frontend:latest .
|
||||
```
|
||||
|
||||
#### 3. 이미지 푸시
|
||||
```bash
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/frontend:latest
|
||||
```
|
||||
|
||||
#### 4. Kubernetes 배포
|
||||
```bash
|
||||
kubectl apply -f deployment/k8s/frontend/frontend-deployment.yaml -n hgzero
|
||||
```
|
||||
|
||||
### 4.2 백엔드 빌드 및 배포
|
||||
|
||||
#### 1. 애플리케이션 빌드
|
||||
```bash
|
||||
# 전체 프로젝트 빌드
|
||||
./gradlew clean build -x test
|
||||
|
||||
# 또는 개별 서비스 빌드
|
||||
./gradlew :user:clean :user:build -x test
|
||||
./gradlew :meeting:clean :meeting:build -x test
|
||||
./gradlew :stt:clean :stt:build -x test
|
||||
./gradlew :ai:clean :ai:build -x test
|
||||
./gradlew :notification:clean :notification:build -x test
|
||||
```
|
||||
|
||||
#### 2. 컨테이너 이미지 빌드 (각 서비스별로 수행)
|
||||
```bash
|
||||
# User 서비스
|
||||
docker build \
|
||||
--build-arg BUILD_LIB_DIR="user/build/libs" \
|
||||
--build-arg ARTIFACTORY_FILE="user.jar" \
|
||||
-f deployment/container/Dockerfile-user \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/user-service:latest .
|
||||
|
||||
# Meeting 서비스
|
||||
docker build \
|
||||
--build-arg BUILD_LIB_DIR="meeting/build/libs" \
|
||||
--build-arg ARTIFACTORY_FILE="meeting.jar" \
|
||||
-f deployment/container/Dockerfile-meeting \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/meeting-service:latest .
|
||||
|
||||
# STT 서비스
|
||||
docker build \
|
||||
--build-arg BUILD_LIB_DIR="stt/build/libs" \
|
||||
--build-arg ARTIFACTORY_FILE="stt.jar" \
|
||||
-f deployment/container/Dockerfile-stt \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/stt-service:latest .
|
||||
|
||||
# AI 서비스
|
||||
docker build \
|
||||
--build-arg BUILD_LIB_DIR="ai/build/libs" \
|
||||
--build-arg ARTIFACTORY_FILE="ai.jar" \
|
||||
-f deployment/container/Dockerfile-ai \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/ai-service:latest .
|
||||
|
||||
# Notification 서비스
|
||||
docker build \
|
||||
--build-arg BUILD_LIB_DIR="notification/build/libs" \
|
||||
--build-arg ARTIFACTORY_FILE="notification.jar" \
|
||||
-f deployment/container/Dockerfile-notification \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/notification-service:latest .
|
||||
```
|
||||
|
||||
#### 3. RAG 서비스 빌드 (Python)
|
||||
```bash
|
||||
docker build \
|
||||
-f deployment/container/Dockerfile-rag \
|
||||
-t acrdigitalgarage02.azurecr.io/hgzero/rag-service:latest \
|
||||
./rag
|
||||
```
|
||||
|
||||
#### 4. 이미지 푸시
|
||||
```bash
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/user-service:latest
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/meeting-service:latest
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/stt-service:latest
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/ai-service:latest
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/rag-service:latest
|
||||
docker push acrdigitalgarage02.azurecr.io/hgzero/notification-service:latest
|
||||
```
|
||||
|
||||
#### 5. Kubernetes 배포
|
||||
```bash
|
||||
# Namespace 생성
|
||||
kubectl create namespace hgzero
|
||||
|
||||
# Secret 생성 (환경 변수)
|
||||
kubectl apply -f deployment/k8s/backend/secrets/ -n hgzero
|
||||
|
||||
# 서비스 배포
|
||||
kubectl apply -f deployment/k8s/backend/user-service.yaml -n hgzero
|
||||
kubectl apply -f deployment/k8s/backend/meeting-service.yaml -n hgzero
|
||||
kubectl apply -f deployment/k8s/backend/stt-service.yaml -n hgzero
|
||||
kubectl apply -f deployment/k8s/backend/ai-service.yaml -n hgzero
|
||||
kubectl apply -f deployment/k8s/backend/rag-service.yaml -n hgzero
|
||||
kubectl apply -f deployment/k8s/backend/notification-service.yaml -n hgzero
|
||||
|
||||
# Ingress 설정
|
||||
kubectl apply -f deployment/k8s/ingress.yaml -n hgzero
|
||||
```
|
||||
|
||||
### 4.3 테스트
|
||||
|
||||
#### 1) 프론트엔드 페이지 주소 구하기
|
||||
```bash
|
||||
# Namespace 설정
|
||||
kubens hgzero
|
||||
|
||||
# Service 확인
|
||||
kubectl get svc
|
||||
|
||||
# Ingress 확인
|
||||
kubectl get ingress
|
||||
```
|
||||
|
||||
#### 2) API 테스트
|
||||
|
||||
**Swagger UI 접근**:
|
||||
- User Service: http://{INGRESS_URL}/user/swagger-ui.html
|
||||
- Meeting Service: http://{INGRESS_URL}/meeting/swagger-ui.html
|
||||
- STT Service: http://{INGRESS_URL}/stt/swagger-ui.html
|
||||
- AI Service: http://{INGRESS_URL}/ai/swagger-ui.html
|
||||
- RAG Service: http://{INGRESS_URL}/rag/docs
|
||||
- Notification Service: http://{INGRESS_URL}/notification/swagger-ui.html
|
||||
|
||||
#### 3) 로그인 테스트
|
||||
- ID: user-005, user2@example.com
|
||||
- PW: 8자리
|
||||
|
||||
## 5. 팀
|
||||
|
||||
- 유동희 "야보" - Product Owner
|
||||
- 조민서 "다람지" - AI Specialist
|
||||
- 김주환 "블랙" - Architect
|
||||
- 김종희 "페퍼" - Frontend Developer
|
||||
- 문효종 "카누" - Frontend Developer / DevOps Engineer
|
||||
- 전대웅 "맥심" - Backend Developer
|
||||
- 조윤진 "쿼카" - Backend Developer
|
||||
|
||||
+5
@@ -25,6 +25,11 @@ public class TranscriptSegmentReadyEvent {
|
||||
*/
|
||||
private String meetingId;
|
||||
|
||||
/**
|
||||
* 세션 ID
|
||||
*/
|
||||
private String sessionId;
|
||||
|
||||
/**
|
||||
* 변환 텍스트 세그먼트 ID
|
||||
*/
|
||||
@@ -248,3 +248,53 @@ A: 네, 각 클라이언트는 독립적으로 SSE 연결을 유지합니다.
|
||||
|
||||
**Q: 제안사항이 오지 않으면?**
|
||||
A: Redis에 충분한 텍스트(10개 세그먼트)가 축적되어야 분석이 시작됩니다. 5초마다 체크합니다.
|
||||
|
||||
### 3. AI 텍스트 요약 생성
|
||||
|
||||
**엔드포인트**: `POST /api/v1/ai/summary/generate`
|
||||
|
||||
**설명**: 텍스트를 AI로 요약하여 핵심 내용과 포인트를 추출합니다.
|
||||
|
||||
**요청 본문**:
|
||||
```json
|
||||
{
|
||||
"text": "요약할 텍스트 내용",
|
||||
"language": "ko", // ko: 한국어, en: 영어 (기본값: ko)
|
||||
"style": "bullet", // bullet: 불릿포인트, paragraph: 단락형 (기본값: bullet)
|
||||
"max_length": 100 // 최대 요약 길이 (단어 수) - 선택사항
|
||||
}
|
||||
```
|
||||
|
||||
**응답 예시**:
|
||||
```json
|
||||
{
|
||||
"summary": "• 프로젝트 총 개발 기간 3개월 확정 (디자인 2주, 개발 8주, 테스트 2주)\n• 총 예산 5천만원 배정 (인건비 3천만원, 인프라 1천만원, 기타 1천만원)\n• 주간 회의 일정: 매주 화요일 오전 10시",
|
||||
"key_points": [
|
||||
"프로젝트 전체 일정 3개월로 확정",
|
||||
"개발 단계별 기간: 디자인 2주, 개발 8주, 테스트 2주",
|
||||
"총 예산 5천만원 책정",
|
||||
"예산 배분: 인건비 60%, 인프라 20%, 기타 20%",
|
||||
"정기 회의: 매주 화요일 오전 10시"
|
||||
],
|
||||
"word_count": 32,
|
||||
"original_word_count": 46,
|
||||
"compression_ratio": 0.7,
|
||||
"generated_at": "2025-10-29T17:23:49.429982"
|
||||
}
|
||||
```
|
||||
|
||||
**요청 예시 (curl)**:
|
||||
```bash
|
||||
curl -X POST "http://localhost:8087/api/v1/ai/summary/generate" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"text": "오늘 회의에서는 프로젝트 일정과 예산에 대해 논의했습니다...",
|
||||
"language": "ko",
|
||||
"style": "bullet"
|
||||
}'
|
||||
```
|
||||
|
||||
**에러 응답**:
|
||||
- `400 Bad Request`: 텍스트가 비어있거나 너무 짧은 경우 (최소 20자)
|
||||
- `400 Bad Request`: 텍스트가 너무 긴 경우 (최대 10,000자)
|
||||
- `500 Internal Server Error`: AI 처리 중 오류 발생
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user