OpenStack实践系列⑤网络服务Neutron

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:[email protected]: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
pro

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值