Skip to content
Snippets Groups Projects
Commit 57017b0a authored by Ryan Hallisey's avatar Ryan Hallisey Committed by Sam Yaple
Browse files

Replace config-external with a JSON file for Cinder

Partially-Implements: blueprint replace-config-external

Change-Id: Ic247433290b51c9fb613d90e4a9a0f3d11526b35
parent 2c23f2d4
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: bootstrap_cinder
image: "{{ cinder_api_image_full }}"
volumes: "{{ node_config_directory }}/cinder-api/:/opt/kolla/cinder-api/:ro"
volumes: "{{ node_config_directory }}/cinder-api/:/opt/kolla/config_files/:ro"
volumes_from:
- cinder_data
env:
......
......@@ -19,6 +19,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
when: inventory_hostname in groups['cinder-api']
- name: Copying Cinder API JSON configuration file
template:
src: "roles/cinder/templates/cinder-api.json.j2"
dest: "{{ node_config_directory }}/cinder-api/config.json"
when: inventory_hostname in groups['cinder-api']
- include: ../../config.yml
vars:
service_name: "cinder-backup"
......@@ -39,6 +45,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
when: inventory_hostname in groups['cinder-backup']
- name: Copying Cinder Backup JSON configuration file
template:
src: "roles/cinder/templates/cinder-backup.json.j2"
dest: "{{ node_config_directory }}/cinder-backup/config.json"
when: inventory_hostname in groups['cinder-backup']
- include: ../../config.yml
vars:
service_name: "cinder-scheduler"
......@@ -59,6 +71,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
when: inventory_hostname in groups['cinder-scheduler']
- name: Copying Cinder Scheduler JSON configuration file
template:
src: "roles/cinder/templates/cinder-scheduler.json.j2"
dest: "{{ node_config_directory }}/cinder-scheduler/config.json"
when: inventory_hostname in groups['cinder-scheduler']
- include: ../../config.yml
vars:
service_name: "cinder-volume"
......@@ -78,3 +96,9 @@
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
when: inventory_hostname in groups['cinder-volume']
- name: Copying Cinder Volume JSON configuration file
template:
src: "roles/cinder/templates/cinder-volume.json.j2"
dest: "{{ node_config_directory }}/cinder-volume/config.json"
when: inventory_hostname in groups['cinder-volume']
\ No newline at end of file
......@@ -12,7 +12,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: cinder_api
image: "{{ cinder_api_image_full }}"
volumes: "{{ node_config_directory }}/cinder-api/:/opt/kolla/cinder-api/:ro"
volumes: "{{ node_config_directory }}/cinder-api/:/opt/kolla/config_files/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['cinder-api']
......@@ -31,7 +31,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: cinder_backup
image: "{{ cinder_backup_image_full }}"
volumes: "{{ node_config_directory }}/cinder-backup/:/opt/kolla/cinder-backup/:ro"
volumes: "{{ node_config_directory }}/cinder-backup/:/opt/kolla/config_files/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['cinder-backup']
......@@ -50,7 +50,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: cinder_scheduler
image: "{{ cinder_scheduler_image_full }}"
volumes: "{{ node_config_directory }}/cinder-scheduler/:/opt/kolla/cinder-scheduler/:ro"
volumes: "{{ node_config_directory }}/cinder-scheduler/:/opt/kolla/config_files/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['cinder-scheduler']
......@@ -70,7 +70,7 @@
privileged: True
name: cinder_volume
image: "{{ cinder_volume_image_full }}"
volumes: "{{ node_config_directory }}/cinder-volume/:/opt/kolla/cinder-volume/:ro"
volumes: "{{ node_config_directory }}/cinder-volume/:/opt/kolla/config_files/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['cinder-volume']
{
"command": "/usr/bin/cinder-api --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/opt/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
]
}
{
"command": "/usr/bin/cinder-backup --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/opt/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
]
}
{
"command": "/usr/bin/cinder-scheduler --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/opt/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
]
}
{
"command": "/usr/bin/cinder-volume --config-file /etc/cinder/cinder.conf",
"config_files": [
{
"source": "/opt/kolla/config_files/cinder.conf",
"dest": "/etc/cinder/cinder.conf",
"owner": "cinder",
"perm": "0600"
}
]
}
......@@ -2,14 +2,12 @@
set -o errexit
CMD="/usr/bin/cinder-api"
ARGS="--config-file /etc/cinder/cinder.conf"
# 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.
......@@ -18,4 +16,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
exit 0
fi
exec $CMD $ARGS
exec $CMD
......@@ -2,13 +2,11 @@
set -o errexit
CMD="/usr/bin/cinder-backup"
ARGS="--config-file /etc/cinder/cinder.conf"
# 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
......@@ -2,13 +2,11 @@
set -o errexit
CMD="/usr/bin/cinder-scheduler"
ARGS="--config-file /etc/cinder/cinder.conf"
# 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
......@@ -2,13 +2,11 @@
set -o errexit
CMD="/usr/bin/cinder-volume"
ARGS="--config-file /etc/cinder/cinder.conf"
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment