Replace config-external with a JSON file for Neutron (thin)
This is only for the Neutron thin containers. The Neutron agents are still in a fat container. I'll replace in another patch. Change-Id: I8533af52bfa3f268aa8ffb1c16ae49f5a300da27 Partially-Implements: blueprint replace-config-external
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: bootstrap_neutron
|
name: bootstrap_neutron
|
||||||
image: "{{ neutron_server_image_full }}"
|
image: "{{ neutron_server_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/neutron-server/:/opt/kolla/neutron-server/:ro"
|
volumes: "{{ node_config_directory }}/neutron-server/:/opt/kolla/config_files/:ro"
|
||||||
env:
|
env:
|
||||||
KOLLA_BOOTSTRAP:
|
KOLLA_BOOTSTRAP:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
|
|||||||
@@ -136,3 +136,20 @@
|
|||||||
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_augment"
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_augment"
|
||||||
config_dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
|
||||||
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
||||||
|
|
||||||
|
- name: Copying Neutron Server JSON configuration file
|
||||||
|
template:
|
||||||
|
src: "roles/neutron/templates/neutron-server.json.j2"
|
||||||
|
dest: "{{ node_config_directory }}/neutron-server/config.json"
|
||||||
|
|
||||||
|
- name: Copying Neutron OpenVSwitch JSON configuration file
|
||||||
|
template:
|
||||||
|
src: "roles/neutron/templates/neutron-openvswitch-agent.json.j2"
|
||||||
|
dest: "{{ node_config_directory }}/neutron-openvswitch-agent/config.json"
|
||||||
|
when: neutron_plugin_agent == "openvswitch"
|
||||||
|
|
||||||
|
- name: Copying Neutron Linuxbridge JSON configuration file
|
||||||
|
template:
|
||||||
|
src: "roles/neutron/templates/neutron-server.json.j2"
|
||||||
|
dest: "{{ node_config_directory }}/neutron-linuxbridge-agent/config.json"
|
||||||
|
when: neutron_plugin_agent == "linuxbridge"
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: neutron_server
|
name: neutron_server
|
||||||
image: "{{ neutron_server_image_full }}"
|
image: "{{ neutron_server_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/neutron-server/:/opt/kolla/neutron-server/:ro"
|
volumes: "{{ node_config_directory }}/neutron-server/:/opt/kolla/config_files/:ro"
|
||||||
env:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['neutron-server']
|
when: inventory_hostname in groups['neutron-server']
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
volumes:
|
volumes:
|
||||||
- "/run:/run"
|
- "/run:/run"
|
||||||
- "/lib/modules:/lib/modules:ro"
|
- "/lib/modules:/lib/modules:ro"
|
||||||
- "{{ node_config_directory }}/neutron-openvswitch-agent/:/opt/kolla/neutron-openvswitch-agent/:ro"
|
- "{{ node_config_directory }}/neutron-openvswitch-agent/:/opt/kolla/config_files/:ro"
|
||||||
env:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
volumes:
|
volumes:
|
||||||
- "/run:/run"
|
- "/run:/run"
|
||||||
- "/lib/modules:/lib/modules:ro"
|
- "/lib/modules:/lib/modules:ro"
|
||||||
- "{{ node_config_directory }}/neutron-linuxbridge-agent/:/opt/kolla/neutron-linuxbridge-agent/:ro"
|
- "{{ node_config_directory }}/neutron-linuxbridge-agent/:/opt/kolla/config_files/:ro"
|
||||||
env:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
NEUTRON_BRIDGE: "br-ex"
|
NEUTRON_BRIDGE: "br-ex"
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"command": "/usr/bin/neutron-linuxbridge-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini",
|
||||||
|
"config_files": [
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/neutron.conf",
|
||||||
|
"dest": "/etc/neutron/neutron.conf",
|
||||||
|
"owner": "neutron",
|
||||||
|
"perm": "0600"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/ml2_conf.ini",
|
||||||
|
"dest": "/etc/neutron/plugins/ml2/ml2_conf.ini",
|
||||||
|
"owner": "neutron",
|
||||||
|
"perm": "0600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"command": "/usr/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini",
|
||||||
|
"config_files": [
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/neutron.conf",
|
||||||
|
"dest": "/etc/neutron/neutron.conf",
|
||||||
|
"owner": "neutron",
|
||||||
|
"perm": "0600"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/ml2_conf.ini",
|
||||||
|
"dest": "/etc/neutron/plugins/ml2/ml2_conf.ini",
|
||||||
|
"owner": "neutron",
|
||||||
|
"perm": "0600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
17
ansible/roles/neutron/templates/neutron-server.json.j2
Normal file
17
ansible/roles/neutron/templates/neutron-server.json.j2
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"command": "/usr/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini",
|
||||||
|
"config_files": [
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/neutron.conf",
|
||||||
|
"dest": "/etc/neutron/neutron.conf",
|
||||||
|
"owner": "neutron",
|
||||||
|
"perm": "0600"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/ml2_conf.ini",
|
||||||
|
"dest": "/etc/neutron/plugins/ml2/ml2_conf.ini",
|
||||||
|
"owner": "neutron",
|
||||||
|
"perm": "0600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/neutron-linuxbridge-agent"
|
|
||||||
ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini"
|
|
||||||
|
|
||||||
# Loading common functions.
|
# Loading common functions.
|
||||||
source /opt/kolla/kolla-common.sh
|
source /opt/kolla/kolla-common.sh
|
||||||
source /opt/kolla/config-sudoers.sh
|
source /opt/kolla/config-sudoers.sh
|
||||||
|
|
||||||
# Execute config strategy
|
# Generate run command
|
||||||
set_configs
|
python /opt/kolla/set_configs.py
|
||||||
|
CMD=$(cat /run_command)
|
||||||
|
|
||||||
exec $CMD $ARGS
|
exec $CMD
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/neutron-openvswitch-agent"
|
|
||||||
ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini"
|
|
||||||
|
|
||||||
# Loading common functions.
|
# Loading common functions.
|
||||||
source /opt/kolla/kolla-common.sh
|
source /opt/kolla/kolla-common.sh
|
||||||
source /opt/kolla/config-sudoers.sh
|
source /opt/kolla/config-sudoers.sh
|
||||||
|
|
||||||
# Execute config strategy
|
# Generate run command
|
||||||
set_configs
|
python /opt/kolla/set_configs.py
|
||||||
|
CMD=$(cat /run_command)
|
||||||
|
|
||||||
exec $CMD $ARGS
|
exec $CMD
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/neutron-server"
|
|
||||||
ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini"
|
|
||||||
|
|
||||||
# Loading common functions.
|
# Loading common functions.
|
||||||
source /opt/kolla/kolla-common.sh
|
source /opt/kolla/kolla-common.sh
|
||||||
|
|
||||||
# Execute config strategy
|
# Generate run command
|
||||||
set_configs
|
python /opt/kolla/set_configs.py
|
||||||
|
CMD=$(cat /run_command)
|
||||||
|
|
||||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
@@ -17,4 +15,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec $CMD $ARGS
|
exec $CMD
|
||||||
|
|||||||
Reference in New Issue
Block a user