From d1f2ec8c8af5aafa34a8f57711b95256b0304612 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 23 Jul 2015 15:20:33 +0000 Subject: [PATCH] Properly use all configs with neutron Change-Id: Ie347964d42e7060c69047b1aeece1cf0ad311ae6 Partially-Implements: blueprint ansible-service --- ansible/roles/neutron/tasks/config.yml | 36 +++++++++++++++++++ ansible/roles/neutron/tasks/start.yml | 2 +- .../roles/neutron/templates/dhcp_agent.ini.j2 | 2 +- .../roles/neutron/templates/ml2_conf.ini.j2 | 4 +-- .../neutron-dhcp-agent/config-external.sh | 2 +- .../neutron-metadata-agent/config-external.sh | 2 +- etc/kolla/config/neutron/dhcp_agent.ini | 0 etc/kolla/config/neutron/l3_agent.ini | 0 etc/kolla/config/neutron/metadata_agent.ini | 0 9 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 etc/kolla/config/neutron/dhcp_agent.ini create mode 100644 etc/kolla/config/neutron/l3_agent.ini create mode 100644 etc/kolla/config/neutron/metadata_agent.ini diff --git a/ansible/roles/neutron/tasks/config.yml b/ansible/roles/neutron/tasks/config.yml index b8f902dffe..eb012420e2 100644 --- a/ansible/roles/neutron/tasks/config.yml +++ b/ansible/roles/neutron/tasks/config.yml @@ -51,6 +51,42 @@ config_dest: "{{ node_config_directory }}/{{ service_name }}/neutron.conf" when: inventory_hostname in groups['neutron-agents'] +- include: ../../config.yml + vars: + service_name: "neutron-agents" + config_source: + - "roles/{{ project_name }}/templates/dhcp_agent.ini.j2" + - "/etc/kolla/config/{{ project_name }}/dhcp_agent.ini" + config_template_dest: + - "{{ node_templates_directory }}/{{ service_name }}/dhcp_agent.ini_minimal" + - "{{ node_templates_directory }}/{{ service_name }}/dhcp_agent.ini_augment" + config_dest: "{{ node_config_directory }}/{{ service_name }}/dhcp_agent.ini" + when: inventory_hostname in groups['neutron-agents'] + +- include: ../../config.yml + vars: + service_name: "neutron-agents" + config_source: + - "roles/{{ project_name }}/templates/l3_agent.ini.j2" + - "/etc/kolla/config/{{ project_name }}/l3_agent.ini" + config_template_dest: + - "{{ node_templates_directory }}/{{ service_name }}/l3_agent.ini_minimal" + - "{{ node_templates_directory }}/{{ service_name }}/l3_agent.ini_augment" + config_dest: "{{ node_config_directory }}/{{ service_name }}/l3_agent.ini" + when: inventory_hostname in groups['neutron-agents'] + +- include: ../../config.yml + vars: + service_name: "neutron-agents" + config_source: + - "roles/{{ project_name }}/templates/metadata_agent.ini.j2" + - "/etc/kolla/config/{{ project_name }}/metadata_agent.ini" + config_template_dest: + - "{{ node_templates_directory }}/{{ service_name }}/metadata_agent.ini_minimal" + - "{{ node_templates_directory }}/{{ service_name }}/metadata_agent.ini_augment" + config_dest: "{{ node_config_directory }}/{{ service_name }}/metadata_agent.ini" + when: inventory_hostname in groups['neutron-agents'] + - include: ../../config.yml vars: service_name: "neutron-agents" diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index 27a4491bc9..3bb45f73d6 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -37,6 +37,7 @@ container_privileged: "True" container_volumes: - "/run:/run" + - "/lib/modules:/lib/modules:ro" - "{{ node_config_directory }}/neutron-openvswitch-agent/:/opt/kolla/neutron-openvswitch-agent/:ro" when: inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'] @@ -59,7 +60,6 @@ KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" container_image: "{{ docker_neutron_server_image_full }}" container_name: "neutron_server" - container_privileged: "True" container_volumes: - "{{ node_config_directory }}/neutron-server/:/opt/kolla/neutron-server/:ro" when: inventory_hostname in groups['neutron-server'] diff --git a/ansible/roles/neutron/templates/dhcp_agent.ini.j2 b/ansible/roles/neutron/templates/dhcp_agent.ini.j2 index be18730d23..e9564fca38 100644 --- a/ansible/roles/neutron/templates/dhcp_agent.ini.j2 +++ b/ansible/roles/neutron/templates/dhcp_agent.ini.j2 @@ -1,4 +1,4 @@ [DEFAULT] # DHCP Agent -dnsmasq_config_file = /etc/neutron/dnsmasq.conf +#dnsmasq_config_file = /etc/neutron/dnsmasq.conf dhcp_delete_namespaces = true diff --git a/ansible/roles/neutron/templates/ml2_conf.ini.j2 b/ansible/roles/neutron/templates/ml2_conf.ini.j2 index 772e8fd9d2..561ea3323d 100644 --- a/ansible/roles/neutron/templates/ml2_conf.ini.j2 +++ b/ansible/roles/neutron/templates/ml2_conf.ini.j2 @@ -7,10 +7,10 @@ tenant_network_types = vxlan mechanism_drivers = openvswitch,l2population [ml2_type_vlan] -network_vlan_ranges = external:1000:1999 +#network_vlan_ranges = external:1000:1999 [ml2_type_flat] -#flat_networks = external +flat_networks = external [ml2_type_gre] tunnel_id_ranges = 1:1000 diff --git a/docker/common/neutron/neutron-dhcp-agent/config-external.sh b/docker/common/neutron/neutron-dhcp-agent/config-external.sh index ccf5cbe78a..badbd86a10 100755 --- a/docker/common/neutron/neutron-dhcp-agent/config-external.sh +++ b/docker/common/neutron/neutron-dhcp-agent/config-external.sh @@ -1,5 +1,5 @@ #!/bin/bash -SOURCES="/opt/kolla/neutron-dhcp-agent/neutron.conf /opt/kolla/neutron-dhcp-agent/dhcp_agent.ini /opt/kolla/neutron-dhcp-agent/dnsmasq.conf" +SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/dhcp_agent.ini /opt/kolla/neutron-agents/dnsmasq.conf" TARGET="/etc/neutron/" OWNER="neutron" diff --git a/docker/common/neutron/neutron-metadata-agent/config-external.sh b/docker/common/neutron/neutron-metadata-agent/config-external.sh index 1d39217826..319ee3793c 100755 --- a/docker/common/neutron/neutron-metadata-agent/config-external.sh +++ b/docker/common/neutron/neutron-metadata-agent/config-external.sh @@ -1,5 +1,5 @@ #!/bin/bash -SOURCES="/opt/kolla/neutron-metadata-agent/neutron.conf /opt/kolla/neutron-metadata-agent/metadata_agent.ini" +SOURCES="/opt/kolla/neutron-agents/neutron.conf /opt/kolla/neutron-agents/metadata_agent.ini" TARGET="/etc/neutron/" OWNER="neutron" diff --git a/etc/kolla/config/neutron/dhcp_agent.ini b/etc/kolla/config/neutron/dhcp_agent.ini new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/kolla/config/neutron/l3_agent.ini b/etc/kolla/config/neutron/l3_agent.ini new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/kolla/config/neutron/metadata_agent.ini b/etc/kolla/config/neutron/metadata_agent.ini new file mode 100644 index 0000000000..e69de29bb2