Openstack+Ceph 安装及配置-06.1-Openstack-Yoga Neutron安装-控制节点

Openstack Yoga版本Neutron安装-控制节点


配置数据库

[root@node-1 ~]# mysql -u root -p
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'Neutrone123';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'Neutrone123';

添加neutron用户

[root@node-1 ~]# openstack user create --domain default --password-prompt neutron
User Password: Neutrone123
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 3121c9297f0c4bc180f8488b70ea5799 |
| name | neutron |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+

添加admin角色到neutron用户

[root@node-1 ~]# openstack role add --project service --user neutron admin

创建neutron服务实体

[root@node-1 ~]# openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | d59a16b644d140eeb8cc73922e7b9b8c |
| name | neutron |
| type | network |
+-------------+----------------------------------+

创建网络服务API endpoint

[root@node-1 ~]# openstack endpoint create --region RegionOne network public http://node-1:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | be5eaad3f262404d82edecf1f72b95aa |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | d59a16b644d140eeb8cc73922e7b9b8c |
| service_name | neutron |
| service_type | network |
| url | http://node-1:9696 |
+--------------+----------------------------------+
[root@node-1 ~]# openstack endpoint create --region RegionOne network internal http://node-1:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 75a2d2261fdb435ca4bb83e74ffb7827 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | d59a16b644d140eeb8cc73922e7b9b8c |
| service_name | neutron |
| service_type | network |
| url | http://node-1:9696 |
+--------------+----------------------------------+
[root@node-1 ~]# openstack endpoint create --region RegionOne network admin http://node-1:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 68848fecad364cee9347f1fff198f0c7 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | d59a16b644d140eeb8cc73922e7b9b8c |
| service_name | neutron |
| service_type | network |
| url | http://node-1:9696 |
+--------------+----------------------------------+

 

此处需要选择使用Provicer Networks 还是Self-service Networks。区别在于self-service network可以允许租户自行配置子网
self-server nework 需要先配置好Provicer Networks,
注意:Provicer Networks只能支持接入物理上已有网络,故修改为使用Self-service networks

 

posted @ 2023-02-21 16:24  苦逼挨踢男  阅读(32)  评论(0编辑  收藏  举报