pcf architecture

91
BUILT FOR THE SPEED OF BUSINESS

Upload: seungdon-choi

Post on 23-Jun-2015

1.398 views

Category:

Software


7 download

DESCRIPTION

Pivotal CF 의 간략한 구조와 용어에 대한 설명 자료입니다.

TRANSCRIPT

Page 1: PCF Architecture

BUILT FOR THE SPEED OF BUSINESS

Page 2: PCF Architecture

2© Copyright 2013 Pivotal. All rights reserved. 2© Copyright 2013 Pivotal. All rights reserved.

Pivotal CF Architecture

Key Terminology, Architecture

Pivotal Korea, 2014

Page 3: PCF Architecture

3© Copyright 2013 Pivotal. All rights reserved.

목차

• PCF Key Concept• PCF Components• Elastic Runtime Architecture• PCF Differentiator

Page 4: PCF Architecture

4© Copyright 2013 Pivotal. All rights reserved.

PCF 용어집• Applications• Buildpacks• Manifests• Organizations• Spaces• Users and Roles• Domains• Routes• Services

Page 5: PCF Architecture

5© Copyright 2013 Pivotal. All rights reserved.

PCF Key ConceptsApplication, Buildpack, Manifest

Page 6: PCF Architecture

6© Copyright 2013 Pivotal. All rights reserved.

Cloud Foundry Platform as a Service

• Application : Deploy 의 단위– VM,middleware,Container,Process 의 추상화– Data as a Service– Provision 하고 배포하는 bottleneck 을 제거– PaaS 는 Application 을 효과적으로 배포하기 위해 존재 – 개발자는 app 에만 집중하고 runtime 환경이나 service,Infra

는 신경쓰지 않도록 설계

Page 7: PCF Architecture

7© Copyright 2013 Pivotal. All rights reserved.

VM 중심 배포에서 Application 중심 배포로

Page 8: PCF Architecture

8© Copyright 2013 Pivotal. All rights reserved.

IaaS: VM 이 배포의 단위

Scale Out: VM 의 신규 생성 혹은 Template 을 통한 생성

Page 9: PCF Architecture

9© Copyright 2013 Pivotal. All rights reserved.

PaaS: Application 중심의 배포

Scale Out: VM pool 내에 Container 를 생성

Page 10: PCF Architecture

10© Copyright 2013 Pivotal. All rights reserved.

Cloud 환경상에서 Application 의 Deploy

다양한 Application Source Code , Framework

Java/Spring, Ruby/Rails, Java Script for Node.js …

Cloud Foundry 상에서는 모두 수행이 가능

How?

Cloud Foundry is Development Agostic

Page 11: PCF Architecture

11© Copyright 2013 Pivotal. All rights reserved.

개발자에게 필요한 개발환경 제공 = 운영비용 , Time To Market Server Configuration

OS

Software Runtime(Java,Ruby,Python…)

Container(Tomcat for JAVA, Apache HTTPD for PHP..)

Framework(APM tool..)

Application Binary

자동화된 Script 의 필요

Page 12: PCF Architecture

12© Copyright 2013 Pivotal. All rights reserved.

CF 상에서 수행될 수 있는 개발환경 생성을 위한 자동화된 Script Buildpack

Runtime, Container, Framework 과 개발 Application 을 Droplet 에 올리기 위한 script 의 조합

Droplet 은 Warden Container 상에서 구동 .

Warden Container 는 DEA 상에서 구동 .

Page 13: PCF Architecture

13© Copyright 2013 Pivotal. All rights reserved.

= Application StagingBuildpack “builds” the “droplet” to run an app. Buildpack 은 특정 application 을 수행하기 위한 droplet

을 어떻게 조합하는지를 정의

Page 14: PCF Architecture

14© Copyright 2013 Pivotal. All rights reserved.

일반적으로 ruby script 로 작성되며 3 개 파트로 구성 .Buildpack 구조

Detect : 해당 buildpack 이 적용되어야 하는지 결정 Compile: application 의 필요에 따라 code 와

runtime, framework, plugin 등과 같이 compile 함 Release: assign 된 DEA 들에 application 들을

deploy

Page 15: PCF Architecture

15© Copyright 2013 Pivotal. All rights reserved.

Deploying CF

Page 16: PCF Architecture

16© Copyright 2013 Pivotal. All rights reserved.

Staging

Buildpack 은 application 을 위한 machine image 를 준비함

Page 17: PCF Architecture

17© Copyright 2013 Pivotal. All rights reserved.

가용한 Buildpack

Buildpack 은 CF 에 설치되거나 , push 시 외부에서 load 됨

PCF/CF Community 에서 제공된 buildpack 을 사용 , 혹은 custom buildpack 을 작성해서 사용

Page 18: PCF Architecture

18© Copyright 2013 Pivotal. All rights reserved.

Heroku 및 기타 PaaS 의 buildpack 과 호환됨 . External Buildpack

Page 19: PCF Architecture

19© Copyright 2013 Pivotal. All rights reserved.

Buildpack

Runtimes FrameworksContainers

Page 20: PCF Architecture

20© Copyright 2013 Pivotal. All rights reserved.

Manifest

Application 배포의 “ Blueprint”

배포의 옵션 정보들을 기입 Yaml 형식으로 작성되며

App Push 시 참조됨

Page 21: PCF Architecture

21© Copyright 2013 Pivotal. All rights reserved.

PCF Key ConceptsOrganization, Space, User, Role

Page 22: PCF Architecture

22© Copyright 2013 Pivotal. All rights reserved.

Organization

• 최상위 관리 단위• 일반적으로 회사 , 부서 ,App Suite,

큰 프로젝 단위로 생성• 1 개 이상의 Domain 정의 가능• Quota 지정으로 resource 통제

Page 23: PCF Architecture

23© Copyright 2013 Pivotal. All rights reserved.

Space

• Organization 은 여러개의 space 를 생성• 예 : 개발 , staging, QA, 운영계• 유저가 추가적으로 space 생성 • Application 은 Space 내에서 수행 및 Scale In-Out

가능

Page 24: PCF Architecture

24© Copyright 2013 Pivotal. All rights reserved.

User and Role

• User = Organization 의 멤버• Role = Domain 과 Space 에 대한 접근 권한 제어 어떤 유저가 Route 관리

Application Deployadd/bind/remove service 권한이 있는지 관리

Page 25: PCF Architecture

25© Copyright 2013 Pivotal. All rights reserved.

Role 의 종류• Organization Role

– Organization Manager : user 초대 / 관리 , plan 선택 / 변경 , 사용량 조정– Organization Auditor : 모든 org/space 접근 정보 / 셋팅 ,report 에 대한

조회

• Application Space Role – Space Manager : user 초대 / 관리 , 해당 space 에 대한 기능 관리– Space Developer : application,service 생성 / 삭제 / 관리 , report,log 에 대한

조회 권한 – Space Auditor : space 에 대한 셋팅정보 ,report,log 에 대한 조회권한

Page 26: PCF Architecture

26© Copyright 2013 Pivotal. All rights reserved.

PCF Key ConceptsDomain, Route

Page 27: PCF Architecture

27© Copyright 2013 Pivotal. All rights reserved.

Domain

• Deploy 된 Application 은 URL 을 가짐• Cloud Foundry Instance 는 Default Domain 을 가짐

(pcf.open-paas.com)• Custom Domain 을 추가해서 CF 에서 관리 가능• Subdomain: Application 은 Unique 한 Sub-domain 을

가짐– Application URL: subdomain.domain– 예 : http://myapp.pcf.open-paas.com

Page 28: PCF Architecture

28© Copyright 2013 Pivotal. All rights reserved.

Route

• Application 의 접근 방법– 모든 space 의 각 Application 은 Unique 한 Route 를 가짐– CF 는 load-balance 를 사용하여 incoming request 를 알맞은

application 으로 route 시킴• 동일한 Application 이 여러 space 에 mapping 가능

– 예 : dev space route: http://myapptest.pcf.open-paas.com– prod space route : http://myapp.pcf.open-paas.com

Page 29: PCF Architecture

29© Copyright 2013 Pivotal. All rights reserved.

PCF Key ConceptsService

Page 30: PCF Architecture

30© Copyright 2013 Pivotal. All rights reserved.

What is Service?Cloud Foundry Service

외부의 application dependency 혹은 component Database Message Queue Monitoring App Hadoop Instance Security 일반적인 Service Endpoint(Web Service) Other dependent applications

Page 31: PCF Architecture

31© Copyright 2013 Pivotal. All rights reserved.

Feature & FunctionalityCloud Foundry Service

Provide Functionality to your applications

Application 의 외부에 존재 – add-on provisioned aloneside an application

여러 application 에서 공유되어 사용 가능 (DB, Message Queue)

Application 에 binding – Service Broker 를 이용 Application 에 환경변수를 이용하여 접속정보를 제공

(VCAP_SERVICES)

Page 32: PCF Architecture

32© Copyright 2013 Pivotal. All rights reserved.

Why use Service?Clound Foundry Service

Application 은 deploy 의 단위모든 application 은 self-contained 이여야 하며 , 나머지 모두는 PaaS에서 제공되어야 함 : Service

Service in a PaaS

과금이 될 수 있는 단위 (IaaS 에서 H/W 자원과는 상반됨 )

Page 33: PCF Architecture

33© Copyright 2013 Pivotal. All rights reserved.

Service Type

Marketplace Service– PCF 설치후 곧장 이용할 수 있는 서비스들– Marketplace catalog 에서 이용– PaaS 에 instance 가 생성됨

User Defined Service– 외부의 서비스를 Cloud Foundry 에서 이용– Connection 정보를 저장하여 연결시 사용

Custom Built Service

Page 34: PCF Architecture

34© Copyright 2013 Pivotal. All rights reserved.

Marketplace Service

Easily available via Marketplace Allow you to sign-up,

select plans, etc Once bound to application,

can be used easily

2014 년 4 월기준 provider list

Page 35: PCF Architecture

35© Copyright 2013 Pivotal. All rights reserved.

Standard out-of-box service : 계속 추가되고 있음Pivotal CF Service

Page 36: PCF Architecture

36© Copyright 2013 Pivotal. All rights reserved.

PCF ComponentsOps Manager, Elastic Runtime..

Page 37: PCF Architecture

37© Copyright 2013 Pivotal. All rights reserved.

Operations Manager 업계 최초의 IaaS 와 통합된 PaaS 운영

관리 UI

Ops Manager=the core orchestrating component.

VM 들의 생성 , deployment, 기타 PCF software 와 service 들의 lifecycle 관리 .

PaaS 셋업과 운영 툴 제공

Application Downtime 없이 Live Update 제공

Ops Manager Web Console

Page 38: PCF Architecture

38© Copyright 2013 Pivotal. All rights reserved.

Elastic Runtime

Scalable Runtime Environment

Cloud Foundry itself

Application 의 Runtime 환경관리

Buildpack

Component 별 Sizing / 환경 설정

Ops Manager 를 사용해 IaaS 관리통제

Page 39: PCF Architecture

39© Copyright 2013 Pivotal. All rights reserved.

Pivotal Services

PCF 는 PHD, RabbitMQ, MySQL Dev 등의 Data Service 를 제공

서비스들은 Message Broker 를 통해 Application 에 연결되고 Binding

Page 40: PCF Architecture

40© Copyright 2013 Pivotal. All rights reserved.

Pivotal CF Architecture

Ops Manager UI

Ops Manager DirectorOperations Manager

Service

Service Broker

Service Nodes

Service Broker

Service Nodes

Service

App Log Aggregator

Login Server

Dynamic Router

Cloud Controller

UAA

Health Manager

DEA Pool

Messaging (NATS)

Apps

Metrics Collection

Apps

HA Proxy LB

Elastic Runtime

Page 41: PCF Architecture

41© Copyright 2013 Pivotal. All rights reserved.

Architectural Components

Page 42: PCF Architecture

42© Copyright 2013 Pivotal. All rights reserved.

Cloud Foundry Architecture• The Cloud Foundry platform

Architecture = 대형 분산 서비스 처리 아키텍쳐의 표준

• Cloud Foundry Bosh 를 사용하여 기반 IaaS 를 관리 및 통제함 (e.g., VMware, Amazon AWS, OpenStack)

UnderlyingInfrastructure

BOSH

Page 43: PCF Architecture

43© Copyright 2013 Pivotal. All rights reserved.

• BOSH = 대형 분산 시스템을 대상으로 한 배포 , lifecycle 관리하기 위한 공개 S/W

• PCF 는 BOSH 를 사용하여 Application Provisioning 및 infra 제어 등을 수행함 .

• Cloud Foundry 관리및 배포를 위해 개발되었으나 일반적인 분산 시스템에서도 사용 가능

How It Works:• VM 생성과 관리 • Continuous and predictive

updates with minimal downtime• BOSH 는 CPI (Cloud Provider

Interface) 를 사용하여 vSphere, vCloud Director, Amazon Web Services EC2, OpenStack 등과 같은 IaaS provider 상에 service를 deploy 할 수 있음 .

• Pivotal CF Operations Manager 가 Bosh 를 사용함 . 직접적으로 access 할 필요가 없음

Responsible For:

BOSH

Page 44: PCF Architecture

44© Copyright 2013 Pivotal. All rights reserved.

BOSH : 분산시스템 관리 BOSH 를 통해 Application 을 Provisioning 하고 인프라는 제어하는 등의

다양한 기능을 수행 . 구성요소 설명

CLI BOSH 와의 Interaction 을 위한 Command Line Interface

Director VM 생성 , Application Deployment, 기타 Lifercycle 을 관리하는 BOSH 의 core orchestrating component

CPI 개별 IaaS 를 추상화 시킨 표준적 BOSH Engine

Blobstore BOSH 가 수행하는 Release, Job, Package 의 Content 가 저장되는 공간

Agent Director 로부터 명령을 받아 개별 작업을 수행하는 , 모든 VM 에 설치된 Agent

Stemcell 내장된 Agent 를 포함한 VM Template

Health Monitor Agent 를 통해 개별 VM 의 상태를 체크하고 , 이상 발견 시 조치하는 요소

NATS Lightweight Pub/Sub, Distributed Queuing Messaging System

Page 45: PCF Architecture

45© Copyright 2013 Pivotal. All rights reserved.

BOSH Modules

Page 46: PCF Architecture

46© Copyright 2013 Pivotal. All rights reserved.

PCF Architecture 의 특징 Loosely Coupled 된 독립적인

System Component 들로 구성

표준적 Communication Model, 쉽게 측정되고 진단 가능

Blocking 을 유발하지 않는 Event-Driven Interaction 모델

특정 Operation 에 의한 전체 시스템 성능저하 방지 (Consistent)

자동 Restart 가 가능한 내부 Watchdog 에 의한 지속적 Health Checks

No single point of failure

모든 명령과 제어가 Message 기반으로 동작

언어 독립적 Communication

Application Load/Traffic 에 대해 신속한 수평적 확장성 보장

공유 인프라에 대한 Resource Pooling

Application 은 분리된 안전한 영역의 Container 에서 실행

개별 사용자 / 그룹에 다른 레벨의 Security Role 을 제공하는 Organizations & Spaces (CF

Command)

Idempotent Asynchronous

Self Healing

Message Based

Scalable

Secure

Page 47: PCF Architecture

47© Copyright 2013 Pivotal. All rights reserved.

Pivotal CF Elastic Runtime Architecture

Page 48: PCF Architecture

48© Copyright 2013 Pivotal. All rights reserved.

HA Proxy

DEA DEA DEA

Router

Access A

pp

Pivotal CF Elastic Runtime (PaaS)

Router Router

DNS

HA Proxy

myapp.<mycfdomain.com>

Resolve app and system domain names to HA Proxy IP

Software single-instance LB, for non-production purposes

Page 49: PCF Architecture

49© Copyright 2013 Pivotal. All rights reserved.

Load Balancer

External Load Balancer(HA Proxy 대신 사용 가능 )

DEA DEA DEA

Router

Access A

pp

Pivotal CF Elastic Runtime (PaaS)

Router Router

DNS

Load Balancer

myapp.<mycfdomain.com>

Resolve app and system domain names to LB IPExternal LB, usually

hardware-based (F5 or similar)

Page 50: PCF Architecture

51© Copyright 2013 Pivotal. All rights reserved.

• PCF 의 모든 유입 HTTP traffic 을 다른 component 로 Route함

System traffic(cf command) Application traffic

• 각각의 load balance 된 app instance 용 dynamic routing table 를 관리함

• 여러 개의 router 를 사용 가능

How It Works:• Load balancing• Maintaining an active routing table• Access logs• Supports web-sockets

Responsible For:

Router

Page 51: PCF Architecture

52© Copyright 2013 Pivotal. All rights reserved.

• Client Interface(CF CLI,WebUI,STS등 ), Account 및 Provisioning Control 등의 명령어 및 Control System 등을 관리

• Domain Object(apps, services, organizations, spaces, service instances, user roles, and more) 와 통신하기 위한 RESTful interface 를 제공함 .

How It Works:• Expected App state, state transitions,

and desired convergence• Permissions/Auth• Orgs/Spaces/Users • Services management• App placement• Blob storage

Responsible For:

Cloud Controller

Page 52: PCF Architecture

53© Copyright 2013 Pivotal. All rights reserved.

“User Authorization and Authentication”

identity, security and authorization services 를 제공It manages 3rd party Oauth 2.0 access credentials and can provide application access and identity-as-a-service for apps running on Cloud Foundry. Composed of: UAA Server, Command Line Interface, Library.

How It Works:• Token Server• ID Server (User

management)• OAuth Scopes (Groups) and

SCIM• Login Server

• UAA Database• SAML support (for SSO

integration) and Active Directory support with the VMWare SSO Appliance

• Access auditing

Responsible For:

UAA and Login Servers

Page 53: PCF Architecture

54© Copyright 2013 Pivotal. All rights reserved.

• Cloud Controller 에서 발행되는 Expected State 와 각 DEA 에서 발행되는 Actual State 를 NATS message bus 를 통해 전달받아서 , 이를 비교함

• 문제가 있을 경우 ( 상태값이 상이한 경우 ) 이를 Cloud Controller 에게 전달함 .

How It Works:• Maintains the actual state of apps• Compares to expected state• Sends suggestions to make actual

match expected (cannot make state changes itself – only CC can do that!)

Responsible For:

Health Manager

Page 54: PCF Architecture

55© Copyright 2013 Pivotal. All rights reserved.

• “Droplet Execution Agents” 의 약자 . are secure and fully isolated containers.

• DEA 는 Apps 의 lifecycle 을 관리함 : building, starting and stopping Apps as instructed.

• 주기적으로 현재 DEA 의 상태(state) 값을 NATS message bus 를 통해 broadcasting 함

How It Works:• Linux containers (Warden)

관리• Resource pools 모니터링

• Process• File system• Network• Memory

• App lifecycle 을 관리• App log and file streaming

처리• DEA heartbeats (NATS to CC,

HM)

Responsible For:

DEA

Page 55: PCF Architecture

56© Copyright 2013 Pivotal. All rights reserved.

• Publish-Subscribe 메커니즘을 통해 CF 시스템의 각 component 간의 통신을 가능케 하는 Fast internal messaging bus

How It Works:

• Non-Persistent messaging• Pub/Sub• Queues (app events)

Responsible For:

Messaging (NATS)

Page 56: PCF Architecture

57© Copyright 2013 Pivotal. All rights reserved.

• Native(Managed Service) 혹은 3rd party service 를 위한 interface 를 제공

• Service processes run on Service Nodes or with external as-a-service providers (e.g., email, database, messaging, etc.).

How It Works:• Advertising service catalog• Makes create/delete/bind/unbind calls

to service nodes• Requests inventory of existing

instances and bindings from cloud controller for caching, orphan management

• SaaS marketplace gateway

Responsible For:

Service Broker

Page 57: PCF Architecture

58© Copyright 2013 Pivotal. All rights reserved.

Service Broker 내에 meta data 를 저장하여 , Cloud Foundry 가 외부의 CF에서 관리되지 않는 서비스 ( 예 : OracleDB,DB2,SQLServer 등 ..) 에 연결될 수 있게 함 .

How It Works:• Metadata management

Responsible For:

User Provided Service Instances

Page 58: PCF Architecture

59© Copyright 2013 Pivotal. All rights reserved.

User Provided Service Instances and Service Brokers

Custom Service Broker

Service Broker

Service Broker

IBM DB2ORACLE

DB

CF MySQL

MYSQL DBAnother ServiceMongo

Lab

Send Grid

3rd Party Provider (e.g.

AppDirect)

ClearDB

INT

ER

NE

T

Synchronous

Synchronous Synchronous

UP

SI S

ervi

ceC

onne

ctor

UP

SI S

ervi

ceC

onne

ctor

Page 59: PCF Architecture

60© Copyright 2013 Pivotal. All rights reserved.

Creating and Binding a Service Developer

Rout

er Cloud FoundryRuntime (PaaS)

DBServicecredentials

reserve resourcescreate service (HTTP) create service (HTTP)

bind service (HTTP)bind service (HTTP) obtain connection data

CLI Cloud Controller

ServiceBroker

DataService

Page 60: PCF Architecture

61© Copyright 2013 Pivotal. All rights reserved.

PCF 구성 요소 Component 설명 Implementation

Router Incoming Traffic 을 적절한 CF Component 로 Routing GoRouter

Authentication Identity Management Service UAA

Cloud Controller Application Lifecycle 관리 CCNG, CC_DB, Blob Store

Health Manager Application Monitoring, Cloud Controller 제어 HM9000

Application Execution Warden Container 포함 , Application Instance 관리 DEA

Blob Store Application Code, Buildpacks, Droplets 저장

Buildpacks 언어 / 프레임워크을 Detect 하고 소스코드를 실행파일로 Compile, DEA 로 Release

Ruby/Java/Node 등

Service Broker Application 이 필요로 하는 Database 등의 Service 의 In-stance 를 제공

MySQL 등

Message Bus 내부 Component 간 통신을 위한 lightweight publish-sub-scribe and distributed queueing messaging system

NATS

BOSH release engineering, deployment and lifecycle manage-ment of large scale distributed services

Agent, Director, CPI, Name Server, etc

Page 61: PCF Architecture

62© Copyright 2013 Pivotal. All rights reserved.

Pivotal CF Elastic Runtime 상의 App Deploy

① Upload app bits and metadata

p u s h a p p

push app

Route

r

② Create and bind services

③ Stage application

④ Deploy application

⑤ Manage application health

Blobstore DB

Cloud Controller

Service Broker Node(s)

DEADEA

DEADEA

+ app M D

+ app MD

+ =

Servicecredentials

Pivotal CF Elastic

Runtime (PaaS)

Page 62: PCF Architecture

63© Copyright 2013 Pivotal. All rights reserved.

Application Access

• Deploy 된 Application 는 DEA(Droplet Execution Agent) 의 Container 에서 서비스

• Application 사용자는 Router 를 통해 DEA 로 접근하며 , 접근경로 (Routing 정보 ) 는 NATS Message Bus 를 통해지속적으로 최신 정보로 Update 됨

Page 63: PCF Architecture

64© Copyright 2013 Pivotal. All rights reserved.

Message Bus

Operations Manager: Behind the Scenes (BOSH)

IaaSPivotal CF Operations Manager Director

DB

BOSH Director

Blobs

Health MonitorDeployment

• Packages• Jobs• Blobs• Source• Manifest

Deploy my Services

Worker VMs

Messaging

Target VMHealth Manager

Target VMCloud Controller

Target VM

Page 64: PCF Architecture

65© Copyright 2013 Pivotal. All rights reserved.

Load Balancer

Router

Access

Pivotal CF Elastic

Runtime

Router Router

DNS

Load Balancer

Resolve app and system domain names to LB IPExternal LB, hardware

based (F5 or similar)

myapp.<mycfdomain.com>api.<mycfdomain.com>

console.<mycfdomain.com>

Monitoring Tool

JMX

Enterprise Log Mgr (e.g. Splunk)

DEADEADEA

Cloud ControllerCloud Controller

Health Manager

NATSService Broker

Service Broker

HTTP

UAA/Login Server

Service Broker

Git repository

TCP

Monitoring of platform components health and KPIs

Aggregation, storage, filtering and analytics on system and app logs

Versioning /configuration mgmt of buildpacks and apps

HTTP

Custom Service lifecycle management and binding

Collector

Loggregator

JMX Provider

Page 65: PCF Architecture

66© Copyright 2013 Pivotal. All rights reserved.

PCF High Availability

Page 66: PCF Architecture

67Pivotal Confidential–Internal Use Only

4 Levels of HA in PCF

Elastic Runtime (ERS): Distribution across availability

zones Application health management

and recovery

BOSH (cluster management): Process monitoring, recovery and

alerting Virtual machine health monitoring,

recovery and alerting

Page 67: PCF Architecture

68© Copyright 2013 Pivotal. All rights reserved.

DEAsAZ1

Chassi_1 Chassi_2 Chassi_3

AZ2 AZ3 AZ4 AZ5 Availability Zones

api.pcf.com

App

• Application Instance 를 분리된 각 Hardware 에 deploy 하여 가용성을 보장함 .

• 최대 50% 까지의 H/W failure 시에도 downtime 없이 서비스 가능

• 여러 data center 에 쉽게 deploy 가능

1. ERS: Availability Zones

Page 68: PCF Architecture

69© Copyright 2013 Pivotal. All rights reserved.

Application Instances and Availability Zones

Rout

erDEA

DEA

DEA

Cloud Foundry Elastic Runtime

DEA

DEA

DEA

Zone 1 Zone 2

App Ops

Page 69: PCF Architecture

70© Copyright 2013 Pivotal. All rights reserved.

Application Instances and Availability Zones

Rout

erDEA

DEA

DEA

Cloud Foundry Elastic Runtime

DEA

DEA

DEA

Zone 1 Zone 2 Application instances are evenly distributed over two availability zones.

App Ops

Page 70: PCF Architecture

71© Copyright 2013 Pivotal. All rights reserved.

Application Instances and Availability Zones

Rout

erDEA

DEA

DEA

Cloud Foundry Elastic Runtime

DEA

DEA

DEA

Zone 1 Zone 2 Application instances are evenly distributed over two availability zones.

Loosing an AZ keeps instances running and available.

App Ops

Page 71: PCF Architecture

72Pivotal Confidential–Internal Use Only

2. Application Instance

The Health Manager is essential to ensuring that apps running on Cloud Foundry remain available.

– Application 의 상태 state (e.g. running, stopped, crashed, etc.) 및 버전 , instance 수를 모니터링

– Determine applications' expected state, version, and number of instances.

– Reconcile the actual state of applications with their expected state. – Application 상태 불안정시 Cloud Controller 에게 수정작업을 지시

Page 72: PCF Architecture

73Pivotal Confidential–Internal Use Only

Rout

er

Failed Application Instances Replaced

BlobstoreCloud Controller

Health Manager

Messaging(NATS)

DEA DEA DEA

App Ops

Cloud Foundry Elastic Runtime

Page 73: PCF Architecture

74Pivotal Confidential–Internal Use Only

Rout

er

Failed Application Instances Replaced

BlobstoreCloud Controller

Health Manager

Actual State

Messaging(NATS)

DEA DEA DEA

App Ops

Cloud Foundry Elastic Runtime

Page 74: PCF Architecture

75Pivotal Confidential–Internal Use Only

Rout

er

Failed Application Instances Replaced

BlobstoreCloud Controller

Health Manager

Actual StateDesired State

Messaging(NATS)

DEA DEA DEA

App Ops

Cloud Foundry Elastic Runtime

Page 75: PCF Architecture

76Pivotal Confidential–Internal Use Only

Rout

er

Failed Application Instances Replaced

BlobstoreCloud Controller

Health Manager

Actual StateDesired State

Messaging(NATS)

DEA DEA DEA

App Ops

Cloud Foundry Elastic Runtime

Page 76: PCF Architecture

77Pivotal Confidential–Internal Use Only

Rout

er

Failed Application Instances Replaced

BlobstoreCloud Controller

Health Manager

Actual StateDesired State

Messaging(NATS)

DEA DEA DEA

App Ops

Cloud Foundry Elastic Runtime

Page 77: PCF Architecture

78© Copyright 2013 Pivotal. All rights reserved.

3. Platform processes DBBlob Store

Worker NATSHealth Monitor

CPI

DirectorCLI

Inner shell

Outer shellAgents

Health Monitor

Health Monitor 는 Agent 를 통해 받는 상태값과 lifecycle event 를 받으며 ,운영자에게 notification plugin( 예 : email)을 통해 alert 을 보낼 수 있습니다 .

Page 78: PCF Architecture

79© Copyright 2013 Pivotal. All rights reserved.

Message Bus

ERS Processes are Monitored

IaaSCloud Foundry BOSH

Health Monitor Health Manager

DEA

Cloud Controller

A

A

A

Responders:

pager

email

monitoring

PaaS Ops

Page 79: PCF Architecture

80© Copyright 2013 Pivotal. All rights reserved.

Message Bus

ERS Processes are Monitored

IaaSCloud Foundry BOSH

Health Monitor Health Manager

DEA

Cloud Controller

A

A

A

Responders:

pager

email

monitoring

PaaS Ops

Page 80: PCF Architecture

81© Copyright 2013 Pivotal. All rights reserved.

Message Bus

ERS Processes are Monitored

IaaSCloud Foundry BOSH

Health Monitor Health Manager

DEA

Cloud Controller

A

A

A

Responders:

pager

email

monitoring

PaaS Ops

Page 81: PCF Architecture

82© Copyright 2013 Pivotal. All rights reserved.

4. VM Monitoring: Health Monitor & Resurrector

• Health Monitor 는 BOSH Agent 를 통해 들어오는 상태값과 lifecycle event 를 사용하여 VM 들의 health 상태를 check 합니다 . Health Monitor 가 VM 의 이상 감지시 notification plugin 를 통해 alert 을 보내던지 , BOSH Resurrector 를 trigger 할 수 있습니다 .

• Enable 시 BOSH Resurrector plugin 는 자동으로 Health Monitor 에 의해서 멈추거나 응답하지 않는 VM 들을 재생성합니다 .

NATSHealth Monitor

Agents

Ressurector✔

Re-create VMs

Page 82: PCF Architecture

83© Copyright 2013 Pivotal. All rights reserved.

Message Bus

VMs are Monitored

IaaS

Health Monitor Health Manager

Cloud Controller

A

DEA

A

A

Responders:

pager

email

monitoring

resurrector

BOSH Director

Actual State

DEA

A

PaaS Ops

Cloud Foundry BOSH

Page 83: PCF Architecture

84© Copyright 2013 Pivotal. All rights reserved.

Message Bus

VMs are Monitored

IaaS

Health Monitor Health Manager

Cloud Controller

A

DEA

A

A

Responders:

pager

email

monitoring

resurrector

BOSH Director

Actual State

DEA

A

PaaS Ops

Cloud Foundry BOSH

Desired State

Page 84: PCF Architecture

85© Copyright 2013 Pivotal. All rights reserved.

Message Bus

VMs are Monitored

IaaS

Health Monitor Health Manager

Cloud Controller

A

DEA

A

A

Responders:

pager

email

monitoring

resurrector

BOSH Director

Actual StateDesired State

PaaS Ops

Cloud Foundry BOSH

Page 85: PCF Architecture

86© Copyright 2013 Pivotal. All rights reserved.

Message Bus

VMs are Monitored

IaaS

Health Monitor Health Manager

Cloud Controller

A

A

Responders:

pager

email

monitoring

resurrector

BOSH Director (CP

I)Actual StateDesired State

DEA

A

PaaS Ops

Cloud Foundry BOSH

Page 86: PCF Architecture

87© Copyright 2013 Pivotal. All rights reserved.

Summary

Page 87: PCF Architecture

88© Copyright 2013 Pivotal. All rights reserved.

Cloud Foundry Project

Open Source

MicroClouds

PrivateClouds

PublicClouds

CUSTOM SERVICES

http://www.cloudfoundry.org

Page 88: PCF Architecture

89© Copyright 2013 Pivotal. All rights reserved.

Abstracting and StandardizeRuntime/Frameworks

Buildpacks Service Brokers

… and Custom Runtimes … and Custom Services

Cloud Provider Interface (CPI)

App ServicesClouds

… and Custom Clouds

Open Source

Page 89: PCF Architecture

90© Copyright 2013 Pivotal. All rights reserved.

References• Cloud Foundry

• http://www.cloudfoundry.org• http://network.pivotal.io/• http://run.pivotal.io

• Installing CF on vSphere• http://www.youtube.com/watch?v=TLhST6Hmiso

• Cloud Foundry demo• http://www.youtube.com/watch?v=PFZPCwH_OcM

• Pivotal Academy(free e-training materials!)• http://pivotal.biglms.com

Page 90: PCF Architecture

BUILT FOR THE SPEED OF BUSINESS

Page 91: PCF Architecture

92Pivotal Confidential–Internal Use Only

Appendix: CF 대비 PCF 추가 기능

BOSH

Ops

M

anag

erW

eb C

onso

le

Ela

stic

Run

time

Dat

a S

ervi

ces

Cor

e C

loud

Fou

ndry

C

omp

onen

ts

Mes

sagi

ng S

ervi

ces

Mob

ile S

ervi

ces

Piv

otal

Sup

por

t

OSS Cloud Foundry 에 기업용 PaaS 를 위한 Built-in 기능 추가

PCF Add Value