安装三节点OpenStack Queens集群–第8部分

在计算节点上配置Neutron

Neutron通常需要插件软件,例如OpenVswitch。我们已经在计算节点上安装了Libvirt和Nova Compute。添加Openvswitch和L2代理。

“确保在爱的宗教中没有追随者或不信者。爱包含一切。”-鲁米

第一步:在计算节点上安装Neutron服务

[[email protected] ~]# yum --enablerepo=centos-openstack-queens,epel -y install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch Loaded plugins: fastestmirror Determining fastest mirrors epel/x86_64/metalink                                                                      |  54 kB  00:00:01      base: mirror.ufs.ac.za centos-qemu-ev: mirror.pcsp.co.za epel: ftp.lysator.liu.se extras: mirror.pcsp.co.za updates: mirror.pcsp.co.za base                                                                                      | 3.6 kB  00:00:00      centos-ceph-luminous                                                                      | 2.9 kB  00:00:00      centos-openstack-queens                                                                   | 2.9 kB  00:00:00      centos-qemu-ev                                                                            | 2.9 kB  00:00:00      epel                                                                                      | 4.7 kB  00:00:00      extras                                                                                    | 3.4 kB  00:00:00      updates                                                                                   | 3.4 kB  00:00:00      (1/2): epel/x86_64/updateinfo                                                             | 1.0 MB  00:00:18      (2/2): epel/x86_64/primary_db                                                             | 6.6 MB  00:01:54      Resolving Dependencies 

步骤2: 备份原始中子配置文件并设置新的配置文件

[[email protected] ~]# mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak[[email protected] ~]# vim /etc/neutron/neutron.conf#New File [DEFAULT] core_plugin = ml2 service_plugins = router auth_strategy = keystone state_path = /var/lib/neutron allow_overlapping_ips = True# RabbitMQ connection info transport_url = rabbit://openstack:[email protected]# Keystone auth info [keystone_authtoken] www_authenticate_uri = http://192.168.122.130:5000 auth_url = http://192.168.122.130:5000 memcached_servers = 192.168.122.130:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = neutron123 [oslo_concurrency] lock_path = $state_path/lock

第三步: 更改中子文件权限和组信息

[[email protected] ~]# chmod 640 /etc/neutron/neutron.conf [[email protected] ~]# chgrp neutron /etc/neutron/neutron.conf

步骤4: 如下所示,一个一个地编辑以下文件。

[[email protected] ~]# vim /etc/neutron/plugins/ml2/ml2_conf.ini# on line 129 under ml2: add [ml2] type_drivers = flat,vlan,gre,vxlan tenant_network_types = mechanism_drivers = openvswitch,l2population extension_drivers = port_security
[[email protected] ~]# vim /etc/neutron/plugins/ml2/openvswitch_agent.ini# on line 308 or under [securitygroup]: add the following [securitygroup] firewall_driver = openvswitch enable_security_group = true enable_ipset = true
[[email protected] ~]# vim /etc/nova/nova.conf# add the following lines below the [DEFAULT] section use_neutron = True linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver vif_plugging_is_fatal = True vif_plugging_timeout = 300# add the following section to the end: Neutron auth information# make sure that metadata_proxy_shared_secret is the same with the one in metadata_agent.ini we had set before. [neutron] auth_url = http://192.168.122.130:5000 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = neutron123 service_metadata_proxy = True metadata_proxy_shared_secret = pepe123

完成后,您可以启动中子服务。是啊

[[email protected] ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini [[email protected] ~]# systemctl start openvswitch [[email protected] ~]# systemctl enable openvswitch Created symlink from /etc/systemd/system/multi-user.target.wants/openvswitch.service to /usr/lib/systemd/system/openvswitch.service. [[email protected] ~]# ovs-vsctl add-br br-int [[email protected] ~]# systemctl restart openstack-nova-compute [[email protected] ~]# systemctl start neutron-openvswitch-agent [[email protected] ~]# systemctl enable neutron-openvswitch-agent Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-openvswitch-agent.service to /usr/lib/systemd/system/neutron-openvswitch-agent.service. 

感谢您进行后续操作,这需要很长的旅程和一些细节,并且还会响起一个小的开放式堆栈集群。如果您错过了上一部续集,请点击以下链接。

在CentOS 7第1部分上安装Openstack 3节点集群

安装三节点OpenStack Queens集群–第2部分

安装三节点OpenStack Queens集群–第3部分

安装三节点OpenStack Queens集群–第4部分

安装三节点OpenStack Queens集群–第5部分

安装三节点OpenStack Queens集群–第6部分

安装三节点OpenStack Queens集群–第7部分

以下指南链接,第9部分在下面

安装三节点OpenStack Queens集群–第9部分

Sidebar