OpenStack icehouse系列之网络节点搭建

OpenStack icehouse系列之网络节点搭建

我们接着上一篇博文OpenStack icehouse系列之控制节点搭建继续往下开始搭建下面是环境介绍。

网络节点:ml2openvswitchDHCPl3metadata

控制节点:mysqlkeystoneglancenovaneutrondashboardcinder

计算节点:nova-computeqemu-kvmopenvswitchml2

keystone:验证

glance:镜像

nova:计算

neutron:网络

Network setup (网络节点安装)

1.安装软件

apt-get install -y neutron-plugin-ml2 neutron-plugin-openvswitch-agent dnsmasq neutron-l3-agent neutron-dhcp-agent vlan bridge-utils

2.编辑/etc/sysctl.conf

vi /etc/sysctl.confnet.ipv4.ip_forward=1net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0

3.刷新下sysctl

sysctl -p

4.编辑/etc/neutron/neutron.conf

[DEFAULT]auth_strategy = keystonerpc_backend = neutron.openstack.common.rpc.impl_komburabbit_host = controllerreplace  core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin withcore_plugin = ml2service_plugins = routerallow_overlapping_ips = True [keystone_authtoken]auth_uri = http://controller:5000auth_host = controllerauth_port = 35357auth_protocol = httpadmin_tenant_name = serviceadmin_user = neutronadmin_password = service_pass

5.编辑/etc/neutron/l3_agent.ini

vi /etc/neutron/l3_agent.ini [DEFAULT]interface_driver = neutron.agent.linux.interface.OVSInterfaceDriveruse_namespaces = True

6.编辑/etc/neutron/dhcp_agent.ini

vi /etc/neutron/dhcp_agent.ini [DEFAULT]interface_driver = neutron.agent.linux.interface.OVSInterfaceDriverdhcp_driver = neutron.agent.linux.dhcp.Dnsmasquse_namespaces = True

7.编辑/etc/neutron/metadata_agent.ini

vi /etc/neutron/metadata_agent.ini [DEFAULT]auth_url = http://controller:5000/v2.0auth_region = regionOne admin_tenant_name = serviceadmin_user = neutronadmin_password = service_passnova_metadata_ip = controllermetadata_proxy_shared_secret = helloOpenStack

8.在控制节点配置/etc/nova/nova.conf

vi /etc/nova/nova.conf [DEFAULT]service_neutron_metadata_proxy = trueneutron_metadata_proxy_shared_secret = helloOpenStack service nova-api restart

9.编辑/etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]type_drivers = gretenant_network_types = gremechanism_drivers = openvswitch [ml2_type_gre]tunnel_id_ranges = 1:1000 [ovs]local_ip = 10.0.1.21tunnel_type = greenable_tunneling = True [securitygroup]firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriverenable_security_group = True

10.重启openvswitch服务

service openvswitch-switch restart

11.创建桥接

ovs-vsctl add-br br-int      VM-内部网络ovs-vsctl show :查看

ovs-vsctl add-br br-ex      VM-外部网络ovs-vsctl del-br br-int:删除

12.关联网卡

ovs-vsctl add-port br-ex eth2     eth2:外网卡

13.编辑/etc/network/interfaces

auto eth2iface eth2 inet manualup ifconfig $IFACE 0.0.0.0 upup ip link set $IFACE promisc ondown ip link set $IFACE promisc offdown ifconfig $IFACE down

14.重启网卡

ifdown eth2 && ifup eth2 ifdown br-ex && ifup br-ex

15.重启neutron服务

service neutron-plugin-openvswitch-agent restartservice neutron-dhcp-agent restartservice neutron-l3-agent restartservice neutron-metadata-agent restartservice dnsmasq restart

16.检查neutron服务状态

neutron agent-list

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值