Replace config-external with a JSON file for Rabbitmq
Change-Id: Ibb30af44a9362278eff012ff1145374788b06cd5 Partially-Implements: blueprint replace-config-external
This commit is contained in:
parent
4b107aff5f
commit
a0bffb2581
@ -37,7 +37,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: rabbitmq_bootstrap
|
||||
image: "{{ rabbitmq_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
|
||||
volumes: "{{ node_config_directory }}/rabbitmq/:/opt/kolla/config_files/:ro"
|
||||
volumes_from:
|
||||
- "rabbitmq_data"
|
||||
env:
|
||||
|
@ -14,3 +14,8 @@
|
||||
dest: "{{ node_config_directory }}/rabbitmq/rabbitmq-env.conf" }
|
||||
- { src: "rabbitmq.config.j2",
|
||||
dest: "{{ node_config_directory }}/rabbitmq/rabbitmq.config" }
|
||||
|
||||
- name: Copying Rabbitmq JSON configuration file
|
||||
template:
|
||||
src: "roles/rabbitmq/templates/rabbitmq.json.j2"
|
||||
dest: "{{ node_config_directory }}/rabbitmq/config.json"
|
@ -13,7 +13,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: rabbitmq
|
||||
image: "{{ rabbitmq_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/rabbitmq/:/opt/kolla/rabbitmq/:ro"
|
||||
volumes: "{{ node_config_directory }}/rabbitmq/:/opt/kolla/config_files/:ro"
|
||||
volumes_from:
|
||||
- "rabbitmq_data"
|
||||
env:
|
||||
|
17
ansible/roles/rabbitmq/templates/rabbitmq.json.j2
Normal file
17
ansible/roles/rabbitmq/templates/rabbitmq.json.j2
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"command": "/usr/sbin/rabbitmq-server",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "/opt/kolla/config_files/rabbitmq-env.conf",
|
||||
"dest": "/etc/rabbitmq/rabbitmq-env.conf",
|
||||
"owner": "rabbitmq",
|
||||
"perm": "0600"
|
||||
},
|
||||
{
|
||||
"source": "/opt/kolla/config_files/rabbitmq.config",
|
||||
"dest": "/etc/rabbitmq/rabbitmq.config",
|
||||
"owner": "rabbitmq",
|
||||
"perm": "0600"
|
||||
}
|
||||
]
|
||||
}
|
@ -2,14 +2,12 @@
|
||||
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/sbin/rabbitmq-server"
|
||||
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)
|
||||
|
||||
# loading functions
|
||||
source /opt/kolla/config-rabbit.sh
|
||||
@ -20,4 +18,5 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
$CMD $ARGS
|
||||
echo "Running command: ${CMD}"
|
||||
exec $CMD
|
||||
|
Loading…
Reference in New Issue
Block a user