Skip to content

PaaS-TA/container-platform-portal-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PaaS-TA 컨테이너 플랫폼 이미지 빌드

플랫폼 어플리케이션 플랫폼 컨테이너 플랫폼
포털 AP 포털 🚩 CP 포털
모니터링 대시보드
모니터링 Monitoring Logsearch InfluxDB Redis
Pinpoint Pinpoint Buildpack
AP 서비스 Cubrid Gateway GlusterFS Lifecycle
Logging MongoDB MySQL Pinpoint APM
Pipeline RabbitMQ Redis Source Control
WEB-IDE
CP 서비스 Pipeline Source Control
🚩 You are here.

소개

컨테이너 플랫폼 프로젝트를 빌드하고 이미지를 생성하여 레파지토리에 이미지를 업로드하는 방법에 대해 기술하였다.

사전 설치

  • JDK 설치
  • Gradle 설치
  • Docker 설치

컨테이너 플랫폼 빌드 방법

  • PaaS-TA 컨테이너 플랫폼 프로젝트의 jar 파일 생성을 위해 빌드를 진행한다.
$ gradle build

컨테이너 플랫폼 이미지 생성 방법


'paas-ta-container-platform-api'를 예시로 진행한다.

  • 파일 디렉토리 구성
├── Dockerfile
├── application.yml
└── paas-ta-container-platform-api.jar
  • Dockerfile 확인
$ cat Dockerfile
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=*.jar
COPY ${JAR_FILE} container-platform-api.jar
COPY application.yml /application.yml
ENTRYPOINT ["java","-jar","-Dspring.config.location=application.yml","-Dspring.profiles.active=prod","/container-platform-api.jar"]
  • 이미지 생성
    • {K8s_MASTER_NODE_IP} : Cluster에 배포된 Private Image Repository 인 Harbor로 접속하기 위해 외부에서 Cluster에 통신할 수 있는 MasterNode의 IP로 지정한다.
$ sudo docker build --tag {K8s_MASTER_NODE_IP}:30002/cp-portal-repository/container-platform-api:latest .
  • 이미지 생성 확인
$ sudo podman images

REPOSITORY                                                            TAG                 IMAGE ID            CREATED             SIZE
xx.xxx.xxx.xx:30002/cp-portal-repository/container-platform-api          latest              45918a869bfd        38 seconds ago      140MB

컨테이너 플랫폼 이미지 Private Repository 업로드 방법

podman를 기준으로 진행한다.

  • 배포된 Private Repository인 Harbor에 로그인을 진행한다.
$ sudo podman login http://{K8s_MASTER_NODE_IP}:30002 --username admin --password Harbor12345
  • 로그인한 Private Repository에 컨테이너 플랫폼 이미지를 Push한다.
$ sudo docker push {K8s_MASTER_NODE_IP}:30002/cp-portal-repository/container-platform-api:latest