↓↓↓↓↓↓↓↓視頻已上線B站↓↓↓↓↓↓↓↓
》》》》》》傳送門
本章節僅在Controller節點執行
1.Controller節點執行安裝和配置
2.驗證操作
1.Controller節點執行安裝和配置
1.創建數據庫
# mysql -uroot -p000000
> create database heat;
> grant all privileges on heat.* to 'heat'@'localhost' identified by '000000';
> grant all privileges on heat.* to 'heat'@'%' identified by '000000';
2.獲取管理員憑證並創建服務
# . /root/admin-openrc
# openstack user create --domain default --password 000000 heat
# openstack role add --project service --user heat admin
# openstack service create --name heat --description "Orchestration" orchestration
# openstack service create --name heat-cfn --description "Orchestration" cloudformation
3.創建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
4.爲了管理棧,在認證服務中Orchestration需要更多信息。爲了添加這些信息,完成下面的步驟:
# openstack domain create --description "Stack projects and users" heat
# openstack user create --domain heat --password 000000 heat_domain_admin
# openstack role add --domain heat --user-domain heat --user heat_domain_admin admin
# openstack role create heat_stack_owner
# openstack role add --project demo --user demo heat_stack_owner
# openstack role create heat_stack_user
5.安裝軟件包
# yum -y install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
6.編輯文件 /etc/heat/heat.conf 並完成如下動作
# vi /etc/heat/heat.conf
在 “[DEFAULT]” 下添加
rpc_backend = rabbit
heat_metadata_server_url = http://controller:8000
heat_waitcondition_server_url = http://controller:8000/v1/waitcondition
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = 000000
stack_user_domain_name = heat
在 [database] 部分,配置數據庫訪問:
connection = mysql+pymysql://heat:000000@controller/heat
在[oslo_messaging_rabbit]”部分,配置 “RabbitMQ” 消息隊列訪問:
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 000000
`這裏的[keystone_authtoken] 需要手動添加``
在``[keystone_authtoken]部分,配置認證服務訪問:`
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = heat
password = 000000
在[trustee]部分,配置認證服務訪問:
auth_plugin = password
auth_url = http://controller:35357
username = heat
password = 000000
user_domain_name = default
在[clients_keystone]部分,配置認證服務訪問:
auth_uri = http://controller:35357
在[ec2authtoken]部分,配置認證服務訪問:
auth_uri = http://controller:5000/v2.0
7.同步數據庫
# su -s /bin/sh -c "heat-manage db_sync" heat
8.啓動並設置開機啓動
# systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
# systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
2.驗證操作
1.source 租戶``admin`的憑證腳本:
# . /root/admin-openrc
2.列出服務組件,以驗證是否成功啓動並註冊了每個進程
# openstack orchestration service list