以来download.microsoft.com/download/6/5/6/656f83af-406e-4eff...platform runtime application...

36

Upload: others

Post on 22-May-2020

29 views

Category:

Documents


0 download

TRANSCRIPT

2000以来, 52% 财富500强公司已经消失

企业如何在数字革命中生存?

• 创新的速度• 无间断的服务• 不断扩容的网站,移动为先

拆分应用,敏捷开发和部署1. 一系列的独立的服务共同组成系统2. 单独部署,跑在自己的进程里3. 每个服务为独立的业务开发4. 分布式的管理

微服务的优点1. 开发简单2. 技术栈灵活3. 服务独立, 按需扩展, 方便更新4. 高可用性

又快又好

开发交付

微服务的挑战

• 复杂的多服务运维• 复杂的分布系统部署• DevOps团队

• 系统集成测试• 性能监控

开源平台,准备好了吗?

• 服务间通信成本• 数据一致性

5

自动化架构和应用的构建和运维

敏捷开发,DevOps的支持端到端

混合云、多元云各大云平台无缝迁移

自动识别各类开发语言环境

各种渠道云服务的接口

Public

Private

建筑于各主流公有私有云平台

Microsoft Confidential

架构

应用客户端

IaaS 平台

弹性运行环境

云服务

系统运维

Azure PaaS

API

Bosh

Azure Resource

Manager

Azure CPI

Deploy &

Management

Build, Deployed, runs on CF

Applications

Cloud

FoundryAzure

Service

Brokers

云运用在Cloud Foundry平台上构建,发布

Cloud Foundry 在 Azure IaaS平台上运行

Bosh 部署,监控,和管理Cloud Foundry 的系统

Bosh 通过 CPI 使用和管理 Azure IaaS 的云资源

云运用通过 Service Broker 管理 Azure PaaS资源

Azure PaaS Azure IaaSAzure CPI 和 Service Broker 是Cloud

Foundry和云平台的接口

Cloud Foundry 如何为微服务买单?

Contract: 12 Factor Application

Contract: BOSH Release

6

Infrastructure Automation

A single deployment API for provisioning for bit-for-bit, consistent, self-

Ops healing deployments across any private or public cloud. BOSH

Platform RuntimeApplication container runtime with attachable backing services,

Dev Ops automated CI/CD, routing, health management and logging.

Application FrameworkLanguage framework for microservice-based architectures including Spring Spring

Dev components for service discovery, metrics and circuit breakers.

Cloud Foundry 如何为微服务买单?

6

Infrastructure Automation

A single deployment API for provisioning for bit-for-bit, consistent, self-

Ops healing deployments across any private or public cloud. BOSH

Platform RuntimeApplication container runtime with attachable backing services,

Dev Ops automated CI/CD, routing, health management and logging.

Application FrameworkLanguage framework for microservice-based architectures including Spring Spring

Dev components for service discovery, metrics and circuit breakers.

Bosh

Azure CPIDeploy &

Management

Azure Resource manager

Applications

Cloud FoundryAzureService Brokers

Azure PaaS API

CF Scale: 横向扩展

Developer

CF CLI

A

Azure PaaS Azure IaaS

使用CF CLI 部署,运维云应用

CF Push: 部署, 构建, 发布, 更新

CF Bind-Service: 绑定第三方云服务

CF logs, CF Events: 监控健康状态

> cf push <myapp>

上传文件到Cloud

Controller

调用 Buildpack

生成相应运行环境打包成 droplet

将 droplet 分配到container中

准备发布

设置 router 和load balancer

应用对外正式发布

Cloud Foundry 如何为微服务买单?

6

Infrastructure Automation

A single deployment API for provisioning for bit-for-bit, consistent, self-

Ops healing deployments across any private or public cloud. BOSH

Platform RuntimeApplication container runtime with attachable backing services,

Dev Ops automated CI/CD, routing, health management and logging.

Application FrameworkLanguage framework for microservice-based architectures including Spring Spring

Dev components for service discovery, metrics and circuit breakers.

Bosh

Azure CPIDeploy &

Management

Azure Resource manager

Applications

Cloud FoundryAzureService Brokers

Azure PaaS API

Developer

CF CLI Operator

Bosh CLI

A

Azure PaaS Azure IaaS

CF CLI, tools

使用 Bosh/CF CLI 运维 CF

• 部署和升级CF

• 高可用性配置

• 纵向扩展CF

• 管理用户和配置

• 监控CF健康状态

BOSH: 创建,管理,维护 CF 的工具

管理分布式软件系统的生命周期1. 打包2. 构建3. 监视4. 管理 (start/stop, scale, resurrect, …)

5. 更新

> bosh deploy

Bosh deploy 的背后发生的故事

Bosh CLI 发指令到 Bosh

Director

Bosh Director

通过云平台统一接口建立虚拟机

Bosh Director

为CF架构 分配VM

和相应配置/软件

可以是一个VM

或是几百个VM的cluster

可以是新建CF

或是更新CF

Bosh agent 根据Director的指示,BOSH

Director通过云平台统一接口创建虚拟机

平台 应用

构建 Bosh CLI

(bosh deploy…)

CF CLI

(cf push…)

监控 Bosh logs CF CLI, 第3方工具如Splunk, ELK, etc.

扩展 Bosh CLI

(bosh deploy…)

CF CLI

(cf scale)

更新 Rolling Upgrades

Zero Downtime

Blue/green

Zero Downtime

Docker(DIY) vs. PaaS

PaaS • 提供应用层管理操作• 隐藏了infrastructure层面的复杂度• 简化 Infrastructure和应用的构建管理• Container 仅仅是平台架构中的实现细节

Docker• 提供直接管理操作infrastructure的性能• Infrastructure 层面的Flexibility

• Infrastructure DIY带来复杂度• 用户直操作container

CF 应用支持:

Buildpacks

• Buidpack=运行环境 + 依赖的文件• App = 源代码+ Buildpack

• 运行命令: cf push myapp

Docker

• Docker 镜像=基础文件系统 + 进程+配置• 用户上传 Docker 镜像• 运行命令: cf push –o docker://myimagepath

支持 Open Container Initiative 容器• Linux

• Windows

兼容Docker 镜像 :

• Docker Hub

• 用户指定的Docker repository.

Cloud Foundry 如何为微服务买单?

6

Infrastructure Automation

A single deployment API for provisioning for bit-for-bit, consistent, self-

Ops healing deployments across any private or public cloud. BOSH

Platform RuntimeApplication container runtime with attachable backing services,

Dev Ops automated CI/CD, routing, health management and logging.

Application FrameworkLanguage framework for microservice-based architectures including Spring Spring

Dev components for service discovery, metrics and circuit breakers.

集中配置

服务发现

熔断机制

智能路由

Spring Cloud Service 集中配置服务

33

SSL, and OAuth2

安全保障

集中配置

Spring Cloud Service 注册发现

35

SSL, and OAuth2

安全保障

Spring Cloud 熔断机制

37

使用RabbitMQ service 追踪事件提供控制版面

Configuration

Repository

Product

Services

Customer

Services

#1

Other

Services

Customer

Services

#2

Employee

Services

Service Instances

Service Registry

(Directory)

Edge Server

Client

Request

Request

Config

Services

Config Server

Spring Boot / Cloud

Zuul Proxy

Eureka Server

• 基于Netflix OSS Spring Cloud

AEROSPACE

AUTOMOTIVE

IOT

HEALTHCARE

TECHNOLOGY

MEDIA

INSURANCE

RETAIL

FINANCAL

TELECOM

GOVERNMENT

Q4 2015 Q1 2016 Q2 2016 Q3 2016 Q4 2016

-OSS CF 正式发布-Upstream 到社区

企业级支持-高可用 HAProxy-Availably Set-性能/可靠性优化-Service Broker

PCF正式发布微软中国云支持Azure Stack支持Azure 深度整合- Azure AD- Azure MySQL, PostgreSQL 整合- OMS 整合

Cloud Foundry

• Java为主的开源语言支持• 强大的CF 社区• 混合云的支持(例如Azure + Open Stack)

• 严格的12-factors云原生应用实践• 灵活开放的第3方PaaS服务整合

Service Fabric

• .Net 为主的语言支持• 庞大的Window/.Net 的社区• 和Visual Studio的完美整合• Stateful 应用的支持• Azure原生服务,优化平台整合

Bosh

CF runtime and Marketplace

CF Garden container engine

Spring Cloud Service

Muti-Cloud, OSS community, open service model

https://github.com/cloudfoundry-incubator/bosh-azure-cpi-release/blob/master/docs/guidance.md

https://github.com/Azure/meta-azure-service-broker

GA support for Operations Manager on Azure,

Pivotal Cloud Foundry on Azure,

33

在 Pivotal Cloud Foundry on Azure上部署微服务应用

Appendix

Azure 中国官网 https://www.azure.cn/ 提供最新产品与解决方案信息, 技术文档,以及SDKs下载

Azure 镜像市场: https://market.azure.cn/

申请一元试用,即刻体验 Azure 服务:https://www.azure.cn/pricing/1rmb-trial-full/

Microsoft 云科技公众号 Azure 云助手手机 App

Azure 应用程序开发说明 https://www.azure.cn/dev-notes/ 概述了海外与中国区服务开发人员需要注意的区别

传统IT平台 IAAS

虚拟平台

操作系统

数据库

网站服务器

消息服务

你的应用

物理机数据库

网站服务

消息服务

你的应用

IAAS

你的应用

PAAS

虚拟平台架构

PAAS