Home > Heat, OpenStack, 云计算 > 2.1 HOT — OpenStack Heat从入门到实践

2.1 HOT — OpenStack Heat从入门到实践

September 18th, 2015      Leave a comment Go to comments
 
HOT — OpenStack Heat从入门到实践
 
HOT即Heat Orchestration Template,初学者可能会不大好理解Orchestration这个词,WikiPedia的解释比较贴切。
Orchestration (computers)  
Orchestration describes the automated arrangement, coordination, and management of complex computer systems, middleware, and services.
It is often discussed as having an inherent intelligence (trait) or even implicitly autonomic control, but those are largely aspirations or analogies rather than technical descriptions. In reality, orchestration is largely the effect of automation or systems deploying elements of control theory.
This usage of orchestration is often discussed in the context of virtualization, provisioning, and dynamic datacenter topics. It is often used as a buzzword.
中文可以理解为“编排”,“编制”。直白的理解就是用模板(template,一个文本文件)的形式,以约定的格式,把你所需要的元素放入其中,然后通过分析处理这个模板文件来自动化处理某种操作。
比如,你使用云主机时,需要将主机的内存从1G改到2G,一般是登录到云主机控制后台,更改主机配置中的内存。使用“编排”则是将模板中的内存属性从1改为2,然后自动化的去更改主机的内存大小。
下面我们以一个实际的例子来学习HOT。
 
第一部分: heat_template_version
指这个HOT的版本,请看官方的解释
2013-05-23
The key with value 2013-05-23 indicates that the YAML document is a HOT template and it may contain features implemented until the Icehouse release. This version supports the following functions (some are back ported to this version):
2015-04-30
The key with value 2015-04-30 indicates that the YAML document is a HOT template and it may contain features added and/or removed up until the Kilo release. This version adds the repeatfunction. So the complete list of supported functions is:
 
第二部分: description
顾名思义。这个YAML是创建虚拟机用的。
 
第三部分:parameters
parameters值传入Heat的参数,创建一个虚拟机时,需要指定创建虚拟机所用到的镜像——image_id(CentOS 7.0?Ubuntu 14.04?);需要指定虚拟机创建之后的登录方式——login_mode(密码登录?SSH Key登录?)
 
第四部分: resources
resources部分是template的YAML对应的heat resource type,“server”指resource name, “COM::TwoFellows::Server”指resource type,properties指的是resource type的一系列属性,与template里的parameters相对应。具体对应关系,将在后面讲解。
 
第五部分: outputs
outputs指的是resource type的输出,其与Heat resource type类里的attribute相对应,具体对应关系,将在后面讲解。
 
截止到现在,HOT基本讲解完毕(第四/五部分将在后面再加强理解)。同时,OpenStack Heat官方也给出了一个Hello World template,你也可以参考下,https://github.com/openstack/heat-templates/blob/master/hot/hello_world.yaml 
<span style="font-size: 16px;"><span style="font-family: 楷体;">更多《OpenStack Heat从入门到实践》系列文章,请关注</span></span>

<span style="font-size: 16px;"><span style="font-family: 楷体;">1。博客:<a href="https://www.zhouzhengxi.com/wordpress/tag/Heat/">https://www.zhouzhengxi.com/wordpress/tag/Heat/</a>。</span></span>

<span style="font-size: 16px;"><span style="font-family: 楷体;">2。微信公众账号,Geek2014。</span></span>
Categories: Heat, OpenStack, 云计算 Tags: , ,
  1. SeR
    September 18th, 2015 at 15:29 | #1

    这些序列文章,有没有一个大体的计划?

  1. No trackbacks yet.