メインコンテンツまでスキップ

6. SDF Container 연동

Composite Container Application 적용 가이드

POD에 사이드카 컨테이너 추가

주의 사항
  • cloud-cdf-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: cloud-cdf-config
namespace: dev
data:
## 필수 설정
# [SDF Container 전용] SKMS URL
SKMS_API_URL: "http://cloud-skms-service.dev.svc.cluster.local"
# [SDF Container 전용] 서비스 포트
CONTAINER_LINKER_SERVER_PORT: "8181"
# [SDF Container 전용] 로그 레벨 선택 설정(기본 값 info)
LOG_LEVEL: debug
# =================================================================
## [폐쇄망에 구축 시 MIP SDK의 프록시 설정] 프록시 IP, PORT 및 no_proxy 설정은 고객사에 맞게 수정 필요
## 프록시 설정이 필요하지 않는 경우 관련된 4개의 환경 변수 삭제
JAVA_TOOL_OPTIONS: >
-Dhttp.proxyHost=10.10.12.140 -Dhttp.proxyPort=3128
-Dhttps.proxyHost=10.10.12.140 -Dhttps.proxyPort=3128
-Dhttp.nonProxyHosts=localhost|127.0.0.1|*.svc|*.cluster.local|cloud-skms-service.security365.svc.cluster.local|*.security365.com|security365.com
http_proxy: http://10.10.12.140:3128
https_proxy: http://10.10.12.140:3128
no_proxy: localhost,127.0.0.1,.svc,.cluster.local,cloud-skms-service.security365.svc.cluster.local,.security365.com,security365.com
# =================================================================
# [SDF Container 전용] 통합 로그 전송 선택 설정(기본 값 true, false로 설정하는 경우 SDF의 암복호화 로그는 전송하지 않음)
# LOG_SEND_USE: false
# scsl.jar에서 문서 변환 요청 시 원본 문서를 못찾는 증상에 대한 딜레이 설정
# FILE_CONVERT_DELAY: 100
# =================================================================
## 톰캣 접속 설정
# [컨테이너링커 전용] 생성할 수 있는 thread의 총 개수 선택 설정(기본 값 0 → maxThreads : 200)
# TOMCAT_MAX_THREAD: "0"
# [컨테이너링커 전용] 작업큐의 사이즈 선택 설정(기본 값 0 → acceptCount : 100)
# TOMCAT_ACCEPT_COUNT: "0"
# [컨테이너링커 전용] 연결 가능한 connection의 총 개수 선택 설정(기본 값 0 → maxConnections : 8192)
# TOMCAT_MAX_CONNECTIONS: "0"
# =================================================================
## 암복호화 요청 시 RPC(Request/Reply) 패턴 적용 설정 - 큐 생성 실패 시 기존과 같이 SKMS API 호출
# RPC(Request/Reply) 패턴 사용 여부(디폴트 : false)
# CUSTOM_RABBITMQ_USE: true
# RabbitMQ 클러스터의 모든 서버 URL 리스트(콤마로 구분) - ADDRESSES 값이 있을 경우 HOST,PORT는 무시됨
# CUSTOM_RABBITMQ_CLUSTER_ADDRESSES: "security365-rabbitmq-0.dev.svc.cluster.local:5672,security365-rabbitmq-1.dev.svc.cluster.local:5672,security365-rabbitmq-2.dev.svc.cluster.local:5672"
# CUSTOM_RABBITMQ_HOST: "security365-rabbitmq.dev.svc.cluster.local"
# CUSTOM_RABBITMQ_PORT: "5672"
# CUSTOM_RABBITMQ_USERNAME: "security365"
# CUSTOM_RABBITMQ_PASSWORD: "security365"
# =================================================================
  • Deployment yaml 파일에 사이드카 컨테이너(Security365 SDF Container) 서비스 추가
      ## 사이트카 컨테이너 설정
- name: cloud-containerlinker-service
image: security365acr.azurecr.io/shieldrm/cloud-containerlinker:latest
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 256Mi
limits:
memory: 512Mi
ports:
- containerPort: 8181
envFrom:
- configMapRef:
name: cloud-cdf-config
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
volumeMounts:
- name: containerlinker-logs
mountPath: /opt/containerLinker/logs
- name: containerlinker-tmp
mountPath: /tmp
## 공유 디렉토리 PVC 정보
- name: data-cloud-drm-shared
mountPath: /rmswork
  • 고객사 업무시스템과 동일한 POD에서 실행되므로 호출 URL은 항상 "http://127.0.0.1:8181" 사용
  • 업무시스템과 파일 공유가 가능한 공유 디렉토리(PVC) 마운트 필요
  • Deployment yaml 샘플
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloud-ssevtr-service
namespace: dev
labels:
app: cloud-ssevtr-service-label
# namespace: cloud-ss-svc
spec:
replicas: 1
selector:
matchLabels:
app: cloud-ssevtr-service-label
template:
metadata:
labels:
app: cloud-ssevtr-service-label
spec:
containers:
- name: cloud-ssevtr-service
image: scr.softcamp.co.kr/saas/cloud-ss-evtr-svc:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: cloud-ssevtr-config
volumeMounts:
- name: data-cloud-drm-shared
mountPath: /rmswork
resources:
requests:
memory: 2Gi
limits:
memory: 2Gi
##==========================[SDF Container 전용 START]==========================##
- name: cloud-containerlinker-service
image: security365acr.azurecr.io/shieldrm/cloud-containerlinker:latest
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 256Mi
limits:
memory: 512Mi
ports:
- containerPort: 8181
envFrom:
- configMapRef:
name: cloud-cdf-config
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
volumeMounts:
- name: containerlinker-logs
mountPath: /opt/containerLinker/logs
- name: containerlinker-tmp
mountPath: /tmp
## 공유 디렉토리 PVC 정보
- name: data-cloud-drm-shared
mountPath: /rmswork
##==========================[SDF Container 전용 END]==========================##
volumes:
- name: data-cloud-drm-shared
persistentVolumeClaim:
claimName: data-cloud-drm-shared
imagePullSecrets:
- name: security365acr

SDF Container 접속 및 로그 확인 명령

  • SDF Container pod 접속 : kubectl -n dev exec --stdin --tty cloud-ssevtr-service-754b65cfb-bjzzr -c cloud-containerlinker-service sh
  • SDF Container pod 로그 : kubectl logs -f --tail 10000 -n dev cloud-ssevtr-service-754b65cfb-bjzzr -c cloud-containerlinker-service

SDF 동작 상태 점검 방법