`

BOSH的组成

阅读更多

原文:http://docs.cloudfoundry.com/docs/running/bosh/

BOSH用于发布,部署,及大规模分布式服务对象的生命周期管理,它可用于部署CF,也可以将其它分布式服务(?PaaS)部署到IaaS(VMware vSphere,vCloud Director,Amazon Web Services EC2,OpenStack)上。

下面针对它的架构,拓扑结构,配置及使用,以及部署过程中的结构与约定。

BOSH Components(BOSH的组成部分)

 

 Director

The Director is the core orchestrating(协调) component in BOSH. 

It controls creation of VMs, deployment, and other life cycle events of software and services. 

Command and control is handed over to the the Director-Agent interaction after the CPI(CF提供的操作IaaS的接口 ) has created resources.

--管理VM的创建与服务的生命周期,它通过Director-Agent执行这些命令。

下面展示具体工作的负责子模块,它们被一个叫做ApiController的实例引用着。

Deployment Manager

Responsible for creating, updating, and deleting the deployments that are specified in the deployment file. Endpoints and Http Method type exposed by the director that are used to access the Deployment Manager are described below.(下面是提供的REST接入点)

URL HTTP METHOD TYPE DESCRIPTION
/deployments POST  
/deployments/:deployment/jobs/:job PUT Change the state of a job in a deployment based on the parameter
/deployments/:deployment/jobs/:job/:index/logs GET Get logs of a particular job in a deployment
/deployments/:name DELETE Delete a deployment

 

Instance Manager

 

Instance Manager helps manage VM instances that are created using Bosh deployments.

 

It helps connect to the VM instance through an Agent Client using ssh, finds an instance, and fetches the log from a particular instance.

 

The figure below describes the flow when a user tries to SSH into a VM using Bosh CLI.

--(这里的实例是VM实例),实例管理子模块负责管理VM的实例,使用ssh连接VM所在机器上的Agent Client,进而可查找实例,或者获取实例的日志。

下面展示SSH到VM的示意图。

 

Problem Manager

 

This component helps scan a deployment for problems and helps apply resolutions. It uses a model deployment_problem to keep info about the problem and has a one-to-many relationship with Deployment Model.

--部署产生的问题的管理模块,对象多个部署模型。

 

Property Manager

 

Properties are attributes specified for jobs in the deployment file. The Property Manager allows you to find properties associated with a deployment and update a particular property for a deployment. It references the Deployment Manager.

--从部署文件中抽取出的一些属性值,用于jobs。也可更新指定的属性,这个子模块持有对应的Deployment Manager。

 

Resource Manager

 

The Resource Manager provides access to the resources stored in the BlobStore. Some of the actions performed through a resource manager are:

  1. Get a Resource using an ID
  2. Delete a resource by giving an resource ID
  3. Get the resource path from an ID

--对BlobStore打交道,通常执行上面三个操作。

 

Release(发布) Manager

 

The Release Manager manages the creation and deletion of releases. Each release references a Release Manager and contains a Deployment Plan object as well as an array of templates.

--管理发布的创建与删除,它包含一份部署计划,以及一系列的模板文件。

 

The Director routes the request coming at the following endpoints to the release manager for managing the release lifecycle.

--下面是REST 接入URI

URL HTTP METHOD TYPE RESPONSE BODY DESCRIPTION
/releases GET {“name” => release.name,“versions” => versions, “in_use” => versions_in_use} Get the list of all releases uploaded
/releases POST   Create a release for the user specified.

 

Lifecycle of a Release

 

The figure below shows the interaction between various components of a Director when a release is created/ updated or deleted.

--下图展示当创建/更新/删除一个发布时,多个子模块的交互示意

 

Stemcell(干细胞) Manager

 

The Stemcell Manager manages the Stem cells. It is responsible for creating, deleting, or finding a stemcell.

下图展示它的工作示意

REST API

URL HTTP METHOD TYPE RESPONSE BODY DESCRIPTION
/stemcells GET { “name” => stemcell.name, “version” => stemcell.version, “cid” => stemcell.cid} Json specifying the stemcell name, version and cid of the stem cell.
/stemcells POST   Stemcell binary file
/stemcells DELETE   Delete the specified stemcell

 

Task Manager

 

The Task Manager is responsible for managing the tasks which are created and are being run by the Job Runner.

--管理创建的任务,这些任务将会由Job Runner去完成

REST API

URL HTTP METHOD TYPE RESPONSE BODY DESCRIPTION
/tasks GET   Get all the tasks being executed of type"update_deployment", “delete_deployment”, “update_release”,“delete_release”, “update_stemcell”, “delete_stemcell”
/tasks/:id GET   Send back output for a task with the given id
/tasks/:id/output GET   Sends back output of given task id and params[:type]
/task/:id DELETE   Delete the task specified by a particular Id

User Manager

Manages the users stored in the Director’s database. Main functions performed by the User Manager are:
  1.  Create a User
  2.  Delete a User
  3.  Authenticate a User
  4.  Get a User
  5.  Update a User

 REST API

URL HTTP METHOD TYPE HTTP REQUEST BODY DESCRIPTION
/users POST   Create a User
/users/:username PUT   Update a User
/users/:username DELETE   Delete a User

--这里的用户是什么概念?

 

VM State Manager

 

Helps fetch the VM State by creating a task which runs the Hob : VmState

 

 

The vm state is fetched by creating a GET request on the /deployments/:name/vms endpoint in the Director. name is the name of the deployment.

 

 

Messaging

BOSH uses the NATS message bus for command and control.

 

Health Monitor

The BOSH Health Monitor receives health status and life cycle events from the BOSH Agent and can send alerts through notification plugins (such as email). The Health Monitor has a simple awareness of events in the system, so as not to alert if a component is updated.

--接收BOSH Agent上传的健康状态,可接收操作产生的事件

 

Stemcell(干细胞)

A Stemcell is a VM template with an embedded BOSH Agent. The Stemcell used for Cloud Foundry is a standard Ubuntu 10.04 LTS distribution, but BOSH also produces stemcells for CentOS 6.4 on some IaaS providers. Stemcells are uploaded using the BOSH CLI and used by the BOSH Director when creating VMs through the Cloud Provider Interface.

一个干细胞就是一个虚拟机模板,内置BOSH Agent,CF用Ubuntu 10.04作为虚拟机系统,也提供了CenOS6.4系统针对特定的IaaS。

十细胞通过CLI上传,在Director创建虚拟机调用CPI来使用它。

 

When the Director creates a VM through the CPI, it uses the machine image from the stemcell, and passes along configurations for networking and storage, as well as the location and credentials for the Message Bus and the Blobstore. The agent inside the VM invokes the Director when it boots and is provided settings and additional software that should be configured on the VM as specified by the jobs in the deployment manifest.

当Director使用CPI创建VM时,从干细胞产生的镜像被传递到目标端。当BOSH Agent随系统启动后,它调用Director获取设置或其它的软件,用于配置VM。这些设置在部署的manifest中。

 

Agent

BOSH Agents listen for instructions from the BOSH Director. Every VM contains an Agent. Through the Director-Agent interaction, VMs are given Jobs, or roles, within Cloud Foundry. If the VM's job is to run MySQL, for example, the Director will send instructions to the Agent about which packages must be installed and what the configurations for those packages are.

--Director与VM上的Agent进行交互,VM用于分配任务或角色。如果某VM的任务是进行MYSQL,Director会发送指令指出哪些包需要安装,以及怎么配置这些包。

 

Below is an 8 min video explaining the role of the Bosh Agent within each instance. It shows an example bosh deployment - deploying a single server running redis - and look at the high level explanation of how the bosh director communicates with the bosh agent, which communicates with monit, which starts and stops the redis server.--下面的视频agent的作用,它演示部署一个单server的redis,从中可看到director与agent的交互,与monit的交互,以及启动与停止redis服务。--看不了啊!!!

 

Blobstore

The BOSH Blobstore is used to store the content of Releases (BOSH Jobs and Packages in their source form as well as the compiled image of BOSH Packages. Releases are uploaded by the BOSH CLI and inserted into the Blobstore by the BOSH Director. When you deploy a Release, BOSH will orchestrate the compilation of packages and store the result in the Blobstore. When BOSH deploys a BOSH Job to a VM, the BOSH Agent will pull the specified Job and associated BOSH Packages from the Blobstore.

当部署一个发布时,BOSH会编译这些包并存储结果在Blobstore中,当BOSH部署一个BOSH Job到VM时,Agent接到指令后会拉这个Job对应的包。

 

BOSH also uses the Blobstore as an intermediate(中间过度) store for large payloads, such as log files (see BOSH logs) and output from the BOSH Agent that exceeds(超过) the max size for messages over the message bus.

--过程大数据也会被存在Blockstore中。

 

There are currently three Blobstores supported in BOSH:

  1. Atmos
  2. S3
  3. simple blobstore server

The default BOSH configuration uses the simple blobstore server

下面是每一种的配置,指出了S3与Atmos的配置,略....

 

Micro BOSH

All BOSH stemcells include all of the BOSH components. You will use Micro BOSH to deploy BOSH. Installation steps for Micro BOSH are included in the Cloud Foundry deployment procedures. See the appropriate procedure for your platform.

 

 

 

 

  • 大小: 74.5 KB
  • 大小: 53.3 KB
  • 大小: 37.9 KB
  • 大小: 34.7 KB
  • 大小: 50.7 KB
  • 大小: 30.7 KB
  • 大小: 48.5 KB
分享到:
评论

相关推荐

    汽车电气与电子BOSH

    根据提供的文件标题“汽车电气与电子BOSH”及其描述、标签等信息,我们可以推断这份文档主要涵盖了关于汽车电气系统及电子技术方面的专业知识。博世(Bosch)作为全球领先的汽车零部件和技术供应商之一,在汽车电子...

    Python库 | bosh-0.2.0.tar.gz

    Python库是其生态系统的重要组成部分,它们提供了丰富的功能模块,使得开发者可以快速实现各种复杂的任务。本资源是一个名为“bosh”的Python库的版本0.2.0,它被打包成`.tar.gz`格式的压缩文件。 `.tar.gz`是Linux...

    bosh-utils:从bosh-agent和bosh-init提取的通用软件包

    总的来说,bosh-utils是BOSH生态系统的重要组成部分,它提供了与BOSH-Agent和BOSH-Init相关的实用工具,有助于开发者更有效地进行部署、管理和维护工作。使用Go语言编写,它利用了Go的高效性和跨平台能力,同时通过...

    bosh-kubernetes-cpi-release:该项目的目标是提供一个功能齐全的BOSH CPI。 最终它将允许将任何BOSH版本部署到任何Kubernetes集群

    CPI是BOSH的关键组成部分,它定义了BOSH与特定云平台之间的接口。CPI负责执行如创建、删除虚拟机、挂载存储、设置网络等操作。通过CPI,BOSH可以理解并操作不同的云基础设施,包括AWS、Azure、GCP以及现在加入的...

    crystal-release:与`bosh vendor-package`一起使用的非官方Crystal版本。

    3. **Cloud Foundry架构**:Cloud Foundry由多个组件组成,如Diego(应用运行时)、Garden(容器管理)和UAA(用户认证与授权),它们共同提供了一个灵活且可扩展的PaaS平台。 4. **BOSH与Crystal结合**:使用`...

    shield-boshrelease:BOSH 释放盾牌

    操作员文件SHIELD 部署的组成部分SHIELD 提供以下工作:核这就是神盾核心。 它提供了 SHIELD 的核心,包括 API、数据库、作业调度程序、加密的保管库、Web UI 和运行这一切的 HTTPS 代理。 每次 SHIELD 部署都需要此...

    dea的matlab代码包-diego-release:BOSH发布给Diego

    当前迭戈的概述,并链接到迭戈的各个组成部分。 目录 迭戈运营商资源 部署迭戈支持的Cloud Foundry Diego通常作为Cloud Foundry应用程序运行时部署的一部分进行部署,以用作其容器运行时。 该存储库包含推荐的最新...

    php-buildpack-release:PHP Buildpack的BOSH版本

    【PHP Buildpack】是Cloud ...总的来说,“php-buildpack-release”是Cloud Foundry生态中用于部署和管理PHP应用的关键组成部分,它通过BOSH实现了自动化和高效的部署流程,为开发者提供了无缝的云原生开发体验。

    python-buildpack-release:适用于Python Buildpack的BOSH版本

    总结来说,"python-buildpack-release"项目是Cloud Foundry生态中的重要组成部分,它通过BOSH的管理和部署能力,为Python开发者提供了高效、便捷的云上部署解决方案。开发者可以专注于编写代码,而将复杂的环境配置...

    staticfile-buildpack-release:适用于Staticfile Buildpack的BOSH版本

    这些应用通常由HTML、CSS、JavaScript和其他静态资源组成,如图片或字体文件。通过使用Staticfile Buildpack,开发者可以将这些静态网站直接上传到Cloud Foundry,而无需设置额外的运行时环境。 BOSH版本的Static...

    bosh-code.github.io:Github.io个人博客页面

    HTML文档由一系列元素组成,每个元素通过标签来表示其功能,例如`<head>`定义头部信息,`<body>`包含页面主体内容,`<h1>`到`<h6>`定义标题,`<p>`表示段落,`<a>`用于创建链接等。 在GitHub.io上创建个人博客,...

    draft-bosh-dots-quick-blocks:分布式拒绝服务开放威胁信号(DOTS)信号通道配置属性,以实现更快的块传输

    DOTS信号通道配置属性是DOTS系统中的关键组成部分,它们定义了如何建立和管理这些用于快速响应DDoS攻击的通道。这些属性可能包括但不限于: 1. **通道认证**:确保只有授权的实体可以发送或接收DOTS信号,防止中间...

    jwchat资料

    在这个“jwchat资料”压缩包中,重点关注的是“WEB-INF”目录,因为它是Java Web应用的核心组成部分,对于构建和运行JWChat这样的Web应用程序至关重要。 **1. WEB-INF概述** 在Java Web应用中,`WEB-INF`目录是...

    CloudFoundry中国研发团队技术分享.pptx

    总的来说,CloudFoundry中国研发团队的技术分享涵盖了现代Web应用开发的多个方面,从敏捷开发方法到测试策略,再到资源管理和云部署,这些都是构建高效、安全且可扩展的应用程序不可或缺的组成部分。通过这些实践,...

    [精品PPT]cloud-foundry技术调研.zip

    2. **BOSH**: BOSH是一种用于部署和管理分布式系统的工具,用于自动化Cloud Foundry的部署和更新过程。它也支持其他云基础设施的管理。 3. **Garden**: 这是Cloud Foundry中的轻量级容器运行时,用于隔离和管理应用...

    Professional XMPP Programming with JavaScript and jQuery

    - **XMPP的基本组成部分**: - **客户端到服务器(C2S)通信**:用户通过客户端软件连接到服务器,进行登录认证及消息发送等操作。 - **服务器到服务器(S2S)通信**:不同域之间的服务器间进行数据交换,实现跨...

    XMPP权威指南.pdf

    XMPP协议支持BOSH(XMPP over HTTP),即通过HTTP长轮询来模拟服务器推送,适用于无法建立持久连接的网络环境。此外,XMPP还支持无服务器消息,即无需在服务器上注册即可进行通信。 XMPP安全性涵盖认证、加密以及...

    cloque:Sysadmin操作条件

    一些脚本可帮助管理BOSH和AWS环境的自以为是的想法。 请参阅以了解为什么会这样。安装罩这些安装说明适用于Mac OSX。 在其他操作系统上的YMMV 通过Composer抓取Cloque和安装依赖项$ git clone $ cd cloque $ ...

    docs-book-cloudfoundry:用于开源Cloud Foundry文档的bookbinder存储库

    主题资料库下表描述了组成Cloud Foundry文档集的主题存储库:基础概念和体系结构 :适用于Cloud Foundry开发人员和用户的cf CLI指南:针对开发人员将应用程序推送到Cloud Foundry的逐步说明和参考资料 :有关使用...

    Continuous Devlivery of the Cloud Foundry Platform

    云计算平台连续交付是现代软件开发的重要组成部分,它确保了应用程序能够快速、持续、可靠地进行更新和部署。在这个过程中,基础设施、平台以及应用程序的部署和更新均需遵循一定的自动化和快速迭代原则。Pivotal...

Global site tag (gtag.js) - Google Analytics