Neutron Installation
I. Database Configuration
# mysql -uroot -p123456 MariaDB [(none)]> create database neutron; MariaDB [(none)]> grant all privileges on neutron.* to 'neutron'@'localhost' identified by '123456'; MariaDB [(none)]> grant all privileges on neutron.* to 'neutron'@'%' identified by '123456'; MariaDB [(none)]> exit
Creating service credentials and API endpoints
1. Effective environmental variables
# . admin-openrc
2. Create service credentials
# openstack user create --domain default --password-prompt neutron # openstack role add --project service --user neutron admin # openstack service create --name neutron --description "OpenStack Networking" network
3. Create API endpoints
# openstack endpoint create --region RegionOne network public http://controller:9696 # openstack endpoint create --region RegionOne network internal http://controller:9696 # openstack endpoint create --region RegionOne network admin http://controller:9696
Controller Node - Install and Configure Neutron Components
1. Installation of Neutron packages
# yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
2. Configuring the components required for Neutron
1) Edit/etc/neutron/neutron.conf file
# vi /etc/neutron/neutron.conf [DEFAULT] core_plugin = ml2 service_plugins = router allow_overlapping_ips = True rpc_backend = rabbit auth_strategy = keystone notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True [database] connection = mysql+pymysql://neutron:123456@controller/neutron [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = 123456 [nova] auth_url = http://controller:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = nova password = 123456 [oslo_concurrency] lock_path = /var/lib/neutron/tmp
2) Edit/etc/neutron/plugins/ml2/ml2_conf.ini file
# vi /etc/neutron/plugins/ml2/ml2_conf.ini [ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vxlan mechanism_drivers = linuxbridge,l2population extension_drivers = port_security [ml2_type_flat] flat_networks = provider [ml2_type_vxlan] vni_ranges = 1:1000 [securitygroup] enable_ipset = True
3) Edit/etc/neutron/plugins/ml2/linuxbridge_agent.ini file
# vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini [linux_bridge] physical_interface_mappings = provider:eno33554960(The name of the external network card of the physical machine) [vxlan] enable_vxlan = True local_ip = 192.168.100.10 l2_population = True [securitygroup] enable_security_group = True firewall_driver = neutron.virt.firewall.NoopFirewallDriver
4) Edit/etc/neutron/l3_agent.ini file
Note: external_network_bridge = null
# vi /etc/neutron/l3_agent.ini [DEFAULT] interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver external_network_bridge =
5) Edit/etc/neutron/dhcp_agent.ini file
# vi /etc/neutron/dhcp_agent.ini [DEFAULT] interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = True
6) Edit / etc/neutron/metadata_agent.ini file
Note: metadata proxy key, custom
# vi /etc/neutron/metadata_agent.ini [DEFAULT] nova_metadata_ip = controller metadata_proxy_shared_secret = 123456
7) Edit/etc/nova/nova.conf file
Note: metadata_proxy_shared_secret is the metadata proxy key just set
# vi /etc/nova/nova.conf [neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = 123456 service_metadata_proxy = True metadata_proxy_shared_secret = 123456
3. Create soft links
# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
4. Synchronized database
# 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
5. Start Nutron Service and Set Boot-Up Self-Start
# systemctl restart openstack-nova-api.service # systemctl start neutron-server.service neutron-linuxbridge-agent.service \ neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service # systemctl enable neutron-server.service neutron-linuxbridge-agent.service \ neutron-dhcp-agent.service neutron-metadata-agent.service neutron-l3-agent.service
Compute Node - Install and Configure Neutron Components
1. Packages needed to install Neutron components
# yum install -y openstack-neutron-linuxbridge ebtables ipset
2. Configuring the components required for Neutron
1) Edit/etc/neutron/neutron.conf file
# vi /etc/neutron/neutron.conf [DEFAULT] rpc_backend = rabbit auth_strategy = keystone [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = 123456 [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = 123456 [oslo_concurrency] lock_path = /var/lib/neutron/tmp
2) Edit/etc/neutron/plugins/ml2/linuxbridge_agent.ini file
# vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini [linux_bridge] physical_interface_mappings = provider:eno33554960 [vxlan] enable_vxlan = True local_ip = 192.168.100.20 l2_population = True [securitygroup] enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
3) Editing/etc/nova/nova.conf file
# vi /etc/nova/nova.conf [neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = 123456
3. Start Neutron Service and Set Boot-Up Self-Start
# systemctl restart openstack-nova-compute.service # systemctl enable neutron-linuxbridge-agent.service # systemctl start neutron-linuxbridge-agent.service
V. Verification of Neutron Services
# . admin-openrc # neutron ext-list
# neutron agent-list