OpenStack 安裝文檔(11)-- 編排服務
阿新 • • 發佈:2018-03-29
upd systemctl rip default onf style opensta span type
編排服務 — 安裝和配置:
控制節點操作:
先決條件:
1、按步驟操作。
# mysql -u root -p*** > CREATE DATABASE heat; > GRANT ALL PRIVILEGES ON heat.* TO ‘heat‘@‘localhost‘ IDENTIFIED BY ‘HEAT_DBPASS‘; > GRANT ALL PRIVILEGES ON heat.* TO ‘heat‘@‘%‘ IDENTIFIED BY ‘HEAT_DBPASS‘; > exit(); # . admin-openrc # openstack user create --domain default --password-prompt 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 # 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 # openstack domain create --description "Stack projects and users" heat # openstack user create --domain heat --password-prompt 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
安裝並配置組件:
1、安裝包。
# yum install -y openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
2、編輯 /etc/heat/heat.conf 文件。
[database] connection = mysql+pymysql://heat:HEAT_DBPASS@controller/heat [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 = HEAT_DOMAIN_PASS stack_user_domain_name = heat [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS [keystone_authtoken] auth_uri = http://controller:5000auth_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 = HEAT_PASS [trustee] auth_plugin = password auth_url = http://controller:35357 username = heat password = HEAT_PASS user_domain_name = default [clients_keystone] auth_uri = http://controller:35357 [ec2authtoken] auth_uri = http://controller:5000/v2.0
3、同步Orchestration數據庫並驗證。
# su -s /bin/sh -c "heat-manage db_sync" heat # mysql -uheat -pHEAT_DBPASS -hcontroller -t heat -e "show tables"
4、啟動 Orchestration 服務並設置為隨系統啟動。
# systemctl enable openstack-heat-api openstack-heat-api-cfn openstack-heat-engine # systemctl start openstack-heat-api openstack-heat-api-cfn openstack-heat-engine
編排服務 — 驗證操作:
控制節點操作:
1、如下操作。
# . admin-openrc # openstack orchestration service list +------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+ | hostname | binary | engine_id | host | topic | updated_at | status | +------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+ | controller | heat-engine | c5c83512-8c2d-41c8-bfda-69cc458c9143 | controller | engine | 2018-03-28T01:35:30.000000 | up | | controller | heat-engine | c415f77a-c689-4468-b10d-2c3a73cccb3b | controller | engine | 2018-03-28T01:35:32.000000 | up | | controller | heat-engine | a31e297a-219f-41d9-88c3-f166cf2c66e2 | controller | engine | 2018-03-28T01:35:30.000000 | up | | controller | heat-engine | c12f0d76-a0f0-41a9-8dc0-af6ae7c523cd | controller | engine | 2018-03-28T01:35:30.000000 | up | +------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
OpenStack 安裝文檔(11)-- 編排服務