OpenStack-M版(Mitaka)搭建基于(Centos7.2)+++六、Openstack网络服务(neutron)下

六、Openstack网络服务(neutron)下

计算节点上


安装

neutron安装在计算节点的部分(openstack-neutron-linuxbridge )


安装软件包

yum install openstack-neutron-linuxbridge ebtables ipset


修改配置文件 /etc/neutron/neutron.conf

vi /etc/neutron/neutron.conf

[DEFAULT]
rpc_backend = rabbit启用消息队列
auth_strategy = keystone启用keystone认证

配置消息队列

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = 123456

配置认证服务访问
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = 123456

配置锁路径
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

修改配置文件/etc/neutron/plugins/ml2/linuxbridge_agent.ini

Linuxbridge代理为实例建立layer-2虚拟网络并且处理安全组规则


vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini

将公共虚拟网络和公共物理网络接口对应起来

[linux_bridge]
physical_interface_mappings = provider:eno16777736(本机外网网卡名)

启用VXLAN覆盖网络

[vxlan]
enable_vxlan = True 启用代理VXLAN
local_ip = 192.168.100.20(本机内部网络ip地址)
l2_population = True扩展使用和ML2插件的l2population机制驱动

启用安全组

[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver配置linuxbridge iptables防火墙驱动程序


修改配置文件/etc/nova/nova.conf 

vi /etc/nova/nova.conf

配置neutron访问参数
[neutron]
url = http://controller:9696
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = 123456

重启计算服务

systemctl restart openstack-nova-compute.service

启动Linuxbridge代理并配置它开机自启动

systemctl enable neutron-linuxbridge-agent.service
systemctl start neutron-linuxbridge-agent.service


验证

列出加载的扩展来验证`neutron-server`进程是否正常启动

[root@controller ~]# neutron ext-list
+---------------------------+-----------------------------------------------+
| alias                     | name                                          |
+---------------------------+-----------------------------------------------+
| default-subnetpools       | Default Subnetpools                           |
| network-ip-availability   | Network IP Availability                       |
| network_availability_zone | Network Availability Zone                     |
| auto-allocated-topology   | Auto Allocated Topology Services              |
| ext-gw-mode               | Neutron L3 Configurable external gateway mode |
| binding                   | Port Binding                                  |
| agent                     | agent                                         |
| subnet_allocation         | Subnet Allocation                             |
| l3_agent_scheduler        | L3 Agent Scheduler                            |
| tag                       | Tag support                                   |
| external-net              | Neutron external network                      |
| net-mtu                   | Network MTU                                   |
| availability_zone         | Availability Zone                             |
| quotas                    | Quota management support                      |
| l3-ha                     | HA Router extension                           |
| provider                  | Provider Network                              |
| multi-provider            | Multi Provider Network                        |
| address-scope             | Address scope                                 |
| extraroute                | Neutron Extra Route                           |
| timestamp_core            | Time Stamp Fields addition for core resources |
| router                    | Neutron L3 Router                             |
| extra_dhcp_opt            | Neutron Extra DHCP opts                       |
| dns-integration           | DNS Integration                               |
| security-group            | security-group                                |
| dhcp_agent_scheduler      | DHCP Agent Scheduler                          |
| router_availability_zone  | Router Availability Zone                      |
| rbac-policies             | RBAC Policies                                 |
| standard-attr-description | standard-attr-description                     |
| port-security             | Port Security                                 |
| allowed-address-pairs     | Allowed Address Pairs                         |
| dvr                       | Distributed Virtual Router                    |
+---------------------------+-----------------------------------------------+

列出代理以验证启动 neutron 代理是否成功

[root@controller ~]# neutron agent-list
+-----------------------+--------------------+------------+-------------------+-------+----------------+--------------------------+
| id                    | agent_type         | host       | availability_zone | alive | admin_state_up | binary                   |
+-----------------------+--------------------+------------+-------------------+-------+----------------+--------------------------+
| 1576ae04-aff3-45af-   | DHCP agent         | controller | nova              | :-)   | True           | neutron-dhcp-agent       |
| 8a5e-d83f84c78555     |                    |            |                   |       |                |                          |
| 2a21a914-d1cb-4b37-a8 | Linux bridge agent | compute    |                   | :-)   | True           | neutron-linuxbridge-     |
| f1-4b295403ac8c       |                    |            |                   |       |                | agent                    |
| 88d5d470-f5d3-41b7-a6 | Metadata agent     | controller |                   | :-)   | True           | neutron-metadata-agent   |
| 00-9d7fdcddc930       |                    |            |                   |       |                |                          |
| db07bd42-504e-4b7c-   | Linux bridge agent | controller |                   | :-)   | True           | neutron-linuxbridge-     |
| b5a6-badbcd0547ef     |                    |            |                   |       |                | agent                    |
| e3606dd1-ed63-4f66    | L3 agent           | controller | nova              | :-)   | True           | neutron-l3-agent         |
| -b3db-fdeafdf5ffa7    |                    |            |                   |       |                |                          |
+-----------------------+--------------------+------------+-------------------+-------+----------------+--------------------------+

全部笑脸为启动成功,如果compute节点down掉了除了可以检查配置文件,还可以查看一下两边节点时间是否同步


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值