공부하고 기록하는, 경제학과 출신 개발자의 노트

학습일지/클라우드

IBM Cloud - What is OpenShift? 정리

inspirit941 2020. 7. 31. 15:06
반응형

IBM Clouders 1기 활동. IBM Cloud Essential의 OpenShift 강의내용 정리.

https://cognitiveclass.ai/courses/ibm-cloud-essentials

 

IBM Cloud Essentials - Build, deploy and manage with IBM Cloud

ABOUT THIS COURSE This course introduces you to the IBM Cloud. You will learn about the many offerings and services IBM Cloud has to deliver enterprise capabilities for private, public, hybrid and multi-cloud. The course introduces you to the various servi

cognitiveclass.ai

OpenShift

Open Source Application Platform based on Kubernetes / container tech.

Allows you to run containerized application & workloads, and is powered by Kubernetes under the covers.

 

  • Origin Kubernetes Distribution (OKD) : Open Source project that powers Openshift.
  • OpenShift : Redhat이 제공하는 서비스 중 하나.

기본 아키텍처

스크린샷 2020-07-31 오후 2 17 36

  1. Resource Layer - Public / Private Resource 상관없이 실행이 가능함. On-prem Resource / Cloud Resource 무관
  2. OS Layer - 보통은 Red Hat Enterprise Linux를 사용하지만, OKD 프로젝트 기반이면 CentOS를 사용해도 무방하다.
  3. Kubernetes Layer
  4. OpenShift - Kubernetes Layer 위에 설치. difficult task를 대신 처리해주는 역할. Deploying Application이나 day-to-day Operation 같은 작업을 Web Console이나 CLI로 쉽게 작업할 수 있게 해줌.

 

Developer가 사용할 경우

스크린샷 2020-07-31 오후 2 39 26

 

이들의 핵심업무 : Write Application, Create Changes, Test, Deploy them into a cluster.

  • Create a Project & Application : CLI / Web Console로 작업. Templates / Source code and Language 제공.
  • Push changes to Repository (ex-Github)

이 두 가지를 제외한 나머지는 전부 OpenShift가 담당한다.


CLI나 Web Console로 프로젝트를 생성하면, OpenShift는 자동으로 Jenkins Job & Pipeline을 백엔드에 생성한다. Github에 코드를 푸시하면, Webhook을 작동시켜서 Jenkins job kicks off.

 

Jenkins가 하는 두 가지 작업

  • Sourced Image (소스코드 기반 Docker Image) 생성. 생성된 image를 OpenShift Built-in Private Registry에 저장. 필요하다면 Public Registry에도 저장할 수 있음.
  • 레지스트리에 저장하는 작업이 끝나면, Actual Cluster에 Push.

현재 Cluster에 두 개의 host가 있다고 가정하고, 저장된 image를 각각의 host에 Deploy한다고 해보자.

개발자가 소스코드를 작성하고 Repository에 Push할 경우

  1. Jenkins에서 해당 소스코드를 토대로 Docker image를 생성하고, 해당 이미지를 Registry에 저장한다.
  2. Actual Cluster에 해당 image를 push. 이 과정에서 Image Stream이라는 방식을 사용한다.
  3. Bring down the old version, and Start the new version in every host.

cf. Image Stream?

  • Whenever a change is deteced with the image you deployed,
    it allows you to push those changes with no downtimes to application.

즉, 소스코드 변경 -> 도커 이미지 변경. 이 변경사항을 확인해서 Downtime 없이 변경사항을 host에 반영하도록 하는 기술.


Operation Engineer가 사용할 경우

 

스크린샷 2020-07-31 오후 2 44 27

 

이들의 핵심 업무 : Maintain a high availabilty (ensure SLA), Sustain healthy infrastructure. 

  • 따라서 Web Console이 CLI보다 편의성이 높다.

예컨대 Scale out이 필요한 상황이라면? -> Ansible Playbook 사용 가능.

  • Spin up the creation of new host + bring it into cluster

강의영상

https://www.youtube.com/watch?v=KTN_QBuDplo

 

반응형