Replace config-external with a JSON file for Heat
Change-Id: Ie79667ec2f9b091403ead9abc3c0f85afb7944bc Partially-Implements: blueprint replace-config-external
This commit is contained in:
parent
57017b0acd
commit
6f9709ce9c
@ -41,7 +41,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: bootstrap_heat
|
||||
image: "{{ heat_api_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/heat-api/:ro"
|
||||
volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/config_files/:ro"
|
||||
env:
|
||||
KOLLA_BOOTSTRAP:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
|
@ -16,6 +16,11 @@
|
||||
- "{{ node_templates_directory }}/heat-engine/heat-engine.conf_augment"
|
||||
config_dest: "{{ node_config_directory }}/heat-engine/heat.conf"
|
||||
|
||||
- name: Copying Heat Engine JSON configuration file
|
||||
template:
|
||||
src: "roles/heat/templates/heat-engine.json.j2"
|
||||
dest: "{{ node_config_directory }}/heat-engine/config.json"
|
||||
|
||||
- include: ../../config.yml
|
||||
vars:
|
||||
service_name: "heat-api"
|
||||
@ -35,6 +40,11 @@
|
||||
- "{{ node_templates_directory }}/heat-api/heat-api.conf_augment"
|
||||
config_dest: "{{ node_config_directory }}/heat-api/heat.conf"
|
||||
|
||||
- name: Copying Heat API JSON configuration file
|
||||
template:
|
||||
src: "roles/heat/templates/heat-api.json.j2"
|
||||
dest: "{{ node_config_directory }}/heat-api/config.json"
|
||||
|
||||
- include: ../../config.yml
|
||||
vars:
|
||||
service_name: "heat-api-cfn"
|
||||
@ -53,3 +63,8 @@
|
||||
- "{{ node_templates_directory }}/heat-api-cfn/heat.conf_augment"
|
||||
- "{{ node_templates_directory }}/heat-api-cfn/heat-api-cfn.conf_augment"
|
||||
config_dest: "{{ node_config_directory }}/heat-api-cfn/heat.conf"
|
||||
|
||||
- name: Copying Heat-api-cfn JSON configuration file
|
||||
template:
|
||||
src: "roles/heat/templates/heat-api-cfn.json.j2"
|
||||
dest: "{{ node_config_directory }}/heat-api-cfn/config.json"
|
||||
|
@ -13,7 +13,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: heat_api
|
||||
image: "{{ heat_api_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/heat-api/:ro"
|
||||
volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/config_files/:ro"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['heat-api']
|
||||
@ -32,7 +32,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: heat_api_cfn
|
||||
image: "{{ heat_api_cfn_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/heat-api-cfn/:/opt/kolla/heat-api-cfn/:ro"
|
||||
volumes: "{{ node_config_directory }}/heat-api-cfn/:/opt/kolla/config_files/:ro"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['heat-api-cfn']
|
||||
@ -51,7 +51,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: heat_engine
|
||||
image: "{{ heat_engine_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/heat-engine/:/opt/kolla/heat-engine/:ro"
|
||||
volumes: "{{ node_config_directory }}/heat-engine/:/opt/kolla/config_files/:ro"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['heat-engine']
|
||||
|
11
ansible/roles/heat/templates/heat-api-cfn.json.j2
Normal file
11
ansible/roles/heat/templates/heat-api-cfn.json.j2
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"command": "/usr/bin/heat-api-cfn",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "/opt/kolla/config_files/heat.conf",
|
||||
"dest": "/etc/heat/heat.conf",
|
||||
"owner": "heat",
|
||||
"perm": "0600"
|
||||
}
|
||||
]
|
||||
}
|
11
ansible/roles/heat/templates/heat-api.json.j2
Normal file
11
ansible/roles/heat/templates/heat-api.json.j2
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"command": "/usr/bin/heat-api",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "/opt/kolla/config_files/heat.conf",
|
||||
"dest": "/etc/heat/heat.conf",
|
||||
"owner": "heat",
|
||||
"perm": "0600"
|
||||
}
|
||||
]
|
||||
}
|
11
ansible/roles/heat/templates/heat-engine.json.j2
Normal file
11
ansible/roles/heat/templates/heat-engine.json.j2
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"command": "/usr/bin/heat-engine",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "/opt/kolla/config_files/heat.conf",
|
||||
"dest": "/etc/heat/heat.conf",
|
||||
"owner": "heat",
|
||||
"perm": "0600"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/heat-api-cfn"
|
||||
ARGS=""
|
||||
|
||||
# Loading common functions.
|
||||
source /opt/kolla/kolla-common.sh
|
||||
|
||||
# Execute config strategy
|
||||
set_configs
|
||||
# Generate run command
|
||||
python /opt/kolla/set_configs.py
|
||||
CMD=$(cat /run_command)
|
||||
|
||||
exec $CMD $ARGS
|
||||
exec $CMD
|
||||
|
@ -1,14 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/heat-api"
|
||||
ARGS=""
|
||||
|
||||
# Loading common functions.
|
||||
source /opt/kolla/kolla-common.sh
|
||||
|
||||
# Execute config strategy
|
||||
set_configs
|
||||
# Generate run command
|
||||
python /opt/kolla/set_configs.py
|
||||
CMD=$(cat /run_command)
|
||||
|
||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
@ -20,4 +18,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exec $CMD $ARGS
|
||||
exec $CMD
|
||||
|
@ -1,14 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/heat-engine"
|
||||
ARGS=""
|
||||
|
||||
# Loading common functions.
|
||||
source /opt/kolla/kolla-common.sh
|
||||
|
||||
# Execute config strategy
|
||||
set_configs
|
||||
# Generate run command
|
||||
python /opt/kolla/set_configs.py
|
||||
CMD=$(cat /run_command)
|
||||
|
||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
@ -17,4 +15,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exec $CMD $ARGS
|
||||
exec $CMD
|
||||
|
Loading…
Reference in New Issue
Block a user