Create database and grant privileges
CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'commonpass'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'commonpass'; FLUSH PRIVILEGES; exit
Create neutron user and add admin role
. admin-openrc openstack user create --domain default --password-prompt neutron openstack role add --project service --user neutron admin
Create service entity and end points
openstack service create --name neutron --description "OpenStack Networking" network 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
Preferring to go with Self Service Networks option – Install the required components
apt install -y neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent neutron-l3-agent
Update /etc/neutron/neutron.conf with following configurations in respective sections
[DEFAULT] core_plugin = ml2 service_plugins = router allow_overlapping_ips = true transport_url = rabbit://openstack:commonpass@controller auth_strategy = keystone notify_nova_on_port_status_changes = true notify_nova_on_port_data_changes = true [database] connection = mysql+pymysql://neutron:commonpass@controller/neutron [keystone_authtoken] www_authenticate_uri = http://controller:5000 auth_url = http://controller:5000 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = commonpass [nova] auth_url = http://controller:5000 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = nova password = commonpass [oslo_concurrency] lock_path = /var/lib/neutron/tmp
Configure the Modular Layer 2 (ML2) plug-in – edit /etc/neutron/plugins/ml2/ml2_conf.ini and update the following configurations in respective sections
[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
Configure the Linux bridge agent – edit /etc/neutron/plugins/ml2/linuxbridge_agent.ini and update the following configurations in respective sections
[linux_bridge] physical_interface_mappings = provider:eth1 [vxlan] enable_vxlan = true local_ip = 10.1.1.60 l2_population = true [securitygroup] enable_security_group = true firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
Configure the layer-3 agent – edit /etc/neutron/l3_agent.ini
[DEFAULT] interface_driver = linuxbridge
Configure the DHCP agent – edit /etc/neutron/dhcp_agent.ini
and update the following configurations
[DEFAULT] interface_driver = linuxbridge dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = true
Configure the metadata agent – Edit /etc/neutron/metadata_agent.ini
[DEFAULT] nova_metadata_host = controller metadata_proxy_shared_secret = commonpass
Configure the Compute service to use the Networking service – Edit the /etc/nova/nova.conf
[neutron] auth_url = http://controller:5000 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = commonpass service_metadata_proxy = true metadata_proxy_shared_secret = commonpass
Populate the 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
Restart the Compute API service, Networking services
service nova-api restart service neutron-server restart service neutron-linuxbridge-agent restart service neutron-dhcp-agent restart service neutron-metadata-agent restart service neutron-l3-agent restart