热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

openstack—T之Heat的安装:

本文主要介绍关于linux,运维,服务器的知识点,对【openstack—T之Heat的安装】和【】有兴趣的朋友可以看下由【学无止境xs】投稿的技术文章,希望该技术和经验能帮到你解决你所遇的相关技术

本文主要介绍关于linux,运维,服务器的知识点,对【openstack—T 之Heat的安装】和【】有兴趣的朋友可以看下由【学无止境xs】投稿的技术文章,希望该技术和经验能帮到你解决你所遇的相关技术问题。

官网文档:OpenStack Docs: Install and configure for Red Hat Enterprise Linux and CentOS

https://docs.openstack.org/heat/train/install/install-rdo.html


一、创建heat相关数据库、服务凭证和API端点 1、创建数据库
mysql -p123

MariaDB [(none)]> CREATE DATABASE heat;

MariaDB [(none)]> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY 'heat123';

我这里设置密码为heat123

MariaDB [(none)]> exit

 

2、获取凭据以获取对仅限管理员的 CLI 命令的访问权限: admin
 . admin-openrc

 

3、创建服务凭据

创建heat 用户:

openstack user create --domain default --password=heat123 heat

添加 admin 角色到 heat 用户上

openstack role add --project service --user heat admin

这个命令执行后没有输出。

创建heat和 heat-cfn 服务实体:

openstack service create --name heat  --description "Orchestration" orchestration

openstack service create --name heat-cfn  --description "Orchestration"  cloudformation

 

4、创建 Orchestration 服务的 API 端点
openstack endpoint create --region RegionOne  orchestration public http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne  orchestration internal http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne  orchestration admin http://controller:8004/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne  cloudformation public http://controller:8000/v1
openstack endpoint create --region RegionOne  cloudformation internal http://controller:8000/v1
openstack endpoint create --region RegionOne  cloudformation admin http://controller:8000/v1

 

5、业务流程需要标识服务中的其他信息来管理堆栈。

1.为栈创建 heat 包含项目和用户的域:

openstack domain create --description "Stack projects and users" heat

2.在 heat 域中创建管理项目和用户的heat_domain_admin用户:

openstack user create --domain heat --password=heat123 heat_domain_admin

我这里设置密码为heat123

3.添加admin角色到 heat 域 中的heat_domain_admin用户,启用heat_domain_admin用户管理栈的管理权限

openstack role add --domain heat --user-domain heat --user heat_domain_admin admin

这个命令执行后没有输出。

4.创建 heat_stack_owner 角色:

openstack role add --project demo --user demo heat_stack_owner

5.添加heat_stack_owner 角色到demo 项目和用户,启用demo 用户管理栈。

openstack role add --project demo --user demo heat_stack_owner


这个命令执行后没有输出。 必须添加 heat_stack_owner 角色到每个管理栈的用户。

注意: 在部署keystone时有会有两个管理用户,一个是admin,一个是demo,这时你报错显示没有demo用,说明当时部署时没有创建demo,这里将demo换成admin已有的用户即可

6.创建 heat_stack_user 角色

openstack role create heat_stack_user

二、安装并配置Heat组件 1、安装软件包
yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine -y

 

2.修改heat配置

编辑/etc/heat/heat.conf

[database]
cOnnection= mysql+pymysql://heat:heat123@controller/heat  

#密码以自己的为准


[DEFAULT]
transport_url = rabbit://openstack:openstack@controller


[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = heat
password = heat123

[trustee]
auth_type = password
auth_url = http://controller:5000
username = heat
password = heat123
user_domain_name = default

[clients_keystone]
auth_uri = http://controller:5000


[DEFAULT]
heat_metadata_server_url = http://controller:8000
heat_waitcondition_server_url = http://controller:8000/v1/waitcondition

[DEFAULT]
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = heat123
stack_user_domain_name = heat

3、同步Orchestration数据库
su -s /bin/sh -c "heat-manage db_sync" heat

三、启动 Orchestration 编排服务heat组件并将其设置为随系统启动
systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service

systemctl restart openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
  
systemctl list-unit-files |grep openstack-heat*

四、验证操作 1.获取租户凭据: admin
. admin-openrc
2.列出服务组件以验证每个进程的成功启动和注册
[root@controller ~]# openstack orchestration service list
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
| Hostname   | Binary      | Engine ID                            | Host       | Topic  | Updated At                 | Status |
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
| controller | heat-engine | 63d58fb8-9bc6-41da-bbe5-7c9f4be22d49 | controller | engine | 2022-06-08T04:18:49.000000 | up     |
| controller | heat-engine | fb6116bf-6491-4860-a44f-ed75cb36fc0e | controller | engine | 2022-06-08T04:18:49.000000 | up     |
| controller | heat-engine | d19aee2f-37d2-41c8-9fd2-0a27effda7c5 | controller | engine | 2022-06-08T04:18:49.000000 | up     |
| controller | heat-engine | 7f87f753-d36a-4ffe-ae6f-995b73b0f341 | controller | engine | 2022-06-08T04:18:49.000000 | up     |
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
3.列出服务组件,以验证是否成功启动并注册了每个进程:
[root@controller ~]# openstack service list
+----------------------------------+-----------+----------------+
| ID                               | Name      | Type           |
+----------------------------------+-----------+----------------+
| 436b9fb83d73411bbd0de0af26793447 | swift     | object-store   |
| 43b9a0f6f37a46d283f4894f2d0d3c65 | neutron   | network        |
| 4c67912c0eb742ba873bd819694beacf | heat      | orchestration  |
| 64e97bc968b64eddadd1084db20d6caf | cinderv3  | volumev3       |
| 8932f09b4cc64b6a9f0790670ce5cf49 | cinderv2  | volumev2       |
| a5a24a194c624065baf138396d926bae | placement | placement      |
| af7b4b11073540609d2f5bb206175a31 | nova      | compute        |
| bad3eb2063a54c9fa96b5da0ba3fe994 | glance    | image          |
| bc03beecbf4e421f9b2c44f88f7cca8b | keystone  | identity       |
| fc0e9a37158d4185b218e9d271f6a329 | heat-cfn  | cloudformation |
+----------------------------------+-----------+----------------+

[root@controller ~]# ps aux | grep heat
heat      33217  2.4  2.0 472976 78184 ?        Ss   12:18   0:03 /usr/bin/python2 /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33218  2.3  1.9 472092 77176 ?        Ss   12:18   0:03 /usr/bin/python2 /usr/bin/heat-api-cfn --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33219  6.5  2.8 508492 109764 ?       Ss   12:18   0:10 /usr/bin/python2 /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33259  0.0  2.0 472976 77884 ?        S    12:18   0:00 /usr/bin/python2 /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33260  0.0  2.0 472976 77888 ?        S    12:18   0:00 /usr/bin/python2 /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33261  1.1  2.1 475108 81344 ?        S    12:18   0:01 /usr/bin/python2 /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33262  0.0  2.0 472976 77900 ?        S    12:18   0:00 /usr/bin/python2 /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33268  1.3  3.0 514536 116164 ?       S    12:18   0:02 /usr/bin/python2 /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33269  0.5  3.0 514552 116112 ?       S    12:18   0:00 /usr/bin/python2 /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33270  0.4  2.9 514156 115332 ?       S    12:18   0:00 /usr/bin/python2 /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
heat      33271  0.4  2.9 514168 115328 ?       S    12:18   0:00 /usr/bin/python2 /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
root      33608  0.0  0.0 112728   964 pts/0    S+   12:21   0:00 grep --color=auto heat

[root@controller ~]# ps -A | grep heat
 33217 ?        00:00:03 heat-api
 33218 ?        00:00:03 heat-api-cfn
 33219 ?        00:00:10 heat-engine
 33259 ?        00:00:00 heat-api
 33260 ?        00:00:00 heat-api
 33261 ?        00:00:01 heat-api
 33262 ?        00:00:00 heat-api
 33268 ?        00:00:02 heat-engine
 33269 ?        00:00:00 heat-engine
 33270 ?        00:00:00 heat-engine
 33271 ?        00:00:00 heat-engine

[root@controller ~]# netstat -ltunp | grep 8000
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      33218/python2       

[root@controller ~]# netstat -ltunp | grep 8004
tcp        0      0 0.0.0.0:8004            0.0.0.0:*               LISTEN      33217/python2 

验证成功即可!

本文《openstack—T 之Heat的安装》版权归学无止境xs所有,引用openstack—T 之Heat的安装需遵循CC 4.0 BY-SA版权协议。


推荐阅读
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 本文介绍了在Mac上搭建php环境后无法使用localhost连接mysql的问题,并通过将localhost替换为127.0.0.1或本机IP解决了该问题。文章解释了localhost和127.0.0.1的区别,指出了使用socket方式连接导致连接失败的原因。此外,还提供了相关链接供读者深入了解。 ... [详细]
  • 本文详细介绍了cisco路由器IOS损坏时的恢复方法,包括进入ROMMON模式、设置IP地址、子网掩码、默认网关以及使用TFTP服务器传输IOS文件的步骤。 ... [详细]
  • 如何利用 Myflash 解析 binlog ?
    本文主要介绍了对Myflash的测试,从准备测试环境到利用Myflash解析binl ... [详细]
  • centos安装Mysql的方法及步骤详解
    本文介绍了centos安装Mysql的两种方式:rpm方式和绿色方式安装,详细介绍了安装所需的软件包以及安装过程中的注意事项,包括检查是否安装成功的方法。通过本文,读者可以了解到在centos系统上如何正确安装Mysql。 ... [详细]
  • OpenStackQ版本已经发布了一段时间了。今天,小编来总结一下OpenStackQ版本核心组件的各项主要新功能,再来汇总一下最近2年来OpenStackN、O、P、Q各版本核心 ... [详细]
  • shell脚本实战 pdf_Shell 脚本操作数据库实战
    安装mariadb数据库(默认没有密码,直接mysql即可进入数据库管理控制台)yuminstallmariadbmariadb-serv ... [详细]
  • Linux环境中使用Mysql数据库
    Linux下Mysql数据库MySQL是一个开放源码的小型关联式数据库管理系统,开发者为瑞典MySQLAB公司,目前属于Oracle公司,MySQL被广泛地应用在I ... [详细]
  • Centos7安装MySql5.6
    如何在CentO ... [详细]
  • 数据库进入全新时代,腾讯云发布五大数据库提前布局
    8月28日,腾讯云数据库在京正式启动战略升级,宣布未来将聚焦云原生、自治、超融合三大战略方向,以用户为中心,联接未来。并在现场面向全球用户同步发布五大战略级新品,包括数据库智能管家 ... [详细]
  • MySQL/MariaDB/PerconaDB提权条件漏洞
    背景  2016年11月01日,国外安全研究员DawidGolunski在MyS ... [详细]
  • 本文介绍了在SpringBoot中集成thymeleaf前端模版的配置步骤,包括在application.properties配置文件中添加thymeleaf的配置信息,引入thymeleaf的jar包,以及创建PageController并添加index方法。 ... [详细]
  • 数据库(外键及其约束理解)(https:www.cnblogs.comchenxiaoheip6909318.html)My ... [详细]
  • 本文是搭建的mariadb-10.0.17版本的下载地址:https:downloads.mariadb.orginterstitialmariadb-10.0.17sourcemariadb-10.0.17.tar.gzfromhtt ... [详细]
  • mariadb 1045 (28000): Access denied for user ... [详细]
author-avatar
b98625400
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有