Add support for Gnocchi NFS Backend
This patch introduces support for Gnocchi NFS backend, so that operators can configure nfs share to store data of Gnocchi. Closes-Bug: #1889075 Change-Id: I41c93394c171572bdd6e0b24c842b5e86e0b8e07
This commit is contained in:
parent
8e014d5390
commit
a6bbb4941b
@ -82,6 +82,21 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
constraints:
|
constraints:
|
||||||
- allowed_values: ['swift', 'file', 'rbd', 's3']
|
- allowed_values: ['swift', 'file', 'rbd', 's3']
|
||||||
|
GnocchiNfsEnabled:
|
||||||
|
default: false
|
||||||
|
description: >
|
||||||
|
When using GnocchiBackend 'file', mount NFS share for data storage
|
||||||
|
type: boolean
|
||||||
|
GnocchiNfsShare:
|
||||||
|
default: ''
|
||||||
|
description: >
|
||||||
|
NFS share to mount for data storage (when GnocchiNfsEnabled is true)
|
||||||
|
type: string
|
||||||
|
GnocchiNfsOptions:
|
||||||
|
default: '_netdev,bg,intr,context=system_u:object_r:container_file_t:s0'
|
||||||
|
description: >
|
||||||
|
Nfs mount options for data storage (when GnocchiNfsEnabled is true)
|
||||||
|
type: string
|
||||||
GnocchiIncomingStorageDriver:
|
GnocchiIncomingStorageDriver:
|
||||||
default: redis
|
default: redis
|
||||||
description: Storage driver to use for incoming metric data
|
description: Storage driver to use for incoming metric data
|
||||||
@ -111,6 +126,7 @@ parameters:
|
|||||||
conditions:
|
conditions:
|
||||||
cors_allowed_origin_unset: {equals : [{get_param: GnocchiCorsAllowedOrigin}, '']}
|
cors_allowed_origin_unset: {equals : [{get_param: GnocchiCorsAllowedOrigin}, '']}
|
||||||
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
||||||
|
nfs_backend_enabled: {equals: [{get_param: GnocchiNfsEnabled}, true]}
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
@ -297,13 +313,20 @@ outputs:
|
|||||||
volumes:
|
volumes:
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
||||||
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}, SE_FLAGS: 'shared,z'}
|
params:
|
||||||
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
||||||
|
SE_FLAGS:
|
||||||
|
if:
|
||||||
|
- nfs_backend_enabled
|
||||||
|
- 'shared'
|
||||||
|
- 'shared,z'
|
||||||
command:
|
command:
|
||||||
- '/bin/bash'
|
- '/bin/bash'
|
||||||
- '-c'
|
- '-c'
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: 'chown -R gnocchi:gnocchi GNOCCHI_FILE_BASE_PATH'
|
template: 'chown -R gnocchi:gnocchi GNOCCHI_FILE_BASE_PATH'
|
||||||
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}}
|
params:
|
||||||
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
||||||
step_5:
|
step_5:
|
||||||
gnocchi_db_sync:
|
gnocchi_db_sync:
|
||||||
start_order: 0
|
start_order: 0
|
||||||
@ -320,7 +343,13 @@ outputs:
|
|||||||
- /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
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
||||||
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}, SE_FLAGS: 'shared,z'}
|
params:
|
||||||
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
||||||
|
SE_FLAGS:
|
||||||
|
if:
|
||||||
|
- nfs_backend_enabled
|
||||||
|
- 'shared'
|
||||||
|
- 'shared,z'
|
||||||
- /var/log/containers/gnocchi:/var/log/gnocchi:z
|
- /var/log/containers/gnocchi:/var/log/gnocchi:z
|
||||||
- /var/log/containers/httpd/gnocchi-api:/var/log/httpd:z
|
- /var/log/containers/httpd/gnocchi-api:/var/log/httpd:z
|
||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
@ -341,7 +370,13 @@ outputs:
|
|||||||
-
|
-
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
||||||
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}, SE_FLAGS: 'shared,z'}
|
params:
|
||||||
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
||||||
|
SE_FLAGS:
|
||||||
|
if:
|
||||||
|
- nfs_backend_enabled
|
||||||
|
- 'shared'
|
||||||
|
- 'shared,z'
|
||||||
- /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:z
|
- /var/log/containers/gnocchi:/var/log/gnocchi:z
|
||||||
@ -358,7 +393,7 @@ outputs:
|
|||||||
environment:
|
environment:
|
||||||
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
||||||
host_prep_tasks:
|
host_prep_tasks:
|
||||||
- name: create persistent data and logs directory
|
- name: create logs directory
|
||||||
file:
|
file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
@ -367,7 +402,24 @@ outputs:
|
|||||||
with_items:
|
with_items:
|
||||||
- { 'path': /var/log/containers/gnocchi, 'setype': container_file_t, 'mode': '0750' }
|
- { 'path': /var/log/containers/gnocchi, 'setype': container_file_t, 'mode': '0750' }
|
||||||
- { 'path': /var/log/containers/httpd/gnocchi-api, 'setype': container_file_t, 'mode': '0750' }
|
- { 'path': /var/log/containers/httpd/gnocchi-api, 'setype': container_file_t, 'mode': '0750' }
|
||||||
- { 'path': {get_param: GnocchiFileBasePath}, 'setype': container_file_t }
|
- name: Mount Gnocchi NFS on host
|
||||||
|
vars:
|
||||||
|
nfs_backend_enabled: {get_param: GnocchiNfsEnabled}
|
||||||
|
nfs_share: {get_param: GnocchiNfsShare}
|
||||||
|
nfs_options: {get_param: GnocchiNfsOptions}
|
||||||
|
file_base_path: {get_param: GnocchiFileBasePath}
|
||||||
|
mount:
|
||||||
|
name: "{{file_base_path}}"
|
||||||
|
state: mounted
|
||||||
|
src: "{{nfs_share}}"
|
||||||
|
fstype: nfs
|
||||||
|
opts: "{{nfs_options}}"
|
||||||
|
when: nfs_backend_enabled
|
||||||
|
- name: ensure GnocchiFileBasePath exists
|
||||||
|
file:
|
||||||
|
path: {get_param: GnocchiFileBasePath}
|
||||||
|
state: directory
|
||||||
|
setype: container_file_t
|
||||||
- name: ensure ceph configurations exist
|
- name: ensure ceph configurations exist
|
||||||
file:
|
file:
|
||||||
path: /etc/ceph
|
path: /etc/ceph
|
||||||
|
@ -53,6 +53,11 @@ parameters:
|
|||||||
description: Path to use when file driver is used. This could be NFS or a
|
description: Path to use when file driver is used. This could be NFS or a
|
||||||
flat file.
|
flat file.
|
||||||
type: string
|
type: string
|
||||||
|
GnocchiNfsEnabled:
|
||||||
|
default: false
|
||||||
|
description: >
|
||||||
|
When using GnocchiBackend 'file', mount NFS share for data storage
|
||||||
|
type: boolean
|
||||||
MonitoringSubscriptionGnocchiMetricd:
|
MonitoringSubscriptionGnocchiMetricd:
|
||||||
default: 'overcloud-gnocchi-metricd'
|
default: 'overcloud-gnocchi-metricd'
|
||||||
type: string
|
type: string
|
||||||
@ -65,6 +70,9 @@ parameters:
|
|||||||
description: Delay between processing metrics.
|
description: Delay between processing metrics.
|
||||||
type: number
|
type: number
|
||||||
|
|
||||||
|
conditions:
|
||||||
|
nfs_backend_enabled: {equals: [{get_param: GnocchiNfsEnabled}, true]}
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
ContainersCommon:
|
ContainersCommon:
|
||||||
@ -149,7 +157,13 @@ outputs:
|
|||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
||||||
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}, SE_FLAGS: 'shared,z'}
|
params:
|
||||||
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
||||||
|
SE_FLAGS:
|
||||||
|
if:
|
||||||
|
- nfs_backend_enabled
|
||||||
|
- 'shared'
|
||||||
|
- 'shared,z'
|
||||||
environment:
|
environment:
|
||||||
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
||||||
host_prep_tasks:
|
host_prep_tasks:
|
||||||
|
@ -53,10 +53,18 @@ parameters:
|
|||||||
description: Path to use when file driver is used. This could be NFS or a
|
description: Path to use when file driver is used. This could be NFS or a
|
||||||
flat file.
|
flat file.
|
||||||
type: string
|
type: string
|
||||||
|
GnocchiNfsEnabled:
|
||||||
|
default: false
|
||||||
|
description: >
|
||||||
|
When using GnocchiBackend 'file', mount NFS share for data storage
|
||||||
|
type: boolean
|
||||||
MonitoringSubscriptionGnocchiStatsd:
|
MonitoringSubscriptionGnocchiStatsd:
|
||||||
default: 'overcloud-gnocchi-statsd'
|
default: 'overcloud-gnocchi-statsd'
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
conditions:
|
||||||
|
nfs_backend_enabled: {equals: [{get_param: GnocchiNfsEnabled}, true]}
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
ContainersCommon:
|
ContainersCommon:
|
||||||
@ -141,7 +149,13 @@ outputs:
|
|||||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
||||||
params: {GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}, SE_FLAGS: 'shared,z'}
|
params:
|
||||||
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
||||||
|
SE_FLAGS:
|
||||||
|
if:
|
||||||
|
- nfs_backend_enabled
|
||||||
|
- 'shared'
|
||||||
|
- 'shared,z'
|
||||||
environment:
|
environment:
|
||||||
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
||||||
host_prep_tasks:
|
host_prep_tasks:
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The following parameters were added to support configuration of gnocchi nfs
|
||||||
|
backend.
|
||||||
|
|
||||||
|
- GnocchiNfsEnabled
|
||||||
|
- GnocchiNfsShare
|
||||||
|
- GnocchiNfsOptions
|
Loading…
Reference in New Issue
Block a user