Compare commits
2 Commits
80b13f2893
...
feature/fa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2808bbc29d | ||
|
|
ea2ecf2539 |
19
Dockerfile
19
Dockerfile
@@ -7,7 +7,7 @@ RUN apk add --no-cache curl && \
|
|||||||
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OTEL_VERSION}/opentelemetry-javaagent.jar \
|
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OTEL_VERSION}/opentelemetry-javaagent.jar \
|
||||||
-o /opentelemetry-javaagent.jar
|
-o /opentelemetry-javaagent.jar
|
||||||
|
|
||||||
# 2단계: Tomcat 이미지 (Java 8 기준)
|
# 2단계: Tomcat 이미지 (Java 8 기준, Java 17 쓸 거면 jdk17-temurin 그대로 사용)
|
||||||
FROM tomcat:9.0-jdk8-temurin
|
FROM tomcat:9.0-jdk8-temurin
|
||||||
|
|
||||||
ENV TZ=Asia/Seoul \
|
ENV TZ=Asia/Seoul \
|
||||||
@@ -15,30 +15,23 @@ ENV TZ=Asia/Seoul \
|
|||||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://192.168.100.203:4317 \
|
OTEL_EXPORTER_OTLP_ENDPOINT=http://192.168.100.203:4317 \
|
||||||
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
|
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
|
||||||
OTEL_RESOURCE_ATTRIBUTES="deployment.environment=prod" \
|
OTEL_RESOURCE_ATTRIBUTES="deployment.environment=prod" \
|
||||||
JAVA_TOOL_OPTIONS="\
|
JAVA_TOOL_OPTIONS="-javaagent:/opt/opentelemetry-javaagent.jar"
|
||||||
-Xms1g \
|
|
||||||
-Xmx1g \
|
|
||||||
-XX:+UseG1GC \
|
|
||||||
-XX:MaxGCPauseMillis=200 \
|
|
||||||
-XX:+UnlockExperimentalVMOptions \
|
|
||||||
-XX:+UseStringDeduplication \
|
|
||||||
-XX:+HeapDumpOnOutOfMemoryError \
|
|
||||||
-XX:HeapDumpPath=/tmp \
|
|
||||||
-XX:+DisableExplicitGC \
|
|
||||||
-javaagent:/opt/opentelemetry-javaagent.jar"
|
|
||||||
|
|
||||||
# 타임존 설정
|
# 타임존 설정
|
||||||
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
||||||
|
|
||||||
# OTEL 에이전트 복사
|
# OTEL 에이전트 복사
|
||||||
COPY --from=otel /opentelemetry-javaagent.jar /opt/opentelemetry-javaagent.jar
|
COPY --from=otel /opentelemetry-javaagent.jar /opt/opentelemetry-javaagent.jar
|
||||||
|
# OTEL 1000:1000 으로 구동 가능 하도록 처리
|
||||||
RUN chown 1000:1000 /opt/opentelemetry-javaagent.jar
|
RUN chown 1000:1000 /opt/opentelemetry-javaagent.jar
|
||||||
|
|
||||||
# 기본 웹앱 정리
|
# 🔽 기본 웹앱 정리
|
||||||
RUN rm -rf /usr/local/tomcat/webapps/*
|
RUN rm -rf /usr/local/tomcat/webapps/*
|
||||||
|
|
||||||
# Maven 빌드된 WAR 복사
|
# Maven 빌드된 WAR 복사
|
||||||
|
# Maven 빌드 결과 파일명에 맞게 수정
|
||||||
COPY target/sayit-helpdesk.war /usr/local/tomcat/webapps/ROOT.war
|
COPY target/sayit-helpdesk.war /usr/local/tomcat/webapps/ROOT.war
|
||||||
|
# TOMCAT 구동전 톰캣은 1000:1000 으로 구동 할 수 있도록 조정
|
||||||
RUN chown -R 1000:1000 /usr/local/tomcat/
|
RUN chown -R 1000:1000 /usr/local/tomcat/
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|||||||
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -1,10 +1,9 @@
|
|||||||
// Jenkinsfile — Kaniko build + K8s deploy (빌드번호 태그 사용)
|
// Jenkinsfile — Kaniko build + K8s deploy (latest only)
|
||||||
def L = 'kaniko-and-deploy'
|
def L = 'kaniko-and-deploy'
|
||||||
def REG = 'harbor.sayinfo.co.kr'
|
def REG = 'harbor.sayinfo.co.kr'
|
||||||
def IMAGE = 'sayit-helpdesk/helpdesk-service' // Harbor 프로젝트/레포 이름
|
def IMAGE = 'sayit-helpdesk/helpdesk-service' // Harbor 프로젝트/레포 이름에 맞게 유지 또는 수정
|
||||||
def APP_NS = 'sayit-helpdesk' // 실제 K8s 네임스페이스
|
def APP_NS = 'sayit-helpdesk' // 실제 K8s 네임스페이스와 일치해야 함
|
||||||
def DEPLOY = 'sayit-helpdesk-service' // 실제 Deployment 이름
|
def DEPLOY = 'sayit-helpdesk-service' // 실제 Deployment 이름과 일치해야 함
|
||||||
def IMAGE_TAG = "${env.BUILD_NUMBER}"
|
|
||||||
|
|
||||||
podTemplate(
|
podTemplate(
|
||||||
label: L,
|
label: L,
|
||||||
@@ -105,7 +104,7 @@ spec:
|
|||||||
/kaniko/executor \\
|
/kaniko/executor \\
|
||||||
--context=. \\
|
--context=. \\
|
||||||
--dockerfile=Dockerfile \\
|
--dockerfile=Dockerfile \\
|
||||||
--destination=${REG}/${IMAGE}:${IMAGE_TAG} \\
|
--destination=${REG}/${IMAGE}:latest \\
|
||||||
--snapshot-mode=redo \\
|
--snapshot-mode=redo \\
|
||||||
--skip-tls-verify \\
|
--skip-tls-verify \\
|
||||||
--cache=true \\
|
--cache=true \\
|
||||||
@@ -118,7 +117,8 @@ spec:
|
|||||||
container('kubectl') {
|
container('kubectl') {
|
||||||
sh """
|
sh """
|
||||||
set -eux
|
set -eux
|
||||||
kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:${IMAGE_TAG}
|
kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:latest
|
||||||
|
kubectl -n ${APP_NS} rollout restart deploy/${DEPLOY}
|
||||||
kubectl -n ${APP_NS} rollout status deploy/${DEPLOY} --timeout=300s
|
kubectl -n ${APP_NS} rollout status deploy/${DEPLOY} --timeout=300s
|
||||||
|
|
||||||
kubectl -n ${APP_NS} get deploy ${DEPLOY} -o wide
|
kubectl -n ${APP_NS} get deploy ${DEPLOY} -o wide
|
||||||
|
|||||||
BIN
src/main/webapp/Favicon.ico
Normal file
BIN
src/main/webapp/Favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user