Perform Neutron actions based on target

1) Only generate neutron configuration files necessary for
   each target.
2) Limit database connection string in neutron.conf to server
   container.
3) Limit database sync to neutron server container.

Co-Authored-By: Matt Kassawara <mkassawara@gmail.com>
Change-Id: Iba8903235675dec4e7bf6b01eeb130f7b43bbfef
Closes-Bug: 1443927
This commit is contained in:
Tom Cameron 2015-04-15 15:11:12 -04:00 committed by Matthew Kassawara
parent 0ab205bcdb
commit 102fa9cf51
3 changed files with 19 additions and 3 deletions

View File

@ -19,7 +19,7 @@
- include: neutron_db_setup.yml
when: >
inventory_hostname == groups['neutron_all'][0]
inventory_hostname == groups['neutron_server'][0]
- include: neutron_service_setup.yml
when: >

View File

@ -27,6 +27,20 @@
- neutron-config
- name: Generate neutron Config
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "{{ neutron_system_user_name }}"
group: "{{ neutron_system_group_name }}"
with_items:
- { src: "neutron.conf.j2", dest: "/etc/neutron/neutron.conf" }
- { src: "plugins/ml2/ml2_conf.ini.j2", dest: "/etc/neutron/plugins/ml2/ml2_conf.ini" }
notify:
- Restart neutron services
tags:
- neutron-config
- name: Generate neutron agent only Config
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -38,10 +52,10 @@
- { src: "l3_agent.ini.j2", dest: "/etc/neutron/l3_agent.ini" }
- { src: "metadata_agent.ini.j2", dest: "/etc/neutron/metadata_agent.ini" }
- { src: "metering_agent.ini.j2", dest: "/etc/neutron/metering_agent.ini" }
- { src: "neutron.conf.j2", dest: "/etc/neutron/neutron.conf" }
- { src: "plugins/ml2/ml2_conf.ini.j2", dest: "/etc/neutron/plugins/ml2/ml2_conf.ini" }
notify:
- Restart neutron services
when: >
inventory_hostname in groups['neutron_agents_container']
tags:
- neutron-config

View File

@ -116,10 +116,12 @@ memcache_secret_key = {{ memcached_encryption_key }}
# if your keystone deployment uses PKI, and you value security over performance:
check_revocations_for_cached = False
{% if inventory_hostname in groups['neutron_server'] %}
[database]
connection = mysql://{{ neutron_galera_user }}:{{ neutron_container_mysql_password }}@{{ galera_address }}/{{ neutron_galera_database }}?charset=utf8
{% endif %}
[oslo_messaging_rabbit]
rabbit_port = {{ rabbitmq_port }}