컨테이너·배포 산출물 생성
generate_egovframe_deployGenerate Dockerfiles, docker-compose files, and Kubernetes manifests for eGovFrame projects by diagnosing build tooling, packaging, database type, and configuration.
Instructions
프로젝트 진단(빌드 도구·패키징·Boot 여부·웹·actuator·DbType·설정 파일)으로 컨테이너·배포 산출물을 만듭니다 — Dockerfile(멀티 스테이지: Maven/Gradle 빌드 → Classic war 는 Tomcat 10.1(Servlet 6.1 이상이면 11.0)에 ROOT 로 풀어서, Boot jar 는 eclipse-temurin JRE 로; 비루트·HEALTHCHECK·Asia/Seoul·UTF-8, buildInImage=false 면 미리 빌드한 산출물), .dockerignore, deploy/docker-compose.yml(앱 + DbType 별 DB 컨테이너 mysql·mariadb·postgres, 템플릿 DDL·DATA 초기화, 상용 DB 는 연결 정보만), Kubernetes 매니페스트(deploy/k8s/.yaml — Deployment(startup·readiness·liveness 프로브, 비루트 securityContext, 리소스)·Service·ConfigMap·Secret·선택 Ingress). DB 설정은 Boot 는 Spring 환경 변수(Globals.mysql.Url → GLOBALS_MYSQL_URL), Classic 은 globals.properties 사본을 볼륨·Secret 으로 덮어씁니다. imageRegistry 로 기반 이미지를 사내 레지스트리(폐쇄망)에서 받습니다. 새 파일만 쓰고(기존 파일 거부) dryRun(기본)은 내용만 보여 줍니다. 멀티 모듈·라이브러리 jar·빌드 파일 없는 프로젝트는 이유를 돌려줍니다. 멀티 모듈 작업공간(Maven ·Gradle include·루트 빌드 파일 없는 독립 프로젝트 묶음)이면 서비스 모듈마다 이미지(자체 Dockerfile 은 그대로)와 하나의 docker-compose·서비스별 Kubernetes 매니페스트를 만들고, 설정의 localhost 참조(설정 서버·디스커버리·DB·메시지 브로커·캐시)를 서비스 이름으로 바꿉니다(모듈 설정은 환경 변수, 설정 서버 저장소는 사본). modules 로 일부 서비스만 고릅니다. v1.16: observability="otel" 이면 OpenTelemetry Java 에이전트(고정 버전·sha256 확인, 폐쇄망은 빌드 컨텍스트 deploy/otel/ 의 jar 또는 --build-arg OTEL_AGENT_URL)를 이미지에 두고 compose·Kubernetes 가 JAVA_TOOL_OPTIONS·OTEL_SERVICE_NAME·OTEL_EXPORTER_OTLP_ENDPOINT·OTEL_RESOURCE_ATTRIBUTES 로 붙여 OpenTelemetry Collector(core 배포판, Apache-2.0)로 trace·metric·log 를 보냅니다 — 수집기는 기본 debug 출력, 기관 백엔드(otlp_http·prometheus)는 설정 주석, 저장·대시보드(AGPL 스택)는 동봉하지 않음.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectDir": "<projectDir>"
},
"name": "generate_egovframe_deploy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jdk | No | JDK(빌드·실행 이미지) | 17 |
| image | No | 앱 이미지 이름(기본 <appName>:<version>) | |
| dryRun | No | true(기본)면 쓰지 않고 내용만 | |
| format | No | 응답 형식 | markdown |
| appName | No | 앱 이름(기본 artifactId) | |
| modules | No | 멀티 모듈 작업공간에서 일부 서비스만(모듈 이름·경로). 그 서비스가 먼저 띄워야 하는 서비스·인프라는 함께 들어감 | |
| targets | No | 만들 산출물(compose 는 Dockerfile 도 함께) | |
| projectDir | Yes | 프로젝트 디렉터리(절대경로 권장) | |
| ingressHost | No | Kubernetes Ingress 호스트(주면 Ingress 추가) | |
| buildInImage | No | true: 이미지 안에서 빌드(멀티 스테이지) · false: 미리 빌드한 target/*.war·jar 를 담음(폐쇄망에서 컨테이너 안 Maven 접근이 어려울 때) | |
| imageRegistry | No | 기반 이미지 레지스트리(폐쇄망 사내 레지스트리·프록시 캐시) — Dockerfile ARG BASE_REGISTRY 기본값 | docker.io/library |
| observability | No | otel 이면 OpenTelemetry Java 에이전트(이미지, sha256 확인, 폐쇄망은 deploy/otel/ 의 jar)·수집기(compose·k8s, core 배포판 — debug 출력, 기관 백엔드는 주석 예시)·앱 환경 변수(JAVA_TOOL_OPTIONS·OTEL_*)를 함께 만듦(단일 프로젝트) | none |
| dockerfilePath | No | Dockerfile 경로(프로젝트 상대) — 템플릿에 이미 Dockerfile 이 있으면 deploy/Dockerfile 등 | Dockerfile |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| notes | Yes | ||
| usage | Yes | ||
| dryRun | Yes | ||
| profile | No | ||
| written | Yes | ||
| supported | Yes | ||
| workspace | No | ||
| projectDir | Yes | ||
| unsupported | No |