OpenStack实践系列⑤网络服务Neutron
3.8 Neturn 服务部署
注册neutron服务
[root@node1 ~]# source admin-openrc.sh [root@node1 ~]# openstack service create --name neutron --description "OpenStack Networking" network +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | OpenStack Networking | | enabled | True | | id | 5ab9dbad533f409eb5ef4682f937c1b1 | | name | neutron | | type | network | +-------------+----------------------------------+ [root@node1 ~]# openstack endpoint create --region RegionOne network public http://192.168.3.199:9696 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | b1b8f5d4d51c408cbea79f2829d99bbc | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 5ab9dbad533f409eb5ef4682f937c1b1 | | service_name | neutron | | service_type | network | | url | http://192.168.3.199:9696 | +--------------+----------------------------------+ [root@node1 ~]# openstack endpoint create --region RegionOne network internal http://192.168.3.199:9696 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | d35182f4e62f49c88c25589e3ae436cb | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 5ab9dbad533f409eb5ef4682f937c1b1 | | service_name | neutron | | service_type | network | | url | http://192.168.3.199:9696 | +--------------+----------------------------------+ [root@node1 ~]# openstack endpoint create --region RegionOne network admin http://192.168.3.199:9696 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 0c1cbd066efc44c6b7e48e0d664e69d6 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 5ab9dbad533f409eb5ef4682f937c1b1 | | service_name | neutron | | service_type | network | | url | http://192.168.3.199:9696 | +--------------+----------------------------------+ 创建neutron用户,并添加大service项目,给予admin权限 [root@node1 ~]# openstack user create --domain default --password=neutron neutron +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | default | | enabled | True | | id | 5d2a9f0420c14fe9a8c1eeaaf1c70738 | | name | neutron | +-----------+----------------------------------+ [root@node1 ~]# openstack role add --project service --user neutron admin
编辑/etc/neutron/neutron.conf文件,并完成以下操作
在[database]部分,配置数据库访问
[database]
...
connection = mysql://neutron:neutron@192.168.3.199:3306/neutron
在[DEFAULT]部分,使模块化第2层(ML2)插件,路由器服务,和重叠的IP地址
[DEFAULT]
...
core_plugin = ml2
service_plugins = router # 服务插件为router
在[DEFAULT]和[oslo_messaging_rabbit]部分,配置RabbitMQ的消息队列访问
[DEFAULT]
...
rpc_backend = rabbit
state_path = /var/lib/neutron
[oslo_messaging_rabbit]
...
rabbit_host = 192.168.3.199
rabbit_port = 5672
rabbit_userid = openstack
rabbit_password = openstack
在[DEFAULT]和[keystone_authtoken]部分,配置认证服务的访问(注释或删除在[keystone_authtoken]任何其他选项。)
[DEFAULT]
...
auth_strategy = keystone
[keystone_authtoken]
...
auth_uri = http://192.168.3.199:5000
auth_url = http://192.168.3.199:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron
在[DEFAULT]和[nov

本文档详细介绍了OpenStack网络服务Neutron的配置过程,包括Neutron服务的注册、数据库配置、RabbitMQ消息队列设置、Keystone认证服务的访问配置、Nova通知配置、ML2插件配置、Linux桥接代理配置、DHCP和Metadata代理的配置,以及计算节点的配置,旨在实现OpenStack环境中网络服务的正常运行。

7368

被折叠的 条评论
为什么被折叠?



