Openstack I版 结合 Ceph 分布式存储 部署安装(七)

部署配置Neutron网络组件

配置Neutron网络(计算节点)

在compute节点上执行
开启内核转发
vi /etc/sysctl.conf

net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0

执行配置

sysctl -p

安装必须组件

yum install openstack-neutron-ml2 openstack-neutron-openvswitch -y

备份默认neutron配置文件

mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak

创建neutron配置文件
vi /etc/neutron/neutron.conf

[DEFAULT]
auth_strategy = keystone
rpc_backend = neutron.openstack.common.rpc.impl_qpid
qpid_hostname = controller
core_plugin = ml2
service_plugins = router
verbose = True
[quotas]
[agent]
[keystone_authtoken]
auth_uri = http://controller:5000
auth_host = controller
auth_protocol = http
auth_port = 35357
admin_tenant_name = service
admin_user = neutron
admin_password = NEUTRON_PASS
[database]
service_provider=VPN:openswan:neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default

备份ml2插件配置

mv /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.bak

创建ml2插件配置
vi /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch
[ml2_type_flat]
[ml2_type_vlan]
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
[ovs]
local_ip = 10.0.1.31
tunnel_type = gre
enable_tunneling = True

修改配置文件权限

chown -R root:neutron /etc/neutron/neutron.conf
chown -R root:neutron /etc/neutron/plugins/ml2/ml2_conf.ini

启动服务

service openvswitch start
chkconfig openvswitch on

删除KVM默认网桥

virsh net-destroy default
virsh net-undefine default

添加br-int网桥

ovs-vsctl add-br br-int

创建ml2配置文件软连接

ln -s plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
cp /etc/init.d/neutron-openvswitch-agent /etc/init.d/neutron-openvswitch-agent.orig
sed -i 's,plugins/openvswitch/ovs_neutron_plugin.ini,plugin.ini,g' /etc/init.d/neutron-openvswitch-agent

启动服务

service openstack-nova-compute restart
service neutron-openvswitch-agent start
chkconfig neutron-openvswitch-agent on

同样的步骤添加compute02节点,同时要注意机器名和IP地址必须要修改为对应的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值