OpenStack to build a private cloud-based enterprise (5) Neutron

1.Neutron installation

[root@linux-node1 ~]# yum install -y openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge ebtables


2.Neutron database configuration

[root@linux-node1 ~]# vim /etc/neutron/neutron.conf
[database]
connection = mysql+pymysql://neutron:[email protected]:3306/neutron


3.Keystone connection configuration

[DEFAULT]
…
auth_strategy = keystone

[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron


4.RabbitMQ settings

[root@linux-node1 ~]# vim /etc/neutron/neutron.conf
[DEFAULT]
transport_url = rabbit://openstack:[email protected]


5.Neutron Network Infrastructure Configuration

[DEFAULT]
core_plugin = ml2
service_plugins =


6. Network Topology Change Notification Configuration Nova

[DEFAULT]
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True

[nova]
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova


7. portion disposed in the path of the lock [oslo_concurrency]:

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp


8.Neutron ML2 Configuration

[Linux-node1 the root @ ~] # Vim /etc/neutron/plugins/ml2/ml2_conf.ini 
[ML2 are] 
type_drivers = Flat, VLAN, GRE, VXLAN, Geneve # multiple selection, so the choice on all drivers. 
tenant_network_types = flat, vlan, gre, vxlan, geneve # support multiple, so all types of network selection. 
mechanism_drivers = linuxbridge, openvswitch, l2population # select the plug-in driver to support multiple choice, open source has linuxbridge and openvswitch 
# Enable port security on the extended drive 
extension_drivers = port_security, qos 

[ml2_type_flat] 
# set up a network to provide 
flat_networks = Provider 

[SecurityGroup] 
# Enable IPSET 
enable_ipset = True

9.Neutron Linuxbridge Configuration

[root@linux-node1 ~]# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:eth0

[vxlan]
#禁止vxlan网络
enable_vxlan = False

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True


10.Neutron DHCP-Agent Configuration

[root@linux-node1 ~]# vim /etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = True


11.Neutron metadata placement
   

[root@linux-node1 ~]# vim /etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_host = 192.168.56.11

metadata_proxy_shared_secret = unixhot.com


12.Neutron configuration in nova.conf

[root@linux-node1 ~]# vim /etc/nova/nova.conf
[neutron]
url = http://192.168.56.11:9696
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
service_metadata_proxy = True
metadata_proxy_shared_secret = unixhot.com

[root@linux-node1 ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini


Database synchronization

[root@linux-node1 ~]# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron


13. Restart computing API service

# systemctl restart openstack-nova-api.service


Start and configure their network service boot from the start.

# systemctl enable neutron-server.service \
  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
  neutron-metadata-agent.service
# systemctl start neutron-server.service \
  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
  neutron-metadata-agent.service


14.Neutron service registration

# openstack service create --name neutron --description "OpenStack Networking" network
创建endpoint
# openstack endpoint create --region RegionOne network public http://192.168.56.11:9696
# openstack endpoint create --region RegionOne network internal http://192.168.56.11:9696
# openstack endpoint create --region RegionOne network admin http://192.168.56.11:9696


15. Test Neutron installation

[root@linux-node1 ~]# openstack network agent list


Neutron compute nodes are deployed

installation package

 [root@linux-node2 ~]# yum install -y openstack-neutron openstack-neutron-linuxbridge ebtables



1.Keystone connection configuration

[root@linux-node2 ~]# vim /etc/neutron/neutron.conf
[DEFAULT]
…
auth_strategy = keystone

[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron


2.RabbitMQ settings

[root @ Linux-node2 ~] # vim /etc/neutron/neutron.conf 
[DEFAULT] 
transport_url = The Rabbit: // OpenStack: [email protected] 
# Please note that the DEFAULT configuration section, because of how the profile a configuration transport_url


3. Lock path

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp


4. Configuration Configuration LinuxBridge

[root@linux-node1 ~]# scp /etc/neutron/plugins/ml2/linuxbridge_agent.ini 192.168.56.12:/etc/neutron/plugins/ml2/


The computing node is provided nova.conf

[root@linux-node2 ~]# vim /etc/nova/nova.conf
[neutron]
url = http://192.168.56.11:9696
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron


Restart computing services

[root@linux-node2 ~]# systemctl restart openstack-nova-compute.service


Start linuxbridge-agent computing node

[root@linux-node2 ~]# systemctl enable neutron-linuxbridge-agent.service
[root@linux-node2 ~]# systemctl start neutron-linuxbridge-agent.service


Testing on the control node installed Neutron

[root@linux-node1 ~]# source admin-openstack.sh
[root@linux-node1 ~]# openstack network agent list


To see if there linux-node2.example.com of Linux bridge agent

Guess you like

Origin www.cnblogs.com/zhanghn8/p/11278195.html