Oracle VM + centos7.1+openstack kilo 多结点安装教程---neutron的安装(2)

来源:互联网 发布:淘宝开店找货源 编辑:程序博客网 时间:2024/05/17 14:15

声明:最近在进行openstackkilo版本的安装,发现现有的网络教程非常少,而且多数教程并不能安装成功,故写此教程。openstack的安装较为复杂,本教程并不能保证在不同环境下也能将其安装成功。个人安装教程,也难免出错。同时,安装是在虚拟机环境下,真实安装环境需要进行更改。

 

转载请声明出处:

              作者:张某人ER     

              原文链接:http://blog.csdn.net/xinxing__8185/article/details/51353630

 

 第五部分 neutron的安装 (2)


netwrok节点的配置

相关配置文件

vim /etc/sysctl.conf


#添加net.ipv4.ip_forward=1net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0


sysctl -p #执行

  

安装包

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


进行相关配置

vim /etc/neutron/neutron.conf


[DEFAULT]verbose = True rpc_backend=rabbit [oslo_messaging_rabbit]rabbit_host= controllerrabbit_userid=openstackrabbit_password=openstackauth_strategy=keystone [keystone_authtoken]auth_uri = http://controller:5000auth_url = http://controller:35357auth_plugin = passwordproject_domain_id = defaultuser_domain_id = defaultproject_name = serviceusername = neutronpassword = neutron下面4行注释掉 [DEFAULT]core_plugin = ml2service_plugins = routerallow_overlapping_ips = True


vim /etc/neutron/plugins/ml2/ml2_conf.ini

type_drivers = flat,vlan,gre,vxlantenant_network_types = gremechanism_drivers = openvswitch[ml2_type_flat]flat_networks = external[ml2_type_gre]tunnel_id_ranges = 1:1000[securitygroup]enable_security_group = Trueenable_ipset = Truefirewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver[ovs]local_ip = INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS bridge_mappings = external:br-ex [agent]tunnel_types = gre

vim /etc/neutron/l3_agent.ini 

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriverexternal_network_bridge =router_delete_namespaces = True[DEFAULT] verbose=True

vim /etc/neutron/dhcp_agent.ini

[DEFAULT] verbose=Trueinterface_driver = neutron.agent.linux.interface.OVSInterfaceDriverdhcp_driver = neutron.agent.linux.dhcp.Dnsmasqdhcp_delete_namespaces = True


 vim /etc/neutron/metadata_agent.ini

在[DEFAULT]下添加 verbose=True  auth_uri = http://controller:5000auth_url = http://controller:35357auth_region = RegionOneauth_plugin = passwordproject_domain_id = defaultuser_domain_id = defaultproject_name = serviceusername = neutronpassword = neutron#注释掉下面的(如果有)#admin_tenant_name#admin_usernova_metadata_ip=controller
metadata_proxy_shared_secret = openstack  #替换METADATA_SECRET

 

在控制节点上

vim /etc/nova/nova.conf


在[neutron]标签下 service_meta_proxy=Truemetadata_proxy_shared_secret=openstack #替换METADATA_SECRET
systemctl restart openstack-nova-api.service

在网络节点上

systemctl enable openvswitch.servicesystemctl start openvswitch.service

注:添加初始网桥,并使该网桥连接一个网卡,该网卡为连接互联网的出口,配置时不用分配ip,BOOTPROTO=none

ovs-vsctl add-br br-exovs-vsctl add-port br-ex INTERFACE_NAME #替换NTERFACE_NAME


ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.inicp /usr/lib/systemd/system/neutron-openvswitch-agent.service /usr/lib/systemd/system/neutron-openvswitch-agent.service.origsed -i 's,plugins/openvswitch/ovs_neutron_plugin.ini,plugin.ini,g' /usr/lib/systemd/system/neutron-openvswitch-agent.service


systemctl enable neutron-openvswitch-agent.service neutron-l3-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-ovs-cleanup.servicesystemctl start neutron-openvswitch-agent.service neutron-l3-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service


在控制节点上

测试,查看一下相关服务是否正常

source admin-openrc.shneutron agent-listsystemctl status neutron-server.service

  


0 0
原创粉丝点击