Add a way to override base path when file driver is used
The goal is to be able to point the Gnocchi file driver directory to an NFS share. A new parameter GnocchiFileBasePath allows to customize the bind mount to /var/lib/gnocchi. Change-Id: I868a368161f4a529e5e7dc3593dc6862e3196247
This commit is contained in:
parent
a33d05d30d
commit
b3b027e731
@ -60,6 +60,11 @@ parameters:
|
|||||||
description: >
|
description: >
|
||||||
The Ceph cluster name must be at least 1 character and contain only
|
The Ceph cluster name must be at least 1 character and contain only
|
||||||
letters and numbers.
|
letters and numbers.
|
||||||
|
GnocchiFileBasePath:
|
||||||
|
default: '/var/lib/gnocchi'
|
||||||
|
description: Path to use when file driver is used. This could be NFS or a
|
||||||
|
flat file.
|
||||||
|
type: string
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
|
|
||||||
@ -151,8 +156,15 @@ outputs:
|
|||||||
image: *gnocchi_api_image
|
image: *gnocchi_api_image
|
||||||
user: root
|
user: root
|
||||||
volumes:
|
volumes:
|
||||||
- /var/lib/gnocchi:/var/lib/gnocchi:rw
|
- str_replace:
|
||||||
command: ['/bin/bash', '-c', 'chown -R gnocchi:gnocchi /var/lib/gnocchi']
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH
|
||||||
|
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
||||||
|
command:
|
||||||
|
- '/bin/bash'
|
||||||
|
- '-c'
|
||||||
|
- str_replace:
|
||||||
|
template: 'chown -R gnocchi:gnocchi GNOCCHI_FILE_BASE_PATH'
|
||||||
|
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
||||||
step_4:
|
step_4:
|
||||||
gnocchi_db_sync:
|
gnocchi_db_sync:
|
||||||
image: *gnocchi_api_image
|
image: *gnocchi_api_image
|
||||||
@ -166,7 +178,9 @@ outputs:
|
|||||||
-
|
-
|
||||||
- /var/lib/kolla/config_files/gnocchi_db_sync.json:/var/lib/kolla/config_files/config.json:ro
|
- /var/lib/kolla/config_files/gnocchi_db_sync.json:/var/lib/kolla/config_files/config.json:ro
|
||||||
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
||||||
- /var/lib/gnocchi:/var/lib/gnocchi:rw
|
- str_replace:
|
||||||
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH
|
||||||
|
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
||||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||||
- /var/log/containers/httpd/gnocchi-api:/var/log/httpd
|
- /var/log/containers/httpd/gnocchi-api:/var/log/httpd
|
||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
@ -184,7 +198,9 @@ outputs:
|
|||||||
list_concat:
|
list_concat:
|
||||||
- {get_attr: [ContainersCommon, volumes]}
|
- {get_attr: [ContainersCommon, volumes]}
|
||||||
-
|
-
|
||||||
- /var/lib/gnocchi:/var/lib/gnocchi:rw
|
- str_replace:
|
||||||
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH
|
||||||
|
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
||||||
- /var/lib/kolla/config_files/gnocchi_api.json:/var/lib/kolla/config_files/config.json:ro
|
- /var/lib/kolla/config_files/gnocchi_api.json:/var/lib/kolla/config_files/config.json:ro
|
||||||
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
||||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||||
|
@ -48,6 +48,11 @@ parameters:
|
|||||||
description: >
|
description: >
|
||||||
The Ceph cluster name must be at least 1 character and contain only
|
The Ceph cluster name must be at least 1 character and contain only
|
||||||
letters and numbers.
|
letters and numbers.
|
||||||
|
GnocchiFileBasePath:
|
||||||
|
default: '/var/lib/gnocchi'
|
||||||
|
description: Path to use when file driver is used. This could be NFS or a
|
||||||
|
flat file.
|
||||||
|
type: string
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
@ -125,9 +130,11 @@ outputs:
|
|||||||
-
|
-
|
||||||
- /var/lib/kolla/config_files/gnocchi_metricd.json:/var/lib/kolla/config_files/config.json:ro
|
- /var/lib/kolla/config_files/gnocchi_metricd.json:/var/lib/kolla/config_files/config.json:ro
|
||||||
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
||||||
- /var/lib/gnocchi:/var/lib/gnocchi:rw
|
|
||||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
|
- str_replace:
|
||||||
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH
|
||||||
|
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
||||||
environment:
|
environment:
|
||||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||||
host_prep_tasks:
|
host_prep_tasks:
|
||||||
|
@ -48,6 +48,11 @@ parameters:
|
|||||||
description: >
|
description: >
|
||||||
The Ceph cluster name must be at least 1 character and contain only
|
The Ceph cluster name must be at least 1 character and contain only
|
||||||
letters and numbers.
|
letters and numbers.
|
||||||
|
GnocchiFileBasePath:
|
||||||
|
default: '/var/lib/gnocchi'
|
||||||
|
description: Path to use when file driver is used. This could be NFS or a
|
||||||
|
flat file.
|
||||||
|
type: string
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
@ -126,8 +131,10 @@ outputs:
|
|||||||
- /var/lib/kolla/config_files/gnocchi_statsd.json:/var/lib/kolla/config_files/config.json:ro
|
- /var/lib/kolla/config_files/gnocchi_statsd.json:/var/lib/kolla/config_files/config.json:ro
|
||||||
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
||||||
- /var/log/containers/gnocchi:/var/log/gnocchi
|
- /var/log/containers/gnocchi:/var/log/gnocchi
|
||||||
- /var/lib/gnocchi:/var/lib/gnocchi:rw
|
|
||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
|
- str_replace:
|
||||||
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH
|
||||||
|
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
||||||
environment:
|
environment:
|
||||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||||
host_prep_tasks:
|
host_prep_tasks:
|
||||||
|
@ -93,6 +93,12 @@ parameters:
|
|||||||
description: S3 storage access key secret.
|
description: S3 storage access key secret.
|
||||||
type: string
|
type: string
|
||||||
hidden: true
|
hidden: true
|
||||||
|
GnocchiFileBasePath:
|
||||||
|
default: '/var/lib/gnocchi'
|
||||||
|
description: Path to use when file driver is used. This could be NFS or a
|
||||||
|
flat file.
|
||||||
|
type: string
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
service_debug_unset: {equals : [{get_param: GnocchiDebug}, '']}
|
service_debug_unset: {equals : [{get_param: GnocchiDebug}, '']}
|
||||||
|
|
||||||
@ -128,6 +134,7 @@ outputs:
|
|||||||
template: " --sacks-number NUM_SACKS"
|
template: " --sacks-number NUM_SACKS"
|
||||||
params:
|
params:
|
||||||
NUM_SACKS: {get_param: NumberOfStorageSacks}
|
NUM_SACKS: {get_param: NumberOfStorageSacks}
|
||||||
|
gnocchi::storage::file::file_basepath: {get_param: GnocchiFileBasePath}
|
||||||
gnocchi::storage::swift::swift_user: 'service:gnocchi'
|
gnocchi::storage::swift::swift_user: 'service:gnocchi'
|
||||||
gnocchi::storage::swift::swift_auth_version: 3
|
gnocchi::storage::swift::swift_auth_version: 3
|
||||||
gnocchi::storage::swift::swift_key: {get_param: GnocchiPassword}
|
gnocchi::storage::swift::swift_key: {get_param: GnocchiPassword}
|
||||||
|
Loading…
Reference in New Issue
Block a user