Jenkins CI/CD 파이프라인 완전 구축 및 가이드 개선

- Kustomize 기반 환경별 매니페스트 구조 생성
  - Base: 공통 리소스 및 네임스페이스 설정
  - Overlays: dev/staging/prod 환경별 설정
  - Patch: 환경별 replicas, resources, 도메인 설정

- Jenkins 파이프라인 구축
  - 완전한 Jenkinsfile 작성 (빌드, 테스트, 배포)
  - SonarQube 품질 분석 및 Quality Gate 적용
  - ACR 이미지 빌드 및 푸시 자동화
  - AKS 배포 자동화

- 환경별 설정 관리
  - dev: 1 replica, 기본 리소스, HTTP
  - staging: 2 replicas, 중간 리소스, HTTPS
  - prod: 3 replicas, 고사양 리소스, HTTPS, 보안 강화

- 배포 자동화 도구
  - 수동 배포 스크립트 작성 및 실행 권한 설정
  - 롤백 방법 및 트러블슈팅 가이드 포함

- 완전한 구축 가이드 문서 작성
  - Jenkins 환경 설정 방법
  - Credentials 등록 방법
  - Pipeline Job 생성 방법
  - 배포 실행 및 모니터링 방법
  - 체크리스트 및 트러블슈팅 가이드

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hiondal
2025-09-12 13:23:13 +09:00
parent 042198deb0
commit c7e5a86de8
29 changed files with 382 additions and 484 deletions
@@ -4,8 +4,8 @@ metadata:
name: cm-common
data:
CORS_ALLOWED_ORIGINS: "http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://phonebill.20.214.196.128.nip.io"
JWT_ACCESS_TOKEN_VALIDITY: "18000000" # 5시간
JWT_ACCESS_TOKEN_VALIDITY: "18000000"
JWT_REFRESH_TOKEN_VALIDITY: "86400000"
REDIS_PORT: "6379"
SPRING_PROFILES_ACTIVE: "dev"
DDL_AUTO: "update"
DDL_AUTO: "update"
@@ -10,11 +10,11 @@ spec:
- name: api-gateway
resources:
requests:
cpu: 256m
memory: 256Mi
memory: "256Mi"
cpu: "256m"
limits:
cpu: 1024m
memory: 1024Mi
memory: "1024Mi"
cpu: "1024m"
---
apiVersion: apps/v1
kind: Deployment
@@ -28,11 +28,11 @@ spec:
- name: user-service
resources:
requests:
cpu: 256m
memory: 256Mi
memory: "256Mi"
cpu: "256m"
limits:
cpu: 1024m
memory: 1024Mi
memory: "1024Mi"
cpu: "1024m"
---
apiVersion: apps/v1
kind: Deployment
@@ -46,11 +46,11 @@ spec:
- name: bill-service
resources:
requests:
cpu: 256m
memory: 256Mi
memory: "256Mi"
cpu: "256m"
limits:
cpu: 1024m
memory: 1024Mi
memory: "1024Mi"
cpu: "1024m"
---
apiVersion: apps/v1
kind: Deployment
@@ -64,11 +64,11 @@ spec:
- name: product-service
resources:
requests:
cpu: 256m
memory: 256Mi
memory: "256Mi"
cpu: "256m"
limits:
cpu: 1024m
memory: 1024Mi
memory: "1024Mi"
cpu: "1024m"
---
apiVersion: apps/v1
kind: Deployment
@@ -82,8 +82,8 @@ spec:
- name: kos-mock
resources:
requests:
cpu: 256m
memory: 256Mi
memory: "256Mi"
cpu: "256m"
limits:
cpu: 1024m
memory: 1024Mi
memory: "1024Mi"
cpu: "1024m"
@@ -45,4 +45,4 @@ spec:
service:
name: kos-mock
port:
number: 80
number: 80
@@ -7,4 +7,4 @@ stringData:
DB_HOST: "bill-inquiry-postgres-dev-postgresql"
DB_NAME: "bill_inquiry_db"
DB_USERNAME: "bill_inquiry_user"
DB_PASSWORD: "BillUser2025!"
DB_PASSWORD: "BillUser2025!"
@@ -6,4 +6,4 @@ type: Opaque
stringData:
JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ=="
REDIS_HOST: "redis-cache-dev-master"
REDIS_PASSWORD: "Redis2025Dev!"
REDIS_PASSWORD: "Redis2025Dev!"
@@ -7,4 +7,4 @@ stringData:
DB_HOST: "product-change-postgres-dev-postgresql"
DB_NAME: "product_change_db"
DB_USERNAME: "product_change_user"
DB_PASSWORD: "ProductUser2025!"
DB_PASSWORD: "ProductUser2025!"
@@ -7,4 +7,4 @@ stringData:
DB_HOST: "auth-postgres-dev-postgresql"
DB_NAME: "phonebill_auth"
DB_USERNAME: "auth_user"
DB_PASSWORD: "AuthUser2025!"
DB_PASSWORD: "AuthUser2025!"