Kilo Neutron配置文件

    xiaoxiao2021-03-25  134

    kilo neutron配置文件 1.1 controller节点: 1.1.1:root@controller:~#cat /etc/neutron/neutron.conf

    [DEFAULT] rpc_backend = rabbit auth_strategy = keystone service_plugins = router allow_overlapping_ips = True core_plugin = ml2 notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True nova_url = http://controller:8774/v2 verbose = True [agent] root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = Ch@123 [database] connection = mysql://neutron:Ch@123@controller/neutron [nova] auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = nova password = Ch@123 [oslo_concurrency] lock_path = $state_path/lock [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = Ch@123

    1.1.2:root@controller:~# cat /etc/neutron/plugins/ml2/ml2_conf.ini

    [ml2] type_drivers = flat,vlan,gre,vxlan tenant_network_types = gre mechanism_drivers = openvswitch [ml2_type_flat] [ml2_type_vlan] [ml2_type_gre] tunnel_id_ranges = 123:1000 [ml2_type_vxlan] [securitygroup] enable_security_group = True enable_ipset = True firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

    1.1.3: vi /etc/nova/nova.conf default段下面增加:

    network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver

    新增[neutron]段

    [neutron] url = http://controller:9696 auth_strategy = keystone admin_auth_url = http://controller:35357/v2.0 admin_tenant_name = service admin_username = neutron admin_password = Ch@123 service_metadata_proxy = True metadata_proxy_shared_secret = Ch@123

    1.2 network节点: 1.2.1 root@network:~# cat /etc/neutron/neutron.conf

    [DEFAULT] auth_strategy = keystone rpc_backend = rabbit core_plugin = ml2 service_plugins = router allow_overlapping_ips = True verbose = True [agent] root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = Ch@123 [oslo_concurrency] lock_path = $state_path/lock [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = Ch@123

    1.2.2 root@network:~# cat /etc/neutron/plugins/ml2/ml2_conf.ini

    [ml2] type_drivers = flat,vlan,gre,vxlan tenant_network_types = gre mechanism_drivers = openvswitch [ml2_type_flat] flat_networks = external [ml2_type_vlan] [ml2_type_gre] tunnel_id_ranges = 123:1000 [ml2_type_vxlan] [securitygroup] enable_security_group = True enable_ipset = True firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver [ovs] local_ip = 10.127.138.154 bridge_mappings = external:br-ex [agent] tunnel_types = gre

    1.2.3 root@network:~# cat /etc/neutron/l3_agent.ini

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

    1.2.4root@network:~# cat /etc/neutron/dhcp_agent.ini

    [DEFAULT] interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq dhcp_delete_namespaces = True verbose = True dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf

    1.2.5root@network:~# cat /etc/neutron/dnsmasq-neutron.conf

    dhcp-option-force=26,1454

    1.2.6root@network:~# cat /etc/neutron/metadata_agent.ini

    [DEFAULT] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_region = RegionOne auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = Ch@123 verbose = True nova_metadata_ip = controller metadata_proxy_shared_secret = Ch@123

    1.2.7 执行ovs-vsctl add-port br-ex eth0之前必须: 将eth0的IP挪到br-ex上,同事修改br-ex的mac,将它修改为eth0的mac,eth0的mac改为其它,我的network节点的eth0的IP是10.127.138.154,mac是fa:16:3e:4e:e7:d7;下面的命令要连续执行,否则会断网;

    ovs-vsctl add-br br-ex && ifconfig eth0 0 && ip link set br-ex up && ovs-vsctl add-port br-ex eth0 && ifconfig br-ex 10.127.138.154 netmask 255.255.255.0 && route add default gw 10.127.138.1 br-ex && ifconfig eth0 hw ether fa:16:3e:4e:e7:d8 && ifconfig br-ex hw ether fa:16:3e:4e:e7:d7

    1.3 compute节点: 1.3.1 root@compute1:~# cat /etc/neutron/neutron.conf

    [DEFAULT] core_plugin = ml2 service_plugins = router allow_overlapping_ips = True rpc_backend = rabbit auth_strategy = keystone verbose = True [agent] root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = Ch@123 [nova] [oslo_concurrency] lock_path = $state_path/lock [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = Ch@123

    1.3.2 root@compute1:~# cat /etc/neutron/plugins/ml2/ml2_conf.ini

    [ml2] type_drivers = flat,vlan,gre,vxlan tenant_network_types = gre mechanism_drivers = openvswitch [ml2_type_flat] [ml2_type_vlan] [ml2_type_gre] tunnel_id_ranges = 123:1000 [ml2_type_vxlan] [securitygroup] enable_security_group = True enable_ipset = True firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver [ovs] local_ip = 10.127.138.131 [agent] tunnel_types = gre

    1.3.3 root@compute1:~# vi /etc/nova/nova.conf [default]下面新增:

    network_api_class = nova.network.neutronv2.api.API security_group_api = neutron linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver

    新增段落[neutron]:

    [neutron] url = http://controller:9696 auth_strategy = keystone admin_auth_url = http://controller:35357/v2.0 admin_tenant_name = service admin_username = neutron admin_password = Ch@123

    1.3.4 配置compute2,通compute1,仅IP修改

    转载请注明原文地址: https://ju.6miu.com/read-5847.html

    最新回复(0)