표준컨테이너와 Cloud-Native 개발환경 을활용한신속한애플리케이션개발 Hyunsoo Kim(hykim@redhat.com) Senior Solutions Architect
Agenda 1. 표준컨테이너 2. 컨테이너오케스트레이션 3. 마이크로서비스아키텍처를위한 Cloud-Native 개발환경 4. 데브옵스환경구성을위한 CI/CD 5. 컨테이너애플리케이션의운영 2
표준컨테이너
Container? OS 가상화기술 (vs. HW 가상화기술 a.k.a. VM) HW 가상화기술보다더경량화 컨테이너기술의종류 LXC OpenVZ Solaris/HPUX Rocket OCI Container - Open Industry Standard Container 4
표준컨테이너기술 Established in June 2015 Create Open Industry Standards around Container Formats and Runtime https://www.opencontainers.org/ 5
표준컨테이너기술장점 Managing/creating containers is SIMPLE! 6
Software packaging concept 컨테이너이미지안에필요한소프트웨어와의존성라이브러리들을같이패키징하는기술이핵심 배포및라이프사이클관리의복잡성을줄임 여러대의 Host에배포및포팅이쉬움 Host OS 상에서컨테이너별로격리기능제공 In RHEL, this is done through: Control Groups (cgroups) Kernel namespaces SELinux, svirt, iptables OCI Container 7
Traditional vs. Containers 소프트웨어패키징 = 보다빠른셋업 + 완벽한이식성 8
VM vs. Containers App A App A App B 1. Hypervisor나 GuestOS로인한 overhead 없음 2. Guest OS 관리부분의부담이없음 3. 빠른 startup 4. 인스턴스증가시, 추가적인설정작업없음 VM Bins/ Libs Bins/ Libs Bins/ Libs Container App A App A App A App B App B App B App B Guest OS Guest OS Guest OS Bins/Libs Bins/Libs Hypervisor (Type 2) Host OS Server HW Virtualization Container Engine Host OS Server OS Virtualization 9
Container Lifecycle push search pull Image Registry tag build Images save Dockerfile commit run load Backup.tar Containers My Host stop start restart 10
컨테이너오케스트레이션
Container Orchestration 멀티호스트상의멀티컨테이너를조직화하고연결 Load Balancing Scheduling Service Discovery Container Orchestration Auto Scaling Self Healing 12
Scheduling/Self Healing 멀티호스트상의멀티컨테이너를배치 push search pull Image Registry push search push search pull pull Host #1 Host #2 Host #3 13
Service Discovery 컨테이너간연계자동화 연계 WAS Database Host #1 Host #2 Host #3 14
Load Balancing 컨테이너간부하분산자동화 Load Balancer Containers Containers Containers Host #1 Host #2 Host #3 15
Auto Scaling 컨테이너확장 / 축소자동화 Load Balancer Containers Containers Containers Containers Containers Host #1 Host #2 Host #3 16
Clustering WAS 컨테이너간 Session Clustering 자동화 Load Balancer WAS Clustering Containers Containers Containers Containers Containers Host #1 Host #2 Host #3 17
Container Management & Orchestration 2014.6 구글컨테이너관리프로젝트를오픈소스화 Red Hat 은 kubernetes 프로젝트에참여하고협업진행지속 de facto standard 18
kubernetes 고려사항 소스빌드, 컨테이너이미지생성자동화별도구성 컨테이너간네트워킹을위한 Network 별도구성 컨테이너이미지버전관리용 Registry 별도구성 Load Balancer 별도구성 WAS Clustering(Session Clustering) 기능미지원 H/W 확장시수동설치 / 구성 19
Red Hat OpenShift OCI 표준컨테이너기반컨테이너플랫폼 엔터프라이즈급 kubernetes 20
Red Hat OpenShift Products 21
Red Hat OpenShift Container Platform 3 개발및운영을위한다양한툴제공 (IDE, UX 등 ) Autoscaling 기능제공 다양한 application runtimes & services 제공 kubernetes 기반의컨테이너오케스트레이션및관리 OCI 표준컨테이너 컨테이너최적화 OS 기반 Red Hat Enterprise Linux (CC EAL4+ 인증 ) 22
OpenShift Container Platform Architecture Admin/Developer OpenShift CLI OpenShift Web Console End User Use Webpage Master Node Deployment Controller OpenShift API OpenShift Router Image Registry Build Controller OpenShift SDN OpenShift SVC OpenShift SDN Replication Controller Kubernetes API Container Container Container etcd DB Scheduler Kube Controller Kubelet Container Engine 23
OpenShift Container Platform 특장점 Bare-Metal, VM(vSphere, Hyper-V, RHEV 등 ), Public/Private IaaS 제약없이설치 Git 연동을통한소스 maven 자동컴파일및배포 Open vswitch를통한컨테이너 Network 자동구성 관리및모니터링을위한 Web Console, REST API 및 CLI 제공 소스버전관리용 Git, Docker 이미지버전관리용 Registry 제공 Router를통한자동부하분산 H/W 확장시 ANSIBLE을통한쉬운설치 / 구성 컨테이너자동확장 / 축소 (Autoscaling) JBoss EAP를통한 WAS 클러스터링 (Session Clustering) 기능제공 24
마이크로서비스아키텍처를위한 Cloud-Native 개발환경
소프트웨어개발은 경쟁을위한핵심 모든회사는소프트웨어회사이기도합니다 - 지난 30 년간 30 대혁신가운데 20 건은소프트웨어와관련이있었습니다 소프트웨어릴리즈에성공할수록경쟁능력이증가됩니다 - 소비자는소프트웨어의지속적인제공을기대합니다 - 품질을희생하지않으면서, 변화하는애플리케이션요구에신속하게대응할수록, 경쟁우위를확보할수있습니다
CHANGE IS ACCELERATING You already know that software is eating the world, this is how fast it s happening 27 Source: http://www.strategy-business.com/feature/software-as-a-catalyst?gko=7a1ae
소프트웨어개발방식이 변화하고있습니다 개발에대한전통적인접근법이무너지고있습니다 도구와환경을설정하는것은너무어렵고시간과비용이많이듭니다 개발자와운영자간에협업이없으면, 막대한비용이소요되는운영환경상의버그가발생합니다 전체프로젝트팀은가치와품질을지속적으로제공해야합니다
통상적인개발타임라인 Insight Planning Repo config CODE! CODE AGAIN! Deploy Scope Requisition Dev environment. Merge UA Testing Prod Issues 29
새롭고더나은방법이필요 통합된 Cloud-Native 개발환경으로이동 검증가능한환경을사용하여, App 를평가하고배포제어 분석적으로생성된 Insight 를사용하여위험완화 통합된 Cloud-Native 개발환경으로비즈니스민첩성및출시시간단축 값비싼프로덕션전용버그를예방하기위한개발환경과프로덕션환경간의차이점제거 개발자는필요할때필요한리소스를사용하고사용하지않을때는비용을절감 개발의모든단계에서 insight를통해위험을줄이고자신감을높임 30
Move to Cloud-Native IDE JBoss Developer Suite Red Hat Container Development Kit OpenJDK OpenShift.io The world is rapidly moving to a cloud+container+service model 31
What is OpenShift.io? Free online end-to-end development environment at openshift.io Provides planning tools, web-based IDE, integrated CI/CD and reporting 32
Red Hat OpenShift Application Runtimes (RHOAR) 지원가능한, 검증된 Microservice Architecture Application 런타임제공 Spring Boot WildFly Swarm (MicroProfile) Eclipse Vert.x Node.js 단순화된클라우드네이티브 App 개발 OpenShift 및 Middleware와응용프로그램런타임통합 손쉬운사용법제공 33
OpenShift.io 데모동영상 34
데브옵스환경구성을위한 CI/CD
OpenShift.io 아키텍처 Unified Console Unified View and Reports across all teams and projects APIs APIs APIs Plan and Track Create and Build Run and Monitor Analyze Hypothesize Che/JBDS Developer Workspace Testing Tools Prioritize Assign Work item Work item Work item Editors Bayesian - Predictive Analysis and Policy Enforcement Stacks Artifacts Container Container Container Git Repo OpenShift Pipelines APIs APIs APIs Backplane Services Communication, Events and Common Storage 36
Add to space 37
Technology Stack 38
Build Pipeline Strategy 39
GitHub/Jenkins 자동연계 40
자동생성된 Git Repository 41
Team 개발을위한 Fork 42
별도의 Pipeline 으로테스트 43
CI 를위한 Pull 요청 44
CI 를위한 Merge 45
CI/CD 데모동영상 46
컨테이너애플리케이션의 운영
통상의 WEB-WAS-DB 아키텍처 mod_jk plugin WAS #1 WAS #2 WEB #1 WAS #1 L4 VIP WEB #1 WEB #2 RoundRobin WEB #2 mod_jk plugin WAS #1 WAS #2 WAS #2 connection pool DB????????? WEB #3 WAS #3 48
자동확장 (Autoscaling) 적용전 관리자가서비스상태를모니터링한후, 수작업으로 WEB/WAS 서버를추가하고, 수작업으로 WEB/ WAS 설정을변경하여, 처리량을수작업으로조절하는방식 실사용자의요청 실사용자의요청 WEB/WAS 서버 WEB/WAS 서버 실사용자급증시 WEB/WAS 서버 WEB/WAS 서버 WEB/WAS 서버 수작업모니터링 관리자 수작업모니터링 관리자 1. WEB/WAS 서버 2. WEB/WAS 설정 모니터링, WEB/WAS 서버추가및 WEB/WAS 설정변경이이기때문에, 49
자동확장 (Autoscaling) 적용후 CPU 사용률임계치기준으로, 모니터링된 CPU 값에따라, 자동알고리즘에의해서, 자동으로필요한개수만큼 WEB/WAS 개수를늘이거나자동으로줄여서, 처리량을자동으로조절하는방식 실사용자의요청 실사용자의요청 WEB/WAS 서버 WEB/WAS 서버 CPU 임계치자동모니터링 실사용자급증시 WEB/WAS 서버 WEB/WAS 서버 CPU 임계치자동모니터링 WEB/WAS 서버 WEB/WAS 서버 1. WEB/WAS 서버 2. WEB/WAS 설정 모니터링프로세스 모니터링프로세스 모니터링, WEB/WAS 서버추가및 WEB/WAS 설정변경이이기때문에, 50
JBoss EAP Clustering on OpenShift JBoss EAP 컨테이너의기동위치에상관없이, 하나의서비스를제공하는 JBoss EAP 컨테이너는, 간단한옵션설정만으로 Session Clustering 이자동으로구성 Node Node Node 1 3 2 JBoss EAP 컨테이너 1 3 2 JBoss EAP 컨테이너 1 3 2 JBoss EAP 컨테이너 1 3 2 JBoss EAP 컨테이너 세션클러스터링자동구성 51
Autoscaling 데모동영상 52
감사합니다