第七章 nova组件安装1

本文详细介绍了在OpenStack环境中配置Nova服务的过程,包括在Keystone中为Nova增加用户、赋予角色、添加服务入口,以及创建Nova所需数据库的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、在控制节点上,keystone中为nova增加用户、赋予角色、添加服务入口
export controller1=192.168.222.29
# add nova user (set in service project)
openstack user create --domain default --project service --password servicepassword nova

# add nova user in admin role
openstack role add --project service --user nova admin
# add placement user (set in service project)
openstack user create --domain default --project service --password servicepassword placement

# add placement user in admin role
openstack role add --project service --user placement admin
# add service entry for nova
openstack service create --name nova --description "OpenStack Compute service" compute

# add service entry for placement
openstack service create --name placement --description "OpenStack Compute Placement service" placement

# add endpoint for nova (public)
openstack endpoint create --region RegionOne compute public http://$controller1:8774/v2.1/%\(tenant_id\)s

# add endpoint for nova (internal)
openstack endpoint create --region RegionOne compute internal http://$controller1:8774/v2.1/%\(tenant_id\)s

# add endpoint for nova (admin)
openstack endpoint create --region RegionOne compute admin http://$controller1:8774/v2.1/%\(tenant_id\)s

# add endpoint for placement (public)
openstack endpoint create --region RegionOne placement public http://$controller1:8778

# add endpoint for placement (internal)
openstack endpoint create --region RegionOne placement internal http://$controller1:8778

# add endpoint for placement (admin)
openstack endpoint create --region RegionOne placement admin http://$controller1:8778

2、为nova创建数据库

mysql -u root -p
# 输入之前设置的数据库密码root
create database nova;
grant all privileges on nova.* to nova@'localhost' identified by 'password';
grant all privileges on nova.* to nova@'%' identified by 'password';
create database nova_api;
grant all privileges on nova_api.* to nova@'localhost' identified by 'password';
grant all privileges on nova_api.* to nova@'%' identified by 'password';
create database nova_placement;
grant all privileges on nova_placement.* to nova@'localhost' identified by 'password';
grant all privileges on nova_placement.* to nova@'%' identified by 'password';
create database nova_cell0;
grant all privileges on nova_cell0.* to nova@'localhost' identified by 'password';
grant all privileges on nova_cell0.* to nova@'%' identified by 'password';
flush privileges;
exit

 

转载于:https://www.cnblogs.com/shihongkuan/p/11399211.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值