nova计算服务(控制节点)
- 创建数据库
mysql -uroot -p
CREATE DATABASE nova_api;
CREATE DATABASE nova;
CREATE DATABASE nova_cell0;
- 授权访问数据库,设置用户密码为:nova/nova
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'nova';
FLUSH PRIVILEGES;
- 在keystone上注册nova服务
– 创建nova用户,密码自定义为nova
openstack user create --domain default --password-prompt nova
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | cf5b4a1ac9284483a8601ce212b2150b |
| name | nova |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
- 为nova用户的service项目添加admin角色权限,命令无输出
openstack role add --project service --user nova admin
- 创建nova服务实体
openstack service create --name nova --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Compute |
| enabled | True |
| id | 91ef7780ac984136ac0a98a8382f97f0 |
| name | nova |
| type | compute |
+-------------+----------------------------------+
- 创建nova API服务端点(endpoint)
openstack endpoint create --region RegionOne compute public http://controller-01:8774/v2.1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 70039fd4b0434a79a3da46135a594e40 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 91ef7780ac984136ac0a98a8382f97f0 |
| service_name | nova |
| service_type | compute |
| url | http://controller-01:8774/v2.1 |
+--------------+----------------------------------+
openstack endpoint create --region RegionOne compute internal http://controller-01:8774/v2.1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 71103854136c433e80868ed03405b3e3 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 91ef7780ac984136ac0a98a8382f97f0 |
| service_name | nova |
| service_type | compute |
| url | http://controller-01:8774/v2.1 |
+--------------+----------------------------------+
openstack endpoint create --region RegionOne compute admin http://controller-01:8774/v2.1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 54f013b9691d4e7d88e6d49334e7d16b |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 91ef7780ac984136ac0a98a8382f97f0 |
| service_name | nova |
| service_type | compute |
| url | http://controller-01:8774/v2.1 |
+--------------+----------------------------------+
- 创建Placement服务用户,密码自定义为placement
openstack user create --domain default --password-prompt placement
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 46cd680656344258993928db3717f8ff |
| name | placement |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+