其他分享
首页 > 其他分享> > B08-openstack高可用(t版)-nova控制节点集群部署

B08-openstack高可用(t版)-nova控制节点集群部署

作者:互联网

1. 创建nova相关数据库

[root@controller01 ~]# mysql -u root -phuayun -e "CREATE DATABASE nova_api;"
[root@controller01 ~]# mysql -u root -phuayun -e "CREATE DATABASE nova;"
[root@controller01 ~]# mysql -u root -phuayun -e "CREATE DATABASE nova_cell0;"

[root@controller01 ~]# mysql -u root -phuayun -e "CREATE DATABASE nova_placement;"

 

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' \
-> IDENTIFIED BY 'huayun';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' \
-> IDENTIFIED BY 'huayun';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' \
-> IDENTIFIED BY 'huayun';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
-> IDENTIFIED BY 'huayun';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' \
-> IDENTIFIED BY 'huayun';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' \
-> IDENTIFIED BY 'huayun';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_placement.* TO 'nova'@'localhost' IDENTIFIED BY 'huayun';

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

2. 创建nova/placement-api

1)创建nova/plcement用户

[root@controller01 ~]# openstack user create --domain default --password=huayun nova

[root@controller01 ~]# openstack user create --domain default --password=huayun placement

 

 

2)为nova/placement用户赋予admin权限

[root@controller01 ~]# openstack role add --project service --user nova admin
[root@controller01 ~]# openstack role add --project service --user placement admin

3)创建nova/placement服务实体


[root@controller01 ~]# openstack service create --name nova   --description "OpenStack Compute" compute

[root@controller01 ~]#  openstack service create --name placement --description "Placement API" placement

 

 

4)创建/placement-api

# 注意--region与初始化admin用户时生成的region一致;
# api地址统一采用vip,如果public/internal/admin分别使用不同的vip,请注意区分;
# nova-api 服务类型为compute,placement-api服务类型为placement;
# nova public api

创建nova的api

[root@controller01 ~]# openstack endpoint create --region RegionOne   compute public http://10.100.214.200:8774/v2.1

[root@controller01 ~]#  openstack endpoint create --region RegionOne  compute internal http://10.100.214.200:8774/v2.1

[root@controller01 ~]#  openstack endpoint create --region RegionOne  compute admin http://10.100.214.200:8774/v2.1

 

 

 

 

 

 创建placement的api

[root@controller01 ~]# openstack endpoint create --region RegionOne  placement public http://10.100.214.200:8778

[root@controller01 ~]# openstack endpoint create --region RegionOne placement internal http://10.100.214.200:8778

[root@controller01 ~]# openstack endpoint create --region RegionOne placement admin http://10.100.214.200:8778

 

 

 

标签:placement,nova,api,controller01,B08,openstack,root
来源: https://www.cnblogs.com/zhaopei123/p/13121755.html