From aa89057bece699461b4779a92f2eb41248f95d5b Mon Sep 17 00:00:00 2001 From: jungwoo choi Date: Sun, 28 Sep 2025 22:27:03 +0900 Subject: [PATCH] docs: Update README.md with current deployment configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add hybrid deployment port configuration (Docker + K8s) - Update service architecture to reflect current setup - Document Docker Hub deployment process - Clarify infrastructure vs application service separation - Add health check endpoints for both deployment modes ๐Ÿค– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 124 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 100 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1a47d9b..0d3aad5 100644 --- a/README.md +++ b/README.md @@ -33,21 +33,48 @@ Site11์€ ๋‹ค๊ตญ์–ด ๋‰ด์Šค ์ฝ˜ํ…์ธ ๋ฅผ ์ž๋™์œผ๋กœ ์ˆ˜์ง‘, ๋ฒˆ์—ญ, ์ƒ์„ฑํ•˜ - **OS**: Linux, macOS, Windows with WSL2 ### ํฌํŠธ ์‚ฌ์šฉ + +#### ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋ฐฐํฌ ํฌํŠธ ๊ตฌ์„ฑ (ํ˜„์žฌ ๊ตฌ์„ฑ) +``` +[ Docker Compose - ์ธํ”„๋ผ ์„œ๋น„์Šค ] +- 27017: MongoDB (๋‚ด๋ถ€) +- 6379: Redis (๋‚ด๋ถ€) +- 9092: Kafka (๋‚ด๋ถ€) +- 2181: Zookeeper (๋‚ด๋ถ€) +- 5555: Docker Registry (๋‚ด๋ถ€) +- 8099: Pipeline Scheduler +- 8100: Pipeline Monitor + +[ Kubernetes - ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค (NodePort) ] +- 30080: Console Frontend (โ†’ 8080) +- 30800: Console Backend API Gateway (โ†’ 8000) +- 30801-30802: Images Service (โ†’ 8001-8002) +- 30803-30804: OAuth Service (โ†’ 8003-8004) +- 30805-30806: Applications Service (โ†’ 8005-8006) +- 30807-30808: Users Service (โ†’ 8007-8008) +- 30809-30810: Data Service (โ†’ 8009-8010) +- 30811-30812: Statistics Service (โ†’ 8011-8012) + +[ Pipeline Workers (K8s ๋‚ด๋ถ€) ] +- RSS Collector +- Google Search +- Translator +- AI Article Generator +- Image Generator +``` + +#### ํ‘œ์ค€ Docker Compose ํฌํŠธ ๊ตฌ์„ฑ (์ „์ฒด Docker ๋ชจ๋“œ) ``` - 3000: Console Frontend -- 8011: Console Backend (API Gateway) -- 8012: Users Backend -- 8013: Notifications Backend -- 8014: OAuth Backend -- 8015: Images Backend -- 8016: Google Search Backend -- 8017: RSS Feed Backend -- 8018: News Aggregator Backend -- 8019: AI Writer Backend +- 8000: Console Backend (API Gateway) +- 8001-8002: Images Service +- 8003-8004: OAuth Service +- 8005-8006: Applications Service +- 8007-8008: Users Service +- 8009-8010: Data Service +- 8011-8012: Statistics Service +- 8099: Pipeline Scheduler - 8100: Pipeline Monitor -- 8983: Solr Search Engine -- 9000: MinIO Object Storage -- 9001: MinIO Console - 27017: MongoDB (๋‚ด๋ถ€) - 6379: Redis (๋‚ด๋ถ€) - 9092: Kafka (๋‚ด๋ถ€) @@ -92,18 +119,40 @@ docker-compose logs -f ``` ### 4. ์„œ๋น„์Šค ํ™•์ธ + +#### ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋ฐฐํฌ ํ™•์ธ (ํ˜„์žฌ ๊ตฌ์„ฑ) ```bash +# Console Frontend ์ ‘์† (K8s NodePort) +open http://localhost:30080 + +# Console API ํ—ฌ์Šค ์ฒดํฌ (K8s NodePort) +curl http://localhost:30800/health +curl http://localhost:30800/api/health + +# Pipeline ๋ชจ๋‹ˆํ„ฐ ํ™•์ธ (Docker) +curl http://localhost:8100/health + +# MongoDB ์—ฐ๊ฒฐ ํ™•์ธ (Docker) +docker exec -it site11_mongodb mongosh --eval "db.serverStatus()" + +# K8s Pod ์ƒํƒœ ํ™•์ธ +kubectl -n site11-pipeline get pods +kubectl -n site11-pipeline get services +``` + +#### ํ‘œ์ค€ Docker ํ™•์ธ +```bash +# Console Frontend ์ ‘์† +open http://localhost:3000 + # Console API ํ—ฌ์Šค ์ฒดํฌ -curl http://localhost:8011/health +curl http://localhost:8000/health # MongoDB ์—ฐ๊ฒฐ ํ™•์ธ docker exec -it site11_mongodb mongosh --eval "db.serverStatus()" # Pipeline ๋ชจ๋‹ˆํ„ฐ ํ™•์ธ curl http://localhost:8100/health - -# Console UI ์ ‘์† -open http://localhost:3000 ``` ## ์ƒ์„ธ ์„ค์น˜ ๊ฐ€์ด๋“œ (Detailed Installation) @@ -464,12 +513,14 @@ Site11์€ Docker Compose์™€ Kubernetes๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋Š” ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ### ๋ฐฐํฌ ์•„ํ‚คํ…์ฒ˜ -#### Docker Compose (์ธํ”„๋ผ ๋ฐ ์ค‘์•™ ์ œ์–ด) +#### Docker Compose (์ธํ”„๋ผ ์„œ๋น„์Šค) - **์ธํ”„๋ผ**: MongoDB, Redis, Kafka, Zookeeper - **์ค‘์•™ ์ œ์–ด**: Pipeline Scheduler, Pipeline Monitor, Language Sync -- **๊ด€๋ฆฌ ์ฝ˜์†”**: Console Backend/Frontend +- **๋ ˆ์ง€์ŠคํŠธ๋ฆฌ**: Docker Registry (port 5555) -#### Kubernetes (๋ฌด์ƒํƒœ ์›Œ์ปค) +#### Kubernetes (์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐ ํŒŒ์ดํ”„๋ผ์ธ) +- **๊ด€๋ฆฌ ์ฝ˜์†”**: Console Backend/Frontend +- **๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค**: Images, OAuth, Applications, Users, Data, Statistics - **๋ฐ์ดํ„ฐ ์ˆ˜์ง‘**: RSS Collector, Google Search - **์ฒ˜๋ฆฌ ์›Œ์ปค**: Translator, AI Article Generator, Image Generator - **์ž๋™ ์Šค์ผ€์ผ๋ง**: HPA(Horizontal Pod Autoscaler) ์ ์šฉ @@ -488,15 +539,40 @@ docker-compose -f docker-compose-hybrid.yml ps docker-compose -f docker-compose-hybrid.yml logs -f pipeline-scheduler ``` -#### 2. K8s ์›Œ์ปค ๋ฐฐํฌ +#### 2. Docker Hub๋ฅผ ์‚ฌ์šฉํ•œ K8s ๋ฐฐํฌ (๊ถŒ์žฅ) ```bash -# K8s ๋งค๋‹ˆํŽ˜์ŠคํŠธ ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ +# Docker Hub์— ์ด๋ฏธ์ง€ ํ‘ธ์‹œ +./deploy-dockerhub.sh + +# K8s ๋„ค์ž„์ŠคํŽ˜์ด์Šค ๋ฐ ์„ค์ • ์ƒ์„ฑ +kubectl create namespace site11-pipeline +kubectl -n site11-pipeline apply -f k8s/pipeline/configmap.yaml +kubectl -n site11-pipeline apply -f k8s/pipeline/secrets.yaml + +# Docker Hub ์ด๋ฏธ์ง€๋กœ ๋ฐฐํฌ cd k8s/pipeline +for service in console-backend console-frontend \ + ai-article-generator translator image-generator \ + rss-collector google-search; do + kubectl apply -f ${service}-dockerhub.yaml +done -# API ํ‚ค ์„ค์ • (configmap.yaml ํŽธ์ง‘) -vim configmap.yaml +# ๋ฐฐํฌ ์ƒํƒœ ํ™•์ธ +kubectl -n site11-pipeline get pods +kubectl -n site11-pipeline get services +kubectl -n site11-pipeline get hpa +``` -# ๋ฐฐํฌ ์‹คํ–‰ +#### 3. ๋กœ์ปฌ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•œ K8s ๋ฐฐํฌ (๋Œ€์•ˆ) +```bash +# ๋กœ์ปฌ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ์‹œ์ž‘ (Docker Compose) +docker-compose -f docker-compose-hybrid.yml up -d registry + +# ์ด๋ฏธ์ง€ ๋นŒ๋“œ ๋ฐ ํ‘ธ์‹œ +./deploy-local.sh + +# K8s ๋ฐฐํฌ +cd k8s/pipeline ./deploy.sh # ๋ฐฐํฌ ์ƒํƒœ ํ™•์ธ