BOSH部署

Deploy

  1. BOSH部署什么?
    Software that is deployed with BOSH needs to be packaged in a special format called a release. For each service that will be deployed, a release needs to contain source files, configuration files, installation scripts, etc. For example, a redis release would contain the source code for redis, redis configuration defaults and redis init scripts.
    进行BOSH部署的软件需要打包成一个被称为release的特定格式包。
    针对每一种需要部署的服务,release需要包含源文件、配置文件、安装脚本等。

  2. 如何进行BOSH部署?
    Each BOSH deployment needs to provide a specially structured configuration file - deployment manifest. This file defines what resources are going to be deployed, what services are going to be running on each of resources and properties that will be passed to services configuration files. For example, for a redis deployment manifest, there are entries for how many and what size redis VMs there should be and how redis should be configured.
    BOSH部署需要提供一个特定结构的配置文件–部署清单(deployment manifest)。该文件定义什么软件将被部署,每一个资源上将提供什么服务,通过部署清单传递哪些特性等内容。


Release

A release is a versioned collection of configuration properties, configuration templates, start up scripts, source code, binary artifacts, and anything else required to build and deploy software in a reproducible way.
Release是一个包含配置特性、配置模板、启动脚本、源代码、二进制构件以及其他能够以一种可再现方式建立和部署软件的固定版本包。

A release is the layer placed on top of a stemcell. They are self-contained and provide very specific software for the purpose of that release. For example, a Redis release might include start-up and shutdown scripts for redis-server, a tarball with Redis source code obtained from the Redis official website, and a few configuration properties allowing cluster operators to alter that Redis configuration.
release被放置在stemcell的顶层,本身包含并提供特定的软件用于部署。

By allowing layering of stemcells and releases, BOSH is able to solve problems such as “how does one make sure that the compiled version of the software is reliably available throughout the deploy”, or “how to version and roll out updated software to the whole cluster, VM-by-VM, that other orchestration software is not able to solve”.
通过允许层级的stemcell和release,BOSH能够解决例如,如何确保编译的软件版本能够可靠地进行部署,如何进行版本控制以及在相关版本软件不能更新情况下将更新后的软件更新到整个集群等问题。

release需要注意的问题有:
* 获取所有需要的配置选项和脚本部署的软件
* 记录和跟踪软件的所有依赖项
* 版本控制和跟踪软件版本
* 创建发布可以IaaS不可知论者
* 创建发布自给自足的,不需要上网的部署


What is a Deployment?

A deployment is a collection of VMs, built from a stemcell, that has been populated with specific releases and disks that keep persistent data. These resources are created based on a manifest file in the IaaS and managed by the BOSH Director, a centralized management server.
部署是一个从stemcell镜像创建虚拟机的过程。其中,所采用的stemcell镜像已经被植入了特定的release,并且磁盘上保存持久化数据的。这些资源在IaaS上通过部署清单创建,由BOSH操作者管理,是一个集中化管理服务器。

The deployment process begins with deciding which Operating System images (stemcells) need to be used and which software (releases) need to be deployed, how to track persistent data while a cluster is updated and transformed, and how to automate steps of deploying images to an IaaS; this includes configuring machines to use said image, and placing correct software versions onto provisioned machines. BOSH builds upon previously introduced primitives (stemcells and releases) by providing a way to state an explicit combination of stemcells, releases, and operator-specified properties in a human readable file. This file is called a deployment manifest.
部署过程开始于决定采用哪个(stemcell)镜像,部署哪个(release)软件,当集群进行更新和转移时如何跟踪持久化数据,并且如何自动化地在IaaS上部署镜像,这包括如何自动地利用指定的镜像创建虚拟机,如何在创建的虚拟机上安装正确版本的软件。基于上述介绍的stemcell和release进行BOSH部署是利用一种可读的描述文件进行的,该文件包括指定stemcell和release以及指定操作特性等内容,该文件被称为部署清单(deployment manifest)。

When a deployment manifest is uploaded to a BOSH Director, requested resources are allocated and stored. These resources form a deployment. The deployment keeps track of associated VMs and persistent disks that are attached to the VMs. Over time, as the deployment manifest changes, VMs are replaced and updated. However, persistent disks are retained and are re-attached to the newer VMs.
当一个部署清单被上传至BOSH管理者,请求的资源将被收集和存储。这些资源形成部署。部署跟踪相关联的虚拟机并保证持久化磁盘挂载到虚拟机上。随着时间的推移,当部署清单发生变化时,虚拟机被替换并且进行更新。但是,持久化磁盘被保留,并被重新挂载到新的虚拟机上。

A user can manage a deployment via its deployment manifest. A deployment manifest contains all needed information for tracking, managing, and updating software on the deployment’s VMs. It describes the deployment in an IaaS-agnostic way [1]. 
用户可以通过部署清单来操作部署。一个部署清单包括所有跟踪、操作以及更新软件所在部署的虚拟机上的所有需要的信息。它以一个IaaS不可知的方式来描述部署。

What is a Stemcell?

A stemcell is a versioned Operating System image wrapped with IaaS specific packaging.
stemcell是一个绑定了IaaS特定包的版本化的操作系统镜像。
A typical stemcell contains a bare minimum OS skeleton with a few common utilities pre-installed, a BOSH Agent, and a few configuration files to securely configure the OS by default. For example: with vSphere, the official stemcell for Ubuntu Trusty is an approximately 500MB VMDK file. With AWS, official stemcells are published as AMIs that can be used in your AWS account.
一个典型的stemcell是一个仅预先安装了一些公用组件、BOSH agent以及一些系统默认的安全配置文件的最小化的空操作系统。例如,对于VSphere,官方的stemcell镜像是一个大约500M的VMDK格式的Ubuntu镜像文件。
Stemcells do not contain any specific information about any software that will be installed once that stemcell becomes a specialized machine in the cluster; nor do they contain any sensitive information which would make them unable to be shared with other BOSH users. This clear separation between base Operating System and later-installed software is what makes stemcells a powerful concept.
stemcell不包含其他需要被安装部署软件信息,直到该镜像称为集群中定制化的虚拟机。stemcell也不包含其他敏感信息,防止其阻碍能被其他BOSH用户共享。

In addition to being generic, stemcells for one OS (e.g. all Ubuntu Trusty stemcells) are exactly the same for all infrastructures. This property of stemcells allows BOSH users to quickly and reliably switch between different infrastructures without worrying about the differences between OS images.
The Cloud Foundry BOSH team is responsible for producing and maintaining an official set of stemcells. Cloud Foundry currently supports Ubuntu Trusty and CentOS 6.5 on vSphere, AWS, OpenStack, and vCloud infrastructures.
为了通用化,stemcell针对某一特定类型的操作系统(如所有的Ubuntu Trusty stemcell)对于所有的基础设施都是完全相同的。这个特性允许不同的基础设施不用担心操作系统镜像之间的不同。
Cloud Foundry BOSH团队对所有制作和维护stemcell镜像集合负责。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值