Replace config-external with a JSON file for Cinder
Partially-Implements: blueprint replace-config-external Change-Id: Ic247433290b51c9fb613d90e4a9a0f3d11526b35
This commit is contained in:
parent
2c23f2d445
commit
57017b0acd
@ -57,7 +57,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: bootstrap_cinder
|
name: bootstrap_cinder
|
||||||
image: "{{ cinder_api_image_full }}"
|
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:
|
volumes_from:
|
||||||
- cinder_data
|
- cinder_data
|
||||||
env:
|
env:
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
||||||
when: inventory_hostname in groups['cinder-api']
|
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
|
- include: ../../config.yml
|
||||||
vars:
|
vars:
|
||||||
service_name: "cinder-backup"
|
service_name: "cinder-backup"
|
||||||
@ -39,6 +45,12 @@
|
|||||||
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
||||||
when: inventory_hostname in groups['cinder-backup']
|
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
|
- include: ../../config.yml
|
||||||
vars:
|
vars:
|
||||||
service_name: "cinder-scheduler"
|
service_name: "cinder-scheduler"
|
||||||
@ -59,6 +71,12 @@
|
|||||||
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
||||||
when: inventory_hostname in groups['cinder-scheduler']
|
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
|
- include: ../../config.yml
|
||||||
vars:
|
vars:
|
||||||
service_name: "cinder-volume"
|
service_name: "cinder-volume"
|
||||||
@ -78,3 +96,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 }}/cinder.conf"
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/cinder.conf"
|
||||||
when: inventory_hostname in groups['cinder-volume']
|
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']
|
@ -12,7 +12,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: cinder_api
|
name: cinder_api
|
||||||
image: "{{ cinder_api_image_full }}"
|
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:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['cinder-api']
|
when: inventory_hostname in groups['cinder-api']
|
||||||
@ -31,7 +31,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: cinder_backup
|
name: cinder_backup
|
||||||
image: "{{ cinder_backup_image_full }}"
|
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:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['cinder-backup']
|
when: inventory_hostname in groups['cinder-backup']
|
||||||
@ -50,7 +50,7 @@
|
|||||||
insecure_registry: "{{ docker_insecure_registry }}"
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
name: cinder_scheduler
|
name: cinder_scheduler
|
||||||
image: "{{ cinder_scheduler_image_full }}"
|
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:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['cinder-scheduler']
|
when: inventory_hostname in groups['cinder-scheduler']
|
||||||
@ -70,7 +70,7 @@
|
|||||||
privileged: True
|
privileged: True
|
||||||
name: cinder_volume
|
name: cinder_volume
|
||||||
image: "{{ cinder_volume_image_full }}"
|
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:
|
env:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
when: inventory_hostname in groups['cinder-volume']
|
when: inventory_hostname in groups['cinder-volume']
|
||||||
|
11
ansible/roles/cinder/templates/cinder-api.json.j2
Normal file
11
ansible/roles/cinder/templates/cinder-api.json.j2
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
11
ansible/roles/cinder/templates/cinder-backup.json.j2
Normal file
11
ansible/roles/cinder/templates/cinder-backup.json.j2
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
11
ansible/roles/cinder/templates/cinder-scheduler.json.j2
Normal file
11
ansible/roles/cinder/templates/cinder-scheduler.json.j2
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
11
ansible/roles/cinder/templates/cinder-volume.json.j2
Normal file
11
ansible/roles/cinder/templates/cinder-volume.json.j2
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"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
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/cinder-api"
|
|
||||||
ARGS="--config-file /etc/cinder/cinder.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.
|
||||||
@ -18,4 +16,4 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec $CMD $ARGS
|
exec $CMD
|
||||||
|
@ -2,13 +2,11 @@
|
|||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/cinder-backup"
|
|
||||||
ARGS="--config-file /etc/cinder/cinder.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
|
||||||
|
@ -2,13 +2,11 @@
|
|||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/cinder-scheduler"
|
|
||||||
ARGS="--config-file /etc/cinder/cinder.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
|
||||||
|
@ -2,13 +2,11 @@
|
|||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
CMD="/usr/bin/cinder-volume"
|
|
||||||
ARGS="--config-file /etc/cinder/cinder.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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user