2021-03-25 16:52:04 +05:30
|
|
|
heat_template_version: wallaby
|
2017-02-28 15:57:14 -05:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack containerized Gnocchi Metricd service
|
|
|
|
|
|
|
|
parameters:
|
2019-05-13 10:13:04 -04:00
|
|
|
ContainerGnocchiMetricdImage:
|
2017-02-28 15:57:14 -05:00
|
|
|
description: image
|
|
|
|
type: string
|
2019-05-13 10:13:04 -04:00
|
|
|
ContainerGnocchiConfigImage:
|
2017-06-23 18:21:43 +02:00
|
|
|
description: The container image to use for the gnocchi config_volume
|
|
|
|
type: string
|
2017-02-28 15:57:14 -05:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData:
|
|
|
|
default: {}
|
|
|
|
description: Dictionary packing service data
|
|
|
|
type: json
|
2017-02-28 15:57:14 -05:00
|
|
|
ServiceNetMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service_name -> network name. Typically set
|
|
|
|
via parameter_defaults in the resource registry. This
|
|
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
|
|
type: json
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
2017-05-15 19:06:09 +02:00
|
|
|
type: json
|
2017-10-02 15:22:08 -04:00
|
|
|
CephClientUserName:
|
|
|
|
default: openstack
|
|
|
|
type: string
|
2018-02-07 11:56:12 +01:00
|
|
|
CephClusterName:
|
|
|
|
type: string
|
|
|
|
default: ceph
|
|
|
|
description: The Ceph cluster name.
|
|
|
|
constraints:
|
|
|
|
- allowed_pattern: "[a-zA-Z0-9]+"
|
|
|
|
description: >
|
|
|
|
The Ceph cluster name must be at least 1 character and contain only
|
|
|
|
letters and numbers.
|
2018-05-23 12:31:16 -04:00
|
|
|
GnocchiFileBasePath:
|
|
|
|
default: '/var/lib/gnocchi'
|
|
|
|
description: Path to use when file driver is used. This could be NFS or a
|
|
|
|
flat file.
|
|
|
|
type: string
|
2020-06-08 14:57:04 +09:00
|
|
|
GnocchiNfsEnabled:
|
|
|
|
default: false
|
|
|
|
description: >
|
|
|
|
When using GnocchiBackend 'file', mount NFS share for data storage
|
|
|
|
type: boolean
|
2019-02-04 09:47:46 -05:00
|
|
|
MonitoringSubscriptionGnocchiMetricd:
|
|
|
|
default: 'overcloud-gnocchi-metricd'
|
|
|
|
type: string
|
|
|
|
GnocchiMetricdWorkers:
|
|
|
|
default: '%{::os_workers}'
|
|
|
|
description: Number of workers for Gnocchi MetricD
|
|
|
|
type: string
|
|
|
|
MetricProcessingDelay:
|
|
|
|
default: 30
|
|
|
|
description: Delay between processing metrics.
|
|
|
|
type: number
|
2020-11-20 14:54:13 +01:00
|
|
|
CephConfigPath:
|
|
|
|
type: string
|
2020-11-02 14:10:52 +01:00
|
|
|
default: "/var/lib/tripleo-config/ceph"
|
2020-11-20 14:54:13 +01:00
|
|
|
description: |
|
|
|
|
The path where the Ceph Cluster config files are stored on the host.
|
2017-02-28 15:57:14 -05:00
|
|
|
|
2020-06-08 14:57:04 +09:00
|
|
|
conditions:
|
|
|
|
nfs_backend_enabled: {equals: [{get_param: GnocchiNfsEnabled}, true]}
|
|
|
|
|
2017-02-28 15:57:14 -05:00
|
|
|
resources:
|
|
|
|
|
2017-04-13 13:46:31 +00:00
|
|
|
ContainersCommon:
|
2019-04-05 12:16:13 -04:00
|
|
|
type: ../containers-common.yaml
|
2017-04-13 13:46:31 +00:00
|
|
|
|
2017-07-07 10:44:26 -04:00
|
|
|
MySQLClient:
|
2019-01-30 09:38:32 -05:00
|
|
|
type: ../../deployment/database/mysql-client.yaml
|
2017-07-07 10:44:26 -04:00
|
|
|
|
2019-02-04 09:47:46 -05:00
|
|
|
GnocchiServiceBase:
|
|
|
|
type: ./gnocchi-base.yaml
|
2017-02-28 15:57:14 -05:00
|
|
|
properties:
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData: {get_param: ServiceData}
|
2017-02-28 15:57:14 -05:00
|
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
2019-02-04 09:47:46 -05:00
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
2017-02-28 15:57:14 -05:00
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Gnocchi API role.
|
|
|
|
value:
|
2019-02-04 09:47:46 -05:00
|
|
|
service_name: gnocchi_metricd
|
|
|
|
config_settings:
|
|
|
|
map_merge:
|
|
|
|
- get_attr: [GnocchiServiceBase, role_data, config_settings]
|
|
|
|
- gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
|
|
|
|
gnocchi::metricd::metric_processing_delay: {get_param: MetricProcessingDelay}
|
|
|
|
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
|
|
|
|
service_config_settings: {get_attr: [GnocchiServiceBase, role_data, service_config_settings]}
|
2017-02-28 15:57:14 -05:00
|
|
|
# BEGIN DOCKER SETTINGS
|
|
|
|
puppet_config:
|
|
|
|
config_volume: gnocchi
|
|
|
|
puppet_tags: gnocchi_config
|
2017-11-13 14:51:37 -05:00
|
|
|
step_config:
|
|
|
|
list_join:
|
|
|
|
- "\n"
|
2020-04-09 21:07:34 +09:00
|
|
|
- - "include tripleo::profile::base::gnocchi::metricd"
|
2017-11-13 14:51:37 -05:00
|
|
|
- {get_attr: [MySQLClient, role_data, step_config]}
|
2019-05-13 10:13:04 -04:00
|
|
|
config_image: {get_param: ContainerGnocchiConfigImage}
|
2017-02-28 15:57:14 -05:00
|
|
|
kolla_config:
|
2017-06-07 15:35:55 +02:00
|
|
|
/var/lib/kolla/config_files/gnocchi_metricd.json:
|
2017-03-29 14:11:21 +02:00
|
|
|
command: /usr/bin/gnocchi-metricd
|
2017-06-21 16:02:55 +02:00
|
|
|
config_files:
|
|
|
|
- source: "/var/lib/kolla/config_files/src/*"
|
|
|
|
dest: "/"
|
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-07-11 12:20:05 +02:00
|
|
|
- source: "/var/lib/kolla/config_files/src-ceph/"
|
|
|
|
dest: "/etc/ceph/"
|
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-03-07 17:12:36 +01:00
|
|
|
permissions:
|
|
|
|
- path: /var/log/gnocchi
|
|
|
|
owner: gnocchi:gnocchi
|
|
|
|
recurse: true
|
2017-10-02 15:22:08 -04:00
|
|
|
- path:
|
|
|
|
str_replace:
|
2018-02-07 11:56:12 +01:00
|
|
|
template: /etc/ceph/CLUSTER.client.USER.keyring
|
2017-10-02 15:22:08 -04:00
|
|
|
params:
|
2018-02-07 11:56:12 +01:00
|
|
|
CLUSTER: {get_param: CephClusterName}
|
2017-10-02 15:22:08 -04:00
|
|
|
USER: {get_param: CephClientUserName}
|
|
|
|
owner: gnocchi:gnocchi
|
|
|
|
perm: '0600'
|
2017-02-28 15:57:14 -05:00
|
|
|
docker_config:
|
2017-08-25 22:08:25 -04:00
|
|
|
step_5:
|
2017-02-28 15:57:14 -05:00
|
|
|
gnocchi_metricd:
|
2018-07-11 10:49:27 +02:00
|
|
|
start_order: 1
|
2019-05-13 10:13:04 -04:00
|
|
|
image: {get_param: ContainerGnocchiMetricdImage}
|
2017-02-28 15:57:14 -05:00
|
|
|
net: host
|
|
|
|
privileged: false
|
|
|
|
restart: always
|
2018-01-26 12:55:52 +01:00
|
|
|
healthcheck:
|
|
|
|
test: /openstack/healthcheck
|
2017-02-28 15:57:14 -05:00
|
|
|
volumes:
|
2017-04-25 10:55:25 +03:00
|
|
|
list_concat:
|
|
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
|
|
-
|
2017-06-07 15:35:55 +02:00
|
|
|
- /var/lib/kolla/config_files/gnocchi_metricd.json:/var/lib/kolla/config_files/config.json:ro
|
2019-12-04 08:47:19 +02:00
|
|
|
- /var/lib/config-data/puppet-generated/gnocchi:/var/lib/kolla/config_files/src:ro
|
2018-09-05 17:28:06 +02:00
|
|
|
- /var/log/containers/gnocchi:/var/log/gnocchi:z
|
2020-11-20 14:54:13 +01:00
|
|
|
- list_join:
|
|
|
|
- ':'
|
|
|
|
- - {get_param: CephConfigPath}
|
|
|
|
- - '/var/lib/kolla/config_files/src-ceph'
|
|
|
|
- - 'ro'
|
2018-05-23 12:31:16 -04:00
|
|
|
- str_replace:
|
2018-10-19 10:15:01 +02:00
|
|
|
template: GNOCCHI_FILE_BASE_PATH:GNOCCHI_FILE_BASE_PATH:SE_FLAGS
|
2020-06-08 14:57:04 +09:00
|
|
|
params:
|
|
|
|
GNOCCHI_FILE_BASE_PATH: {get_param: GnocchiFileBasePath}
|
|
|
|
SE_FLAGS:
|
|
|
|
if:
|
|
|
|
- nfs_backend_enabled
|
|
|
|
- 'shared'
|
|
|
|
- 'shared,z'
|
2017-02-28 15:57:14 -05:00
|
|
|
environment:
|
2019-10-07 23:36:43 -04:00
|
|
|
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
2017-03-07 17:12:36 +01:00
|
|
|
host_prep_tasks:
|
2019-01-14 16:06:21 +01:00
|
|
|
- name: create persistent directories
|
2017-03-07 17:12:36 +01:00
|
|
|
file:
|
2019-01-14 16:06:21 +01:00
|
|
|
path: "{{ item.path }}"
|
2017-03-07 17:12:36 +01:00
|
|
|
state: directory
|
2019-01-14 16:06:21 +01:00
|
|
|
setype: "{{ item.setype }}"
|
2020-04-06 23:15:44 +02:00
|
|
|
mode: "{{ item.mode }}"
|
2019-01-14 16:06:21 +01:00
|
|
|
with_items:
|
2020-02-07 13:33:20 +01:00
|
|
|
- { 'path': /var/log/containers/gnocchi, 'setype': container_file_t, 'mode': '0750' }
|
2018-10-19 10:15:01 +02:00
|
|
|
- name: create persistent data directory
|
|
|
|
file:
|
|
|
|
path: {get_param: GnocchiFileBasePath}
|
|
|
|
state: directory
|
2020-02-07 13:33:20 +01:00
|
|
|
setype: container_file_t
|
2017-07-11 12:20:05 +02:00
|
|
|
- name: ensure ceph configurations exist
|
|
|
|
file:
|
2020-11-20 14:54:13 +01:00
|
|
|
path: {get_param: CephConfigPath}
|
2017-07-11 12:20:05 +02:00
|
|
|
state: directory
|
2018-12-04 14:36:12 -05:00
|
|
|
upgrade_tasks: []
|
2019-07-04 10:17:24 +02:00
|
|
|
external_upgrade_tasks:
|
|
|
|
- when:
|
|
|
|
- step|int == 1
|
|
|
|
tags:
|
|
|
|
- never
|
|
|
|
- system_upgrade_transfer_data
|
|
|
|
- system_upgrade_stop_services
|
|
|
|
block:
|
|
|
|
- name: Stop gnocchi metricd container
|
|
|
|
import_role:
|
2020-01-20 10:31:22 -06:00
|
|
|
name: tripleo_container_stop
|
2019-07-04 10:17:24 +02:00
|
|
|
vars:
|
|
|
|
tripleo_containers_to_stop:
|
|
|
|
- gnocchi_metricd
|
|
|
|
tripleo_delegate_to: "{{ groups['gnocchi_metricd'] | default([]) }}"
|