2018-04-23 14:57:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Generate config files from environments values.
|
|
|
|
# These are to be passed to the docker container using -e
|
|
|
|
|
|
|
|
cat << EOF > /etc/neutron/neutron.conf
|
2018-04-23 15:07:18 +02:00
|
|
|
|
2018-04-23 14:57:26 +02:00
|
|
|
[DEFAULT]
|
|
|
|
core_plugin = ml2
|
2018-04-23 15:07:18 +02:00
|
|
|
service_plugins = router
|
|
|
|
allow_overlapping_ips = True
|
2018-04-23 14:57:26 +02:00
|
|
|
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$MY_IP
|
|
|
|
auth_strategy = keystone
|
|
|
|
notify_nova_on_port_status_changes = true
|
|
|
|
notify_nova_on_port_data_changes = true
|
|
|
|
dhcp_agents_per_network = 2
|
|
|
|
|
|
|
|
[agent]
|
|
|
|
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
|
|
|
|
|
|
|
[database]
|
|
|
|
connection = mysql+pymysql://$NEUTRON_USER:$NEUTRON_PASSWORD@mariadb/neutron
|
|
|
|
|
|
|
|
[keystone_authtoken]
|
|
|
|
auth_uri = http://$KEYSTONE_HOST:5000
|
|
|
|
auth_url = http://$KEYSTONE_HOST:35357
|
|
|
|
memcached_servers = $MEMCACHED_HOST:11211
|
|
|
|
auth_type = password
|
|
|
|
project_domain_name = Default
|
|
|
|
user_domain_name = Default
|
|
|
|
project_name = service
|
|
|
|
username = $NEUTRON_USER
|
|
|
|
password = $NEUTRON_PASSWORD
|
|
|
|
|
|
|
|
[nova]
|
|
|
|
auth_url = http://$KEYSTONE_HOST:35357
|
|
|
|
auth_type = password
|
|
|
|
project_domain_name = Default
|
|
|
|
user_domain_name = Default
|
|
|
|
region_name = RegionOne
|
|
|
|
project_name = service
|
|
|
|
username = $NOVA_USER
|
|
|
|
password = $NOVA_PASSWORD
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat << EOF > /etc/neutron/plugins/ml2/ml2_conf.ini
|
|
|
|
|
|
|
|
[ml2]
|
2018-04-23 15:07:18 +02:00
|
|
|
type_drivers = flat,vlan,vxlan
|
|
|
|
tenant_network_types = vxlan
|
|
|
|
mechanism_drivers = linuxbridge,l2population
|
2018-04-23 14:57:26 +02:00
|
|
|
|
2018-04-23 15:07:18 +02:00
|
|
|
[ml2_type_vxlan]
|
|
|
|
vni_ranges = 1:1000
|
|
|
|
|
2018-04-23 14:57:26 +02:00
|
|
|
EOF
|
|
|
|
|
2018-04-23 15:07:18 +02:00
|
|
|
cat << EOF > /etc/neutron/metadata_agent.ini
|
|
|
|
|
|
|
|
[DEFAULT]
|
|
|
|
nova_metadata_ip = $MY_IP
|
|
|
|
metadata_proxy_shared_secret = $METADATA_SECRET
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
2018-04-23 14:57:26 +02:00
|
|
|
cat << EOF > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
|
|
|
|
|
|
|
[linux_bridge]
|
|
|
|
physical_interface_mappings = $PHYSICAL_INTERFACE_MAPPINGS
|
|
|
|
|
|
|
|
[vxlan]
|
2018-04-23 15:07:18 +02:00
|
|
|
enable_vxlan = True
|
|
|
|
l2_population = True
|
|
|
|
local_ip = $OVERLAY_IP
|
2018-04-23 14:57:26 +02:00
|
|
|
|
|
|
|
[securitygroup]
|
2018-04-23 15:07:18 +02:00
|
|
|
firewall_driver = iptables
|
2018-04-23 14:57:26 +02:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2018-04-23 15:07:18 +02:00
|
|
|
cat << EOF > /etc/neutron/l3_agent.ini
|
2018-04-23 14:57:26 +02:00
|
|
|
|
|
|
|
[DEFAULT]
|
2018-04-23 15:07:18 +02:00
|
|
|
interface_driver = linuxbridge
|
|
|
|
external_network_bridge =
|
2018-04-23 14:57:26 +02:00
|
|
|
|
|
|
|
EOF
|