標籤:openstack network icehouse neutron glance
openstack icehouse系列之網路節點搭建
我們接著上一篇博文openstack icehouse系列之控制節點搭建繼續往下開始搭建下面是環境介紹。
網路節點:ml2、openvswitch、DHCP、l3、metadata
控制節點:mysql、keystone、glance、nova、neutron、dashboard、cinder
計算節點:nova-compute、qemu-kvm、openvswitch、ml2
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
本文出自 “生活是一種態度” 部落格,請務必保留此出處http://sangh.blog.51cto.com/6892345/1564422
openstack icehouse系列之網路節點搭建