Convert Neutron config to nested
Change-Id: I6cde84fa3acf3a38d2a4323439dc76baf928696f
This commit is contained in:
parent
4eb4d7bfc0
commit
a8f3dc671d
@ -1,17 +1,21 @@
|
||||
configs:
|
||||
neutron_db_password: password
|
||||
neutron_db_name: neutron
|
||||
neutron_db_username: neutron
|
||||
neutron_server_port: 9696
|
||||
neutron_bridge_name: "br-ex"
|
||||
neutron_external_interface: "eth2"
|
||||
neutron_logging_debug: false
|
||||
neutron_plugin_agent: "openvswitch"
|
||||
neutron_ovsdb_interface: "native"
|
||||
neutron_ovsdb_connection: "unix:/run/openvswitch/db.sock"
|
||||
enable_neutron_lbaas: false
|
||||
enable_neutron_qos: false
|
||||
ovs_db_loglevel: "info"
|
||||
neutron:
|
||||
db:
|
||||
password: password
|
||||
name: neutron
|
||||
username: neutron
|
||||
server_port: 9696
|
||||
bridge_name: "br-ex"
|
||||
external_interface: "eth2"
|
||||
logging_debug: false
|
||||
plugin_agent: "openvswitch"
|
||||
ovsdb:
|
||||
interface: "native"
|
||||
connection: "unix:/run/openvswitch/db.sock"
|
||||
enable_lbaas: false
|
||||
enable_qos: false
|
||||
ovs_db:
|
||||
loglevel: "info"
|
||||
|
||||
sources:
|
||||
openstack/neutron:
|
||||
|
@ -3,5 +3,5 @@
|
||||
dnsmasq_config_file = /etc/neutron/dnsmasq.conf
|
||||
|
||||
[ovs]
|
||||
ovsdb_interface = {{ neutron_ovsdb_interface }}
|
||||
ovsdb_connection = {{ neutron_ovsdb_connection }}
|
||||
ovsdb_interface = {{ neutron.ovsdb.interface }}
|
||||
ovsdb_connection = {{ neutron.ovsdb.connection }}
|
||||
|
@ -4,13 +4,13 @@
|
||||
type_drivers = flat,vlan,vxlan
|
||||
tenant_network_types = vxlan
|
||||
|
||||
{% if neutron_plugin_agent == "openvswitch" %}
|
||||
{% if neutron.plugin_agent == "openvswitch" %}
|
||||
mechanism_drivers = openvswitch,l2population
|
||||
{% elif neutron_plugin_agent == "linuxbridge" %}
|
||||
{% elif neutron.plugin_agent == "linuxbridge" %}
|
||||
mechanism_drivers = linuxbridge,l2population
|
||||
{% endif %}
|
||||
|
||||
{% if enable_neutron_qos %}
|
||||
{% if neutron.enable_qos %}
|
||||
extension_drivers = qos
|
||||
{% endif %}
|
||||
|
||||
@ -25,25 +25,25 @@ vni_ranges = 1:1000
|
||||
vxlan_group = 239.1.1.1
|
||||
|
||||
[securitygroup]
|
||||
{% if neutron_plugin_agent == "openvswitch" %}
|
||||
{% if neutron.plugin_agent == "openvswitch" %}
|
||||
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
|
||||
{% elif neutron_plugin_agent == "linuxbridge" %}
|
||||
{% elif neutron.plugin_agent == "linuxbridge" %}
|
||||
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
||||
{% endif %}
|
||||
|
||||
{% if neutron_plugin_agent == "openvswitch" %}
|
||||
{% if neutron.plugin_agent == "openvswitch" %}
|
||||
[agent]
|
||||
tunnel_types = vxlan
|
||||
l2_population = true
|
||||
arp_responder = true
|
||||
|
||||
[ovs]
|
||||
ovsdb_interface = {{ neutron_ovsdb_interface }}
|
||||
ovsdb_connection = {{ neutron_ovsdb_connection }}
|
||||
bridge_mappings = physnet1:{{ neutron_bridge_name }}
|
||||
{% elif neutron_plugin_agent == "linuxbridge" %}
|
||||
ovsdb_interface = {{ neutron.ovsdb.interface }}
|
||||
ovsdb_connection = {{ neutron.ovsdb.connection }}
|
||||
bridge_mappings = physnet1:{{ neutron.bridge_name }}
|
||||
{% elif neutron.plugin_agent == "linuxbridge" %}
|
||||
[linux_bridge]
|
||||
physical_interface_mappings = physnet1:{{ neutron_external_interface }}
|
||||
physical_interface_mappings = physnet1:{{ neutron.external_interface }}
|
||||
|
||||
|
||||
[vxlan]
|
||||
|
@ -1,29 +1,29 @@
|
||||
# neutron.conf
|
||||
[DEFAULT]
|
||||
debug = {{ neutron_logging_debug }}
|
||||
debug = {{ neutron.logging_debug }}
|
||||
|
||||
use_stderr = True
|
||||
use_syslog = False
|
||||
|
||||
bind_host = {{ network_topology["private"]["address"] }}
|
||||
bind_port = {{ neutron_server_port }}
|
||||
bind_port = {{ neutron.server_port }}
|
||||
|
||||
api_paste_config = /usr/share/neutron/api-paste.ini
|
||||
endpoint_type = internalURL
|
||||
|
||||
metadata_proxy_socket = /var/lib/neutron/ccp/metadata_proxy
|
||||
|
||||
{% if neutron_plugin_agent == "openvswitch" %}
|
||||
{% if neutron.plugin_agent == "openvswitch" %}
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
{% elif neutron_plugin_agent == "linuxbridge" %}
|
||||
{% elif neutron.plugin_agent == "linuxbridge" %}
|
||||
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
|
||||
{% endif %}
|
||||
|
||||
allow_overlapping_ips = true
|
||||
core_plugin = ml2
|
||||
service_plugins = router{% if enable_neutron_lbaas %},neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2{% endif %}{% if enable_neutron_qos %},qos{% endif %}
|
||||
service_plugins = router{% if neutron.enable_lbaas %},neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2{% endif %}{% if neutron.enable_qos %},qos{% endif %}
|
||||
|
||||
{% if enable_neutron_lbaas %}
|
||||
{% if neutron.enable_lbaas %}
|
||||
[service_providers]
|
||||
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
|
||||
{% endif %}
|
||||
@ -54,7 +54,7 @@ rabbit_hosts = {{ address('rabbitmq') }}:{{ rabbitmq.port }}
|
||||
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
|
||||
[database]
|
||||
connection = mysql+pymysql://{{ neutron_db_username }}:{{ neutron_db_password }}@{{ address('mariadb') }}/{{ neutron_db_name }}
|
||||
connection = mysql+pymysql://{{ neutron.db.username }}:{{ neutron.db.password }}@{{ address('mariadb') }}/{{ neutron.db.name }}
|
||||
max_retries = -1
|
||||
|
||||
[keystone_authtoken]
|
||||
@ -64,8 +64,8 @@ auth_type = password
|
||||
project_domain_id = default
|
||||
user_domain_id = default
|
||||
project_name = service
|
||||
username = {{ neutron_db_username }}
|
||||
password = {{ neutron_db_password }}
|
||||
username = {{ neutron.db.username }}
|
||||
password = {{ neutron.db.password }}
|
||||
memcached_servers = {{ address('memcached') }}:{{ memcached.port }}
|
||||
|
||||
[oslo_messaging_notifications]
|
||||
|
@ -1,7 +1,7 @@
|
||||
service:
|
||||
name: neutron-server
|
||||
ports:
|
||||
- {{ neutron_server_port }}
|
||||
- {{ neutron.server_port }}
|
||||
containers:
|
||||
- name: neutron-server
|
||||
image: neutron-server
|
||||
@ -13,8 +13,8 @@ service:
|
||||
dependencies:
|
||||
- mariadb
|
||||
type: single
|
||||
command: mysql -u root -p{{ db.root_password }} -h {{ address('mariadb') }} -e 'create database `{{ neutron_db_name }}`;
|
||||
grant all privileges on `{{ neutron_db_name }}`.* to "{{ neutron_db_username }}"@"%" identified by "{{ neutron_db_password }}"'
|
||||
command: mysql -u root -p{{ db.root_password }} -h {{ address('mariadb') }} -e 'create database `{{ neutron.db.name }}`;
|
||||
grant all privileges on `{{ neutron.db.name }}`.* to "{{ neutron.db.username }}"@"%" identified by "{{ neutron.db.password }}"'
|
||||
- name: neutron-db-sync
|
||||
type: single
|
||||
command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
|
||||
@ -28,12 +28,12 @@ service:
|
||||
dependencies:
|
||||
- keystone-create-project
|
||||
type: single
|
||||
command: openstack user create --project service --password {{ neutron_db_password }} {{ neutron_db_username }}
|
||||
command: openstack user create --project service --password {{ neutron.db.password }} {{ neutron.db.username }}
|
||||
- name: neutron-role-add
|
||||
dependencies:
|
||||
- neutron-user-create
|
||||
type: single
|
||||
command: openstack role add --project service --user {{ neutron_db_username }} admin
|
||||
command: openstack role add --project service --user {{ neutron.db.username }} admin
|
||||
- name: neutron-service-create
|
||||
dependencies:
|
||||
- keystone
|
||||
@ -43,17 +43,17 @@ service:
|
||||
dependencies:
|
||||
- neutron-service-create
|
||||
type: single
|
||||
command: openstack endpoint create --region RegionOne network public http://{{ address('neutron-server') }}:{{ neutron_server_port }}
|
||||
command: openstack endpoint create --region RegionOne network public http://{{ address('neutron-server') }}:{{ neutron.server_port }}
|
||||
- name: neutron-internal-endpoint-create
|
||||
dependencies:
|
||||
- neutron-service-create
|
||||
type: single
|
||||
command: openstack endpoint create --region RegionOne network internal http://{{ address('neutron-server') }}:{{ neutron_server_port }}
|
||||
command: openstack endpoint create --region RegionOne network internal http://{{ address('neutron-server') }}:{{ neutron.server_port }}
|
||||
- name: neutron-admin-endpoint-create
|
||||
dependencies:
|
||||
- neutron-service-create
|
||||
type: single
|
||||
command: openstack endpoint create --region RegionOne network admin http://{{ address('neutron-server') }}:{{ neutron_server_port }}
|
||||
command: openstack endpoint create --region RegionOne network admin http://{{ address('neutron-server') }}:{{ neutron.server_port }}
|
||||
daemon:
|
||||
command: neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||
files:
|
||||
|
@ -19,7 +19,7 @@ service:
|
||||
- rabbitmq
|
||||
- neutron-db-sync
|
||||
daemon:
|
||||
command: "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:{{ ovs_db_loglevel }} --remote=punix:/run/openvswitch/db.sock"
|
||||
command: "/usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:{{ ovs_db.loglevel }} --remote=punix:/run/openvswitch/db.sock"
|
||||
files:
|
||||
- openvswitch-db-bootstrap.sh
|
||||
files:
|
||||
|
@ -27,7 +27,7 @@ service:
|
||||
- vswitchd-bootstrap
|
||||
- openvswitch-db
|
||||
- name: vswitchd-setup-ovs-bridge
|
||||
command: /usr/local/bin/ovs-ensure-configured.sh {{ neutron_bridge_name }} {{ neutron_external_interface }}
|
||||
command: /usr/local/bin/ovs-ensure-configured.sh {{ neutron.bridge_name }} {{ neutron.external_interface }}
|
||||
dependencies:
|
||||
- vswitchd-check-ovs-db
|
||||
daemon:
|
||||
|
Loading…
Reference in New Issue
Block a user