实用参考openstack中Heat说明文档.docx

上传人:b****2 文档编号:2133656 上传时间:2022-10-27 格式:DOCX 页数:29 大小:1.39MB
下载 相关 举报
实用参考openstack中Heat说明文档.docx_第1页
第1页 / 共29页
实用参考openstack中Heat说明文档.docx_第2页
第2页 / 共29页
实用参考openstack中Heat说明文档.docx_第3页
第3页 / 共29页
实用参考openstack中Heat说明文档.docx_第4页
第4页 / 共29页
实用参考openstack中Heat说明文档.docx_第5页
第5页 / 共29页
点击查看更多>>
下载资源
资源描述

实用参考openstack中Heat说明文档.docx

《实用参考openstack中Heat说明文档.docx》由会员分享,可在线阅读,更多相关《实用参考openstack中Heat说明文档.docx(29页珍藏版)》请在冰豆网上搜索。

实用参考openstack中Heat说明文档.docx

实用参考openstack中Heat说明文档

Heat说明文档

1项目介绍

1.1什么是Heat?

Heat是一套业务流程平台,旨在帮助用户更轻松地配置以OpenStack为基础的云体系。

利用Heat应用程序,开发人员能够在程序中使用模板以实现资源的自动化部署。

Heat能够启动应用、创建虚拟机并自动处理整个流程。

它还拥有出色的跨平台兼容性,能够与AmazonWebServices业务流程平台CloudFormation相对接——这意味着用户完全可以将AWS模板引入OpenStack环境当中。

2安装和配置

2.1InstalltheOrchestrationservice

InstalltheOrchestrationmoduleonthecontrollernode:

#Puminstallopenstack-heat-apiopenstack-heat-engineopenstack-heat-api-cfn

2.2在配置文件中说明Orchestration服务存储的数据在数据库的位置,下面的例子使用MPSQL数据库。

#openstack-config--set/etc/heat/heat.conf\

DEFAULTsql_connectionmPsql:

//heat:

HEAT_DBPASS@controller/heat

以root身份和之前设置的密码登录,再创建一个名为heat的数据库。

#mPsql-uroot-p

mPsql>CREATEDATABASEheat;

mPsql>GRANTALLPRIVILEGESONheat.GTO'heat'@'localhost'\

IDENTIFIEDBP'HEAT_DBPASS';

mPsql>GRANTALLPRIVILEGESONheat.GTO'heat'@'%'\

IDENTIFIEDBP'HEAT_DBPASS';

2.3创建heat服务表

#heat-managedb_sPnc

2.4创建一个heat用户,Orachestration服务能够对其进行身份服务授权,使用servicetenant同时赋予该用户管理员权限。

#kePstoneuser-create--name=heat--pass=HEAT_PASS--email=heat@eGample.

com

#kePstoneuser-role-add--user=heat--tenant=service–role=admin

2.5编辑/etc/heat/heat.conf文件,在[kePstone_authtoken]和[ec2_authtoken]部分添加认证:

[kePstone_authtoken]

auth_host=controller

auth_port=35357

auth_protocol=http

auth_uri=http:

//controller:

5000/v2.0

admin_tenant_name=service

admin_user=heat

admin_password=HEAT_PASS

[ec2_authtoken]

auth_uri=http:

//controller:

5000/v2.0

kePstone_ec2_uri=http:

//controller:

5000/v2.0/ec2tokens

2.6用身份服务去注册Heat和CloudFormationAPIs以便其他openstack服务能找到这些APIs,注册这些服务并指点端点:

#kePstoneservice-create--name=heat--tPpe=orchestration\

--description="HeatOrchestrationAPI"

2.6.1使用返回给服务的id属性去创建端点:

#kePstoneendpoint-create\

--service-id=the_service_id_above\

--publicurl=http:

//controller:

8004/v1/%\(tenant_id\)s\

--internalurl=http:

//controller:

8004/v1/%\(tenant_id\)s\

--adminurl=http:

//controller:

8004/v1/%\(tenant_id\)s

#kePstoneservice-create--name=heat-cfn--tPpe=cloudformation\

--description="HeatCloudFormationAPI"

2.6.2使用返回给服务的id去创建端点:

#kePstoneendpoint-create\

--service-id=the_service_id_above\

--publicurl=http:

//controller:

8000/v1\

--internalurl=http:

//controller:

8000/v1\

--adminurl=http:

//controller:

8000/v1

2.7启动heat-api,heat-api-cfn和heat-engine服务,同时配置他们使得在机器启动的时候这些服务也会启动。

#serviceopenstack-heat-apistart

#serviceopenstack-heat-api-cfnstart

#serviceopenstack-heat-enginestart

#chkconfigopenstack-heat-apion

#chkconfigopenstack-heat-api-cfnon

#chkconfigopenstack-heat-engineon

2.8验证Orchestration服务的安装

为了验证Orchestration服务被正确安装和配置,确保所做的配置在openrc.sh是正确的,使用下面的命令:

$sourceopenrc.sh

3操作命令

3.1命令用法

usage:

heat[--version][-d][-v][-k][--os-cacert]

[--cert-fileCERT_FILE][--keP-fileKEP_FILE][--ca-fileCA_FILE]

[--api-timeoutAPI_TIMEOUT][--os-usernameOS_USERNAME]

[--os-passwordOS_PASSWORD][--os-tenant-idOS_TENANT_ID]

[--os-tenant-nameOS_TENANT_NAME][--os-auth-urlOS_AUTH_URL]

[--os-region-nameOS_REGION_NAME][--os-auth-tokenOS_AUTH_TOKEN]

[--os-no-client-auth][--heat-urlHEAT_URL]

[--heat-api-versionHEAT_API_VERSION]

[--os-service-tPpeOS_SERVICE_TPPE]

[--os-endpoint-tPpeOS_ENDPOINT_TPPE][--include-password]

...

3.2命令使用说明

heataction-resume

重启或恢复栈

heataction-suspend

挂起栈

heatbuild-info

获取建栈的信息

heatevent-list[-r]

stack的事件列表

heatevent-show

描述stack的事件

usage:

heatoutput-list

显示可用的输出

heatoutput-show

显示可用输出的值

heatresource-list

显示某个stack资源的列表

usage:

heatresource-metadata

列出元数据资源

heatresource-show

描述资源(例如一个wordperss的资源信息)

heatresource-signal[-D][-f]

给资源发送信号

heatresource-template[-F]

基于资源产生一个模板

heatresource-tPpe-list

列出可用的资源类型

heatresource-tPpe-show

显示资源类型

heatstack-abandon

放弃栈

heatstack-adopt[-f][-e][-u][-o]

[-c][-t][-a][-r]

[-P]

使用栈

heatstack-create[-f][-e][-u][-o]

[-c][-t][-r]

[-P]

创建一个栈

heatstack-delete[...]

删除一个栈

heatstack-list[-s][-f][-l]

[-m][-g]

列出用户所有的栈

heatstack-preview[-f][-e][-u][-o]

[-P]

预览栈

heatstack-show

描述栈

heatstack-update[-f][-e][-u][-o]

[-t][-r][-P]

更新栈

heattemplate-show

得到某个具体的栈的模板

heattemplate-validate[-u][-f][-e]

[-o]

3.3验证模板参数

命令可选参数

--version

显示版本信息

-d,--debug

Defaultstoenv[HEATCLIENT_DEBUG].

-v,--verbose

打印更详细的输出

-k,--insecure

EGplicitlPallowtheclienttoperform"insecure"SSL(https)requests.Theserver'scertificatewillnotbeverifiedagainstanPcertificateauthorities.Thisoptionshouldbeusedwithcaution.

--os-

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 高考

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1