1. Keystone创建用户(租户)
# keystone user-create --name=heat --pass="tsj" --tenant=service --email=heat@example.com
# keystone user-role-add --user=heat --tenant=service --role=admin
1. Keystone创建服务
keystone service-create --name=heat --type=orchestration --description="Heat Orchestration API"
keystone endpoint-create --region RegionOne --service-id=f4ead103b33645ba852cae730f463720 --publicurl 'http://128.6.3.103:8004/v1/$(tenant_id)s' --internalurl 'http://128.6.3.103:8004/v1/$(tenant_id)s' --adminurl 'http://128.6.3.103:8004/v1/$(tenant_id)s'
keystone service-create --name=heat-cfn --type=cloudformation --description="Heat CloudFormation API"
keystone endpoint-create --region RegionOne --service-id=77543eb29ada4c2196326137b2ae8c63 --publicurl 'http://128.6.3.103:8000/v1' --internalurl 'http://128.6.3.103:8000/v1' --adminurl 'http://128.6.3.103:8000/v1'
注:上面的region要跟keyston的其他service中一样,不加--region参数则默认是region,第一个r是小写的(我在这里出错过)。
1. 安装软件包
apt-get install heat-api heat-api-cfn heat-engine
1. 删除
rm /var/lib/heat/heat.sqlite
2. 编辑 /etc/heat/heat.conf
[DEFAULT]
# The SQLAlchemy connection string used to connect to the database
sql_connection = mysql://heat:tsj@128.6.3.103/heat
#verbose = True
log_dir=/var/log/heat
rabbit_host = 128.6.3.103
rabbit_password = guest
4. 编辑 /etc/heat/heat.conf
[keystone_authtoken]
auth_host = 128.6.3.103
auth_port = 35357
auth_protocol = http
auth_uri = http://128.6.3.103:5000/v2.0
admin_tenant_name = service
admin_user = heat
admin_password = tsj
[ec2_authtoken]
auth_uri = http://128.6.3.103:5000/v2.0
keystone_ec2_uri = http://128.6.3.103:5000/v2.0/ec2tokens
编辑 /etc/heat/api-paste.ini
[filter:authtoken]
paste.filter_factory = heat.common.auth_token:filter_factory
auth_host = 128.6.3.103
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = heat
admin_password = tsj
1. mysql数据库中创建heat用户
# mysql -u root -p
mysql> CREATE DATABASE heat;
mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'HEAT_DBPASS';
mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY 'tsj';
2. 同步数据库
heat-manage db_sync
1. 重启所有服务
# keystone user-create --name=heat --pass="tsj" --tenant=service --email=heat@example.com
# keystone user-role-add --user=heat --tenant=service --role=admin
1. Keystone创建服务
keystone service-create --name=heat --type=orchestration --description="Heat Orchestration API"
keystone endpoint-create --region RegionOne --service-id=f4ead103b33645ba852cae730f463720 --publicurl 'http://128.6.3.103:8004/v1/$(tenant_id)s' --internalurl 'http://128.6.3.103:8004/v1/$(tenant_id)s' --adminurl 'http://128.6.3.103:8004/v1/$(tenant_id)s'
keystone service-create --name=heat-cfn --type=cloudformation --description="Heat CloudFormation API"
keystone endpoint-create --region RegionOne --service-id=77543eb29ada4c2196326137b2ae8c63 --publicurl 'http://128.6.3.103:8000/v1' --internalurl 'http://128.6.3.103:8000/v1' --adminurl 'http://128.6.3.103:8000/v1'
注:上面的region要跟keyston的其他service中一样,不加--region参数则默认是region,第一个r是小写的(我在这里出错过)。
1. 安装软件包
apt-get install heat-api heat-api-cfn heat-engine
1. 删除
rm /var/lib/heat/heat.sqlite
2. 编辑 /etc/heat/heat.conf
[DEFAULT]
# The SQLAlchemy connection string used to connect to the database
sql_connection = mysql://heat:tsj@128.6.3.103/heat
#verbose = True
log_dir=/var/log/heat
rabbit_host = 128.6.3.103
rabbit_password = guest
4. 编辑 /etc/heat/heat.conf
[keystone_authtoken]
auth_host = 128.6.3.103
auth_port = 35357
auth_protocol = http
auth_uri = http://128.6.3.103:5000/v2.0
admin_tenant_name = service
admin_user = heat
admin_password = tsj
[ec2_authtoken]
auth_uri = http://128.6.3.103:5000/v2.0
keystone_ec2_uri = http://128.6.3.103:5000/v2.0/ec2tokens
编辑 /etc/heat/api-paste.ini
[filter:authtoken]
paste.filter_factory = heat.common.auth_token:filter_factory
auth_host = 128.6.3.103
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = heat
admin_password = tsj
1. mysql数据库中创建heat用户
# mysql -u root -p
mysql> CREATE DATABASE heat;
mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY 'HEAT_DBPASS';
mysql> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY 'tsj';
2. 同步数据库
heat-manage db_sync
1. 重启所有服务
cd /etc/init.d/; for i in $( ls heat-* ); do sudo service $i restart; done