Ability to enable/disable debug mode per OpenStack service
[apex-tripleo-heat-templates.git] / puppet / services / gnocchi-base.yaml
1 heat_template_version: pike
2
3 description: >
4   Gnocchi service configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29   GnocchiIndexerBackend:
30     default: 'mysql'
31     description: The short name of the Gnocchi indexer backend to use.
32     type: string
33   MetricProcessingDelay:
34     default: 30
35     description: Delay between processing metrics.
36     type: number
37   GnocchiPassword:
38     description: The password for the gnocchi service and db account.
39     type: string
40     hidden: true
41   GnocchiRbdPoolName:
42     default: metrics
43     type: string
44   CephClientUserName:
45     default: openstack
46     type: string
47   RedisPassword:
48     description: The password for the redis service account.
49     type: string
50     hidden: true
51   Debug:
52     type: string
53     default: ''
54     description: Set to True to enable debugging on all services.
55   GnocchiDebug:
56     default: ''
57     description: Set to True to enable debugging Gnocchi services.
58     type: string
59
60 conditions:
61   service_debug_unset: {equals : [{get_param: GnocchiDebug}, '']}
62
63 outputs:
64   aux_parameters:
65     description: Additional parameters referenced outside the base file
66     value:
67       gnocchi_indexer_backend: {get_param: GnocchiIndexerBackend}
68   role_data:
69     description: Shared role data for the Heat services.
70     value:
71       service_name: gnocchi_base
72       config_settings:
73         #Gnocchi engine
74         gnocchi_redis_password: {get_param: RedisPassword}
75         gnocchi::debug:
76           if:
77           - service_debug_unset
78           - {get_param: Debug }
79           - {get_param: GnocchiDebug }
80         gnocchi::db::database_connection:
81           make_url:
82             scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
83             username: gnocchi
84             password: {get_param: GnocchiPassword}
85             host: {get_param: [EndpointMap, MysqlInternal, host]}
86             path: /gnocchi
87             query:
88               read_default_file: /etc/my.cnf.d/tripleo.cnf
89               read_default_group: tripleo
90         gnocchi::db::sync::extra_opts: ''
91         gnocchi::storage::metric_processing_delay: {get_param: MetricProcessingDelay}
92         gnocchi::storage::swift::swift_user: 'service:gnocchi'
93         gnocchi::storage::swift::swift_auth_version: 3
94         gnocchi::storage::swift::swift_key: {get_param: GnocchiPassword}
95         gnocchi::storage::swift::swift_authurl: {get_param: [EndpointMap, KeystoneV3Internal, uri]}
96         gnocchi::storage::ceph::ceph_pool: {get_param: GnocchiRbdPoolName}
97         gnocchi::storage::ceph::ceph_username: {get_param: CephClientUserName}
98         gnocchi::storage::ceph::ceph_keyring:
99           list_join:
100           - '.'
101           - - '/etc/ceph/ceph'
102             - 'client'
103             - {get_param: CephClientUserName}
104             - 'keyring'
105         #Gnocchi statsd
106         gnocchi::statsd::resource_id: '0a8b55df-f90f-491c-8cb9-7cdecec6fc26'
107         gnocchi::statsd::user_id: '27c0d3f8-e7ee-42f0-8317-72237d1c5ae3'
108         gnocchi::statsd::project_id: '6c38cd8d-099a-4cb2-aecf-17be688e8616'
109         gnocchi::statsd::flush_delay: 10
110         gnocchi::statsd::archive_policy_name: 'low'