-
Notifications
You must be signed in to change notification settings - Fork 0
Feature: admin 모니터링 추가 #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough이 변경사항은 관리자 및 사용자 환경에 Prometheus와 Grafana 모니터링 스택을 추가 및 분리하고, 관련 Docker Compose 파일, 배포 스크립트, GitHub Actions 워크플로를 업데이트합니다. 또한, nowait-app-admin-api 모듈에 Prometheus 메트릭 수집을 위한 의존성을 추가합니다. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant EC2
participant Docker Compose
participant Prometheus-Admin
participant Grafana-Admin
participant nowait-app-admin-api
GitHub Actions->>EC2: SCP로 docker-compose.admin-monitoring.yml, prometheus-admin.yml 복사
GitHub Actions->>EC2: deploy-admin-docker.sh 실행
EC2->>Docker Compose: docker-compose -f ... up
Docker Compose->>Prometheus-Admin: 컨테이너 시작
Docker Compose->>Grafana-Admin: 컨테이너 시작 (Prometheus-Admin 의존)
Prometheus-Admin->>nowait-app-admin-api: 메트릭 수집
Grafana-Admin->>Prometheus-Admin: 데이터 조회
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–25 minutes Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
♻️ Duplicate comments (1)
.github/workflows/deploy-admin-docker.yml (1)
119-123: 동일 문제 – docker/login-action 버전위 스텝과 같은 이유로 동일한 수정이 필요합니다.
🧹 Nitpick comments (7)
scripts/deploy-user-docker.sh (1)
14-23: 모니터링 컨테이너 제거 로직이nowait-app-user-api존재 여부에 의존합니다API 컨테이너가 없으면 Prometheus/Grafana 컨테이너를 제거하지 않아 중복 실행될 수 있습니다. 블록을 분리하거나
docker-compose down으로 전체 스택을 정리하는 쪽이 더 안전합니다..github/workflows/deploy-user-docker.yml (1)
96-104: 스텝 명칭과 파일명 불일치스텝 이름은
Copy prometheus.yml to EC2지만, 실제 복사하는 파일은prometheus-user.yml입니다. 이름을 일치시켜 혼동을 줄여주세요..github/workflows/deploy-admin-docker.yml (1)
50-53: docker/login-action 버전 업그레이드 권장Static analysis에서
docker/login-action@v2가 구버전 러너와 호환되지 않을 수 있다고 경고합니다.@v3또는 최신 마이너 버전을 명시하여 문제를 예방하세요.scripts/deploy-admin-docker.sh (2)
14-23: 모니터링 컨테이너 제거 조건 개선 필요관리 API 컨테이너가 없으면 Prometheus/Grafana 컨테이너를 제거하지 않아 중복 실행 위험이 있습니다. 별도
if블록으로 분리하거나docker-compose -p nowait_dev down으로 스택 전체를 정리하는 방식을 권장합니다.
28-29: 재배포 시 이미지 최신화 옵션 고려태그가 동일하면
docker-compose pull이 캐시된 레이어를 사용할 수 있습니다.--pull always(compose v2) 또는up --force-recreate옵션을 추가해 항상 최신 이미지를 받도록 해주세요.docker-compose.admin-monitoring.yml (1)
3-3:latest태그 사용은 재현성 저해
prom/prometheus:latest,grafana/grafana:latest태그는 이미지 업데이트 시 예기치 못한 변경을 불러올 수 있습니다.
운영 배포라면 명시적인 버전 태그(예:grafana/grafana:10.2.3)로 고정할 것을 권장합니다.Also applies to: 16-16
docker-compose.user-monitoring.yml (1)
3-3: 이미지 태그 고정 권장재현성과 롤백을 위해 Prometheus·Grafana 이미지를 구체적인 버전으로 고정하는 것을 권장합니다.
Also applies to: 16-16
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.github/workflows/deploy-admin-docker.yml(4 hunks).github/workflows/deploy-user-docker.yml(2 hunks)docker-compose.admin-monitoring.yml(1 hunks)docker-compose.user-monitoring.yml(2 hunks)nowait-app-admin-api/build.gradle(1 hunks)scripts/deploy-admin-docker.sh(1 hunks)scripts/deploy-user-docker.sh(2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/deploy-admin-docker.yml
51-51: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
120-120: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (3)
nowait-app-admin-api/build.gradle (1)
73-78: Actuator 엔드포인트 보안 설정 확인 필요Spring Boot Actuator를 추가하면서
/actuator/**경로가 기본으로 노출됩니다. 프로덕션에서는/actuator/prometheus외 엔드포인트를 인증·IP 화이트리스트 등으로 보호해야 합니다.
management.endpoints.web.exposure.include=prometheus설정 또는 SecurityFilterChain으로 차단했는지 확인 부탁드립니다..github/workflows/deploy-user-docker.yml (1)
70-75: 새 Secret 키 존재 여부 확인 필요
PROMETHEUS_DEV_USER_YML시크릿을 사용하도록 변경되었습니다. 레포지토리/조직 시크릿에 동일한 키가 없으면 디코딩 단계에서 실패합니다. CICD 시크릿 설정을 다시 확인해주세요..github/workflows/deploy-admin-docker.yml (1)
73-78: 시크릿 키PROMETHEUS_DEV_ADMIN_YML등록 여부 확인Prometheus 설정 파일을 디코딩합니다. 해당 시크릿이 존재하지 않으면 배포가 실패하니 사전 확인이 필요합니다.
작업 요약
Issue Link
#206
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit
신규 기능
버그 수정
작업 자동화 및 배포