물리아키텍처 설계 완료
✨ 주요 기능 - Azure 기반 물리아키텍처 설계 (개발환경/운영환경) - 7개 마이크로서비스 물리 구조 설계 - 네트워크 아키텍처 다이어그램 작성 (Mermaid) - 환경별 비교 분석 및 마스터 인덱스 문서 📁 생성 파일 - design/backend/physical/physical-architecture.md (마스터) - design/backend/physical/physical-architecture-dev.md (개발환경) - design/backend/physical/physical-architecture-prod.md (운영환경) - design/backend/physical/*.mmd (4개 Mermaid 다이어그램) 🎯 핵심 성과 - 비용 최적화: 개발환경 월 $143, 운영환경 월 $2,860 - 확장성: 개발환경 100명 → 운영환경 10,000명 (100배) - 가용성: 개발환경 95% → 운영환경 99.9% - 보안: 다층 보안 아키텍처 (L1~L4) 🛠️ 기술 스택 - Azure Kubernetes Service (AKS) - Azure Database for PostgreSQL Flexible - Azure Cache for Redis Premium - Azure Service Bus Premium - Application Gateway + WAF 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
# Mermaid Syntax Checker using Docker Container
|
||||
# Similar to PlantUML checker - keeps container running for better performance
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[string]$FilePath
|
||||
)
|
||||
|
||||
# Check if file exists
|
||||
if (-not (Test-Path $FilePath)) {
|
||||
Write-Host "Error: File not found: $FilePath" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get absolute path
|
||||
$absolutePath = (Resolve-Path $FilePath).Path
|
||||
$fileName = Split-Path $absolutePath -Leaf
|
||||
|
||||
Write-Host "`nChecking Mermaid syntax for: $fileName" -ForegroundColor Cyan
|
||||
Write-Host ("=" * 60) -ForegroundColor Gray
|
||||
|
||||
# Check if mermaid container is running
|
||||
$containerRunning = docker ps --filter "name=mermaid-cli" --format "{{.Names}}" 2>$null
|
||||
|
||||
if (-not $containerRunning) {
|
||||
Write-Host "Error: Mermaid CLI container is not running." -ForegroundColor Red
|
||||
Write-Host "Please follow the setup instructions in the Mermaid guide to start the container." -ForegroundColor Yellow
|
||||
Write-Host "`nQuick setup commands:" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "# 1. Start container with root privileges (port 48080)" -ForegroundColor Green
|
||||
Write-Host "docker run -d --rm --name mermaid-cli -u root -p 48080:8080 --entrypoint sh minlag/mermaid-cli:latest -c `"while true;do sleep 3600; done`"" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "# 2. Install Chromium and dependencies" -ForegroundColor Green
|
||||
Write-Host "docker exec mermaid-cli sh -c `"apk add --no-cache chromium chromium-chromedriver nss freetype harfbuzz ca-certificates ttf-freefont`"" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "# 3. Create Puppeteer configuration" -ForegroundColor Green
|
||||
Write-Host "docker exec mermaid-cli sh -c `"echo '{```"executablePath```": ```"/usr/bin/chromium-browser```", ```"args```": [```"--no-sandbox```", ```"--disable-setuid-sandbox```", ```"--disable-dev-shm-usage```"]}' > /tmp/puppeteer-config.json`"" -ForegroundColor White
|
||||
Write-Host ""
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Set Puppeteer configuration file path
|
||||
$puppeteerConfigFile = "/tmp/puppeteer-config.json"
|
||||
|
||||
# Generate unique temp filename
|
||||
$timestamp = Get-Date -Format "yyyyMMddHHmmss"
|
||||
$processId = $PID
|
||||
$tempFile = "/tmp/mermaid_${timestamp}_${processId}.mmd"
|
||||
$outputFile = "/tmp/mermaid_${timestamp}_${processId}.svg"
|
||||
|
||||
try {
|
||||
# Copy file to container
|
||||
Write-Host "Copying file to container..." -ForegroundColor Gray
|
||||
docker cp "$absolutePath" "mermaid-cli:$tempFile" 2>&1 | Out-Null
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Error: Failed to copy file to container" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Run syntax check with Puppeteer configuration
|
||||
Write-Host "Running syntax check..." -ForegroundColor Gray
|
||||
$output = docker exec mermaid-cli sh -c "cd /home/mermaidcli && node_modules/.bin/mmdc -i '$tempFile' -o '$outputFile' -p '$puppeteerConfigFile' -q" 2>&1
|
||||
$exitCode = $LASTEXITCODE
|
||||
|
||||
if ($exitCode -eq 0) {
|
||||
Write-Host "`nSuccess: Mermaid syntax is valid!" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "`nError: Mermaid syntax validation failed!" -ForegroundColor Red
|
||||
Write-Host "`nError details:" -ForegroundColor Red
|
||||
|
||||
# Parse and display error messages
|
||||
$errorLines = $output -split "`n"
|
||||
foreach ($line in $errorLines) {
|
||||
if ($line -match "Error:|Parse error|Expecting|Syntax error") {
|
||||
Write-Host " $line" -ForegroundColor Red
|
||||
} elseif ($line -match "line \d+|at line") {
|
||||
Write-Host " $line" -ForegroundColor Yellow
|
||||
} elseif ($line.Trim() -ne "") {
|
||||
Write-Host " $line" -ForegroundColor DarkRed
|
||||
}
|
||||
}
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
} finally {
|
||||
# Clean up temp files
|
||||
Write-Host "`nCleaning up..." -ForegroundColor Gray
|
||||
docker exec mermaid-cli rm -f "$tempFile" "$outputFile" 2>&1 | Out-Null
|
||||
}
|
||||
|
||||
Write-Host "`nValidation complete!" -ForegroundColor Cyan
|
||||
|
||||
# Note: Container is kept running for subsequent checks
|
||||
# To stop: docker stop mermaid-cli && docker rm mermaid-cli
|
||||
@@ -0,0 +1,66 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$FilePath = "C:\home\workspace\tripgen\design\backend\system\azure-physical-architecture.txt"
|
||||
)
|
||||
|
||||
Write-Host "=== PlantUML Syntax Checker ===" -ForegroundColor Cyan
|
||||
Write-Host "Target file: $FilePath" -ForegroundColor Yellow
|
||||
|
||||
# Check if file exists
|
||||
if (-not (Test-Path $FilePath)) {
|
||||
Write-Host "❌ File not found: $FilePath" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Execute directly in PowerShell
|
||||
$timestamp = Get-Date -Format 'yyyyMMddHHmmss'
|
||||
$tempFile = "/tmp/puml_$timestamp.puml"
|
||||
|
||||
# Copy file
|
||||
Write-Host "`n1. Copying file..." -ForegroundColor Gray
|
||||
Write-Host " Temporary file: $tempFile"
|
||||
docker cp $FilePath "plantuml:$tempFile"
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "❌ File copy failed" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host " ✅ Copy completed" -ForegroundColor Green
|
||||
|
||||
# Find JAR file path
|
||||
Write-Host "`n2. Looking for PlantUML JAR file..." -ForegroundColor Gray
|
||||
$JAR_PATH = docker exec plantuml sh -c "find / -name 'plantuml*.jar' 2>/dev/null | head -1"
|
||||
Write-Host " JAR path: $JAR_PATH"
|
||||
Write-Host " ✅ JAR file confirmed" -ForegroundColor Green
|
||||
|
||||
# Syntax check
|
||||
Write-Host "`n3. Running syntax check..." -ForegroundColor Gray
|
||||
$syntaxOutput = docker exec plantuml sh -c "java -jar $JAR_PATH -checkonly $tempFile 2>&1"
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "`n✅ Syntax check passed!" -ForegroundColor Green
|
||||
Write-Host " No syntax errors found in the diagram." -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "`n❌ Syntax errors detected!" -ForegroundColor Red
|
||||
Write-Host "Error details:" -ForegroundColor Red
|
||||
Write-Host $syntaxOutput -ForegroundColor Yellow
|
||||
|
||||
# Detailed error check
|
||||
Write-Host "`nAnalyzing detailed errors..." -ForegroundColor Yellow
|
||||
$detailError = docker exec plantuml sh -c "java -jar $JAR_PATH -failfast -v $tempFile 2>&1"
|
||||
$errorLines = $detailError | Select-String "Error line"
|
||||
|
||||
if ($errorLines) {
|
||||
Write-Host "`n📍 Error locations:" -ForegroundColor Magenta
|
||||
$errorLines | ForEach-Object {
|
||||
Write-Host " $($_.Line)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Clean up temporary file
|
||||
Write-Host "`n4. Cleaning up temporary files..." -ForegroundColor Gray
|
||||
docker exec plantuml sh -c "rm -f $tempFile" 2>$null
|
||||
Write-Host " ✅ Cleanup completed" -ForegroundColor Green
|
||||
|
||||
Write-Host "`n=== Check completed ===" -ForegroundColor Cyan
|
||||
Reference in New Issue
Block a user