Access database as root:
Create neutron database:
Grant proper access to neutron user:
GRANT ALL PRIVILEGES ON neutron.* TO ' neutron' @' localhost' identified by ' password123' ;
GRANT ALL PRIVILEGES ON neutron.* TO ' neutron' @' %' identified by ' password123' ;
exit
Source .adminrc
Create service and creds
Create neutron user and add role:
openstack user create --domain default --password password123 neutron
openstack role add --project service --user neutron admin
openstack service create --name neutron \
--description " Openstack Networking" network
Create service API endpoints:
for i in public internal admin; \
do openstack endpoint create --region RegionOne \
network $i http://controller:9696; \
done
Install and configure componenets
Install packages:
apt install neutron-server neutron-plugin-ml2 -y
Backup an sanitize /etc/neutron/neutron.conf :
cp -p /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
grep -Ev ' ^(#|$)' /etc/neutron/neutron.conf.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/neutron.conf
Edit /etc/neutron/neutron.conf sections:
[DEFAULT]
# ...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:password123@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
[database]
# ...
# remove other connections
connection = mysql+pymysql://neutron:password123@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 = password123
[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 = password123
[oslo_concurrency]
# ...
lock_path = /var/lib/neutron/tmp
Remove unused sqlite database file:
rm -f /var/lib/neutron/neutron.sqlite
Fix packaging bug:
install -d /var/lib/neutron/tmp -o neutron -g neutron
Backup an sanitize /etc/neutron/plugins/ml2/ml2_conf.ini :
cp -p /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.bak
grep -Ev ' ^(#|$)' /etc/neutron/plugins/ml2/ml2_conf.ini.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/plugins/ml2/ml2_conf.ini
Edit /etc/neutron/plugins/ml2/ml2_conf.ini 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 nova to use neutron
Edit /etc/nova/nova.conf sections:
[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 = password123
service_metadata_proxy = true
metadata_proxy_shared_secret = s3cr3t_m3tadat4
Populate 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 compute API service:
Restart Networking API service
service neutron-server restart
Install and configure componenets
Install packages:
apt install neutron-server \
neutron-linuxbridge-agent neutron-l3-agent \
neutron-dhcp-agent neutron-metadata-agent \
python3-neutron-fwaas -y
Backup an sanitize /etc/neutron/neutron.conf :
cp -p /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
grep -Ev ' ^(#|$)' /etc/neutron/neutron.conf.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/neutron.conf
Edit /etc/neutron/neutron.conf sections:
[DEFAULT]
# ...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:password123@controller
auth_strategy = keystone
[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 = password123
[oslo_concurrency]
# ...
# make sure this dir exists
lock_path = /var/lib/neutron/tmp
Configure Linux bridge agent
Backup an sanitize /etc/neutron/plugins/ml2/linuxbridge_agent.ini :
cp -p /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak
grep -Ev ' ^(#|$)' /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
Edit /etc/neutron/plugins/ml2/linuxbridge_agent.ini sections:
[linux_bridge]
physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME
[securitygroup]
# ...
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
[vxlan]
enable_vxlan = true
local_ip = OVERLAY_INTERFACE_IP_ADDRESS
l2_population = true
Ensure network bridge filters enabled (br_netfilter kmod):
sysctl net.bridge.bridge-nf-call-iptables
sysctl net.bridge.bridge-nf-call-ip6tables
Backup an sanitize /etc/neutron/l3_agent.ini :
cp -p /etc/neutron/l3_agent.ini /etc/neutron/l3_agent.ini.bak
grep -Ev ' ^(#|$)' /etc/neutron/l3_agent.ini.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/l3_agent.ini
Edit /etc/neutron/l3_agent.ini sections:
[DEFAULT]
# ...
interface_driver = linuxbridge
Backup an sanitize /etc/neutron/dhcp_agent.ini :
cp -p /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.bak
grep -Ev ' ^(#|$)' /etc/neutron/dhcp_agent.ini.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/dhcp_agent.ini
Edit /etc/neutron/dhcp_agent.ini sections:
[DEFAULT]
# ...
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
Backup an sanitize ** /etc/neutron/metadata_agent.ini**:
cp -p /etc/neutron/metadata_agent.ini /etc/neutron/metadata_agent.ini.bak
grep -Ev ' ^(#|$)' /etc/neutron/metadata_agent.ini.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/metadata_agent.ini
Edit ** /etc/neutron/metadata_agent.ini** sections:
[DEFAULT]
# ...
nova_metadata_host = controller
metadata_proxy_shared_secret = s3cr3t_m3tadat4
Fix packaging bug:
install -d /var/lib/neutron/tmp -o neutron -g neutron
service neutron-linuxbridge-agent restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
service neutron-l3-agent restart
Install and configure components
Configure common component
Install packages:
apt install neutron-linuxbridge-agent -y
Backup an sanitize /etc/neutron/neutron.conf :
cp -p /etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak
grep -Ev ' ^(#|$)' /etc/neutron/neutron.conf.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/neutron.conf
Edit /etc/neutron/neutron.conf sections:
[DEFAULT]
# ...
transport_url = rabbit://openstack:password123@controller
auth_strategy = keystone
[database]
# NOTHING
[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 = password123
[oslo_concurrency]
# ...
lock_path = /var/lib/neutron/tmp
Fix packaging bug:
install -d /var/lib/neutron/tmp -o neutron -g neutron
Configure Linux bridge agent
Backup an sanitize /etc/neutron/plugins/ml2/linuxbridge_agent.ini :
cp -p /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak
grep -Ev ' ^(#|$)' /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak| sed ' /^\[.*]/i \ ' | tail -n +2 > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
Edit /etc/neutron/plugins/ml2/linuxbridge_agent.ini sections:
[linux_bridge]
physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME
[vxlan]
enable_vxlan = true
local_ip = OVERLAY_INTERFACE_IP_ADDRESS
l2_population = true
[securitygroup]
# ...
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
TODO: Is phys_interface_mappings required here?
Ensure network bridge filters enabled (br_netfilter kmod):
sysctl net.bridge.bridge-nf-call-iptables
sysctl net.bridge.bridge-nf-call-ip6tables
service nova-compute restart
Source .adminrc
Show network agents (should show 4 on network and 1 on compute):
openstack network agent list