Replace config-external - murano
Change-Id: I8c5fdb2f2d3284960318a8189c4cc5bd6a8e59e9 Partially-Implements: blueprint replace-config-external
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: bootstrap_murano
|
name: bootstrap_murano
|
||||||
image: "{{ murano_api_image_full }}"
|
image: "{{ murano_api_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/murano-api/:/opt/kolla/murano-api/:ro"
|
volumes: "{{ node_config_directory }}/murano-api/:/opt/kolla/config_files/:ro"
|
||||||
env:
|
env:
|
||||||
KOLLA_BOOTSTRAP:
|
KOLLA_BOOTSTRAP:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
config_dest: "{{ node_config_directory }}/{{ service_name }}/murano.conf"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/murano.conf"
|
||||||
when: inventory_hostname in groups['murano-engine']
|
when: inventory_hostname in groups['murano-engine']
|
||||||
|
|
||||||
|
- name: Copying over murano-engine JSON configuration file
|
||||||
|
template:
|
||||||
|
src: "murano-engine.json.j2"
|
||||||
|
dest: "{{ node_config_directory }}/murano-engine/config.json"
|
||||||
|
when: inventory_hostname in groups['murano-engine']
|
||||||
|
|
||||||
- include: ../../config.yml
|
- include: ../../config.yml
|
||||||
vars:
|
vars:
|
||||||
service_name: "murano-api"
|
service_name: "murano-api"
|
||||||
@@ -38,3 +44,9 @@
|
|||||||
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
|
||||||
config_dest: "{{ node_config_directory }}/{{ service_name }}/murano.conf"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/murano.conf"
|
||||||
when: inventory_hostname in groups['murano-api']
|
when: inventory_hostname in groups['murano-api']
|
||||||
|
|
||||||
|
- name: Copying over murano-api JSON configuration file
|
||||||
|
template:
|
||||||
|
src: "murano-api.json.j2"
|
||||||
|
dest: "{{ node_config_directory }}/murano-api/config.json"
|
||||||
|
when: inventory_hostname in groups['murano-api']
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: murano_engine
|
name: murano_engine
|
||||||
image: "{{ murano_engine_image_full }}"
|
image: "{{ murano_engine_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/murano-engine/:/opt/kolla/murano-engine/:ro"
|
volumes: "{{ node_config_directory }}/murano-engine/:/opt/kolla/config_files/:ro"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
env:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: murano_api
|
name: murano_api
|
||||||
image: "{{ murano_api_image_full }}"
|
image: "{{ murano_api_image_full }}"
|
||||||
volumes: "{{ node_config_directory }}/murano-api/:/opt/kolla/murano-api/:ro"
|
volumes: "{{ node_config_directory }}/murano-api/:/opt/kolla/config_files/:ro"
|
||||||
env:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['murano-api']
|
when: inventory_hostname in groups['murano-api']
|
||||||
|
|||||||
11
ansible/roles/murano/templates/murano-api.json.j2
Normal file
11
ansible/roles/murano/templates/murano-api.json.j2
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"command": "/usr/bin/murano-api --config-file /etc/murano/murano.conf",
|
||||||
|
"config_files": [
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/murano.conf",
|
||||||
|
"dest": "/etc/murano/murano.conf",
|
||||||
|
"owner": "murano",
|
||||||
|
"perm": "0644"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
11
ansible/roles/murano/templates/murano-engine.json.j2
Normal file
11
ansible/roles/murano/templates/murano-engine.json.j2
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"command": "/usr/bin/murano-engine --config-file /etc/murano/murano.conf",
|
||||||
|
"config_files": [
|
||||||
|
{
|
||||||
|
"source": "/opt/kolla/config_files/murano.conf",
|
||||||
|
"dest": "/etc/murano/murano.conf",
|
||||||
|
"owner": "murano",
|
||||||
|
"perm": "0644"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/murano-api"
|
|
||||||
ARGS="--config-file /etc/murano/murano.conf"
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/murano-engine"
|
|
||||||
ARGS="--config-file /etc/murano/murano.conf"
|
|
||||||
|
|
||||||
# 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)
|
||||||
|
|
||||||
exec $CMD $ARGS
|
exec $CMD
|
||||||
|
|||||||
Reference in New Issue
Block a user