1 Docker Image Container Image Image Docker Image

  • Slides: 22
Download presentation

1. Docker Image 및 Container 개요 • Image 개념 • Image 생성 및 관리

1. Docker Image 및 Container 개요 • Image 개념 • Image 생성 및 관리

Docker Image 실행에 필요한 모든 것을 포함하여 Docker Format의 파일로 생성 App code, runtime,

Docker Image 실행에 필요한 모든 것을 포함하여 Docker Format의 파일로 생성 App code, runtime, system tools, system libraries Container Image Docker Build Docker Run

Dockerfile을 이용하여 HTTPD 이미지 생성 [root@master ~]# cat Dockerfile FROM docker. io/centos 베이스 이미지

Dockerfile을 이용하여 HTTPD 이미지 생성 [root@master ~]# cat Dockerfile FROM docker. io/centos 베이스 이미지 USER root RUN yum clean all && yum repolist && yum -y install httpd && yum clean all RPM 을 이용하여 HTTPD설치 EXPOSE 80 사용할 포트 CMD ["/usr/sbin/apachectl", "-k", "start", "-D", "FOREGROUND"] 실행할 파일 [root@master ~]# docker build -t myhttpd. 이미지 생성

Image Push & Download • 생성된 이미지를 Image Registry 에 Push한다. • Openshift의 Image.

Image Push & Download • 생성된 이미지를 Image Registry 에 Push한다. • Openshift의 Image. Stream에는 이미지의 위치가 저장되어 있으며 필요 시 Image Registry로부 터 이미지를 받아갈 수 있다. Docker Image Registry User Docker Image Push myhttpd: 2. 4 Openshift Image. Stream myhttpd: 2. 4

어플리케이션 작동구조 Openshift web. rockplace. co. kr 내부DNS HAProxy 52. 78. 245. 72: 80

어플리케이션 작동구조 Openshift web. rockplace. co. kr 내부DNS HAProxy 52. 78. 245. 72: 80 172. 30. 35. 131: 80 Route (내부 Service 위 치 확인) Openshift Node web. rockplace. co. kr VIP 172. 30. 35. 131: 80 Apache Container/Pod: 10. 0. 10. 11: 80 Service (Load Balancing) Pod (Container)

3. Openshift 리소스 구조

3. Openshift 리소스 구조

Container Management by Openshift Image Route: web. rockplace. co. kr 외부로부터의 진입점 service: web

Container Management by Openshift Image Route: web. rockplace. co. kr 외부로부터의 진입점 service: web 172. 30. 176. 102 Cluster IP (VIP)를 통한 Loadbalancing Pod Replication. Controller Deployment. Config 실제 어플리케이션 Container가 담긴 Pod 지정된 개수의 Pod가 잘 돌고 있는지… 몇 개의 Pod를 만들지… 어떻게 Pod를 배포 할지…

Openshift Resources 구조 Route 접속 주체 별로 User생성 Application 그룹 또는 Resource 제한단위 User

Openshift Resources 구조 Route 접속 주체 별로 User생성 Application 그룹 또는 Resource 제한단위 User Project User 단위로 접속 User별 권한부여 Project 별 Resource 제한 가능 (CPU, Memory 포함) 개별 Application Service Application Pod Deployment Config Build. Config

Build, Deployment, Pod 현재 실행중인 Pod 14번째 배포 이미지 사용 중 Route Node로 배포된

Build, Deployment, Pod 현재 실행중인 Pod 14번째 배포 이미지 사용 중 Route Node로 배포된 내역 Service Application Pod Deployment Config Build. Config 소스 빌드 내역(Master)

4. 배포 및 롤백 • Deployment • Rollback

4. 배포 및 롤백 • Deployment • Rollback

Deployment • Deployment는 이미지를 Node로 배포하여 실행시키는 것을 말한다. 배포할 Image 배포 방법 Image

Deployment • Deployment는 이미지를 Node로 배포하여 실행시키는 것을 말한다. 배포할 Image 배포 방법 Image Stream Tag: myproject/ncis: latest Strategy Type: Rolling Image가 변경되면 자동으로 배포: yes Max Num Unavailable Pods: 25% ( ¼ 씩 Rolling배포) 설정이 바뀌면 자동으로 배포: yes Replicas: 4 (동시에 유지할 Pod 개수)

5. 서비스 확장 • Manual Scale-Out • Resource Limits • Auto-Scaler

5. 서비스 확장 • Manual Scale-Out • Resource Limits • Auto-Scaler

HTTPD Application

HTTPD Application

감사합니다 midware@rockplace. co. kr

감사합니다 midware@rockplace. co. kr