Merge "Allow modprobing from cinder-volume container"
[apex-tripleo-heat-templates.git] / puppet / services / gnocchi-metricd.yaml
1 heat_template_version: pike
2
3 description: >
4   Gnocchi service configured with Puppet
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   MonitoringSubscriptionGnocchiMetricd:
34     default: 'overcloud-gnocchi-metricd'
35     type: string
36   GnocchiMetricdWorkers:
37     default: '%{::os_workers}'
38     description: Number of workers for Gnocchi MetricD
39     type: string
40
41 resources:
42   GnocchiServiceBase:
43     type: ./gnocchi-base.yaml
44     properties:
45       ServiceData: {get_param: ServiceData}
46       ServiceNetMap: {get_param: ServiceNetMap}
47       DefaultPasswords: {get_param: DefaultPasswords}
48       EndpointMap: {get_param: EndpointMap}
49       RoleName: {get_param: RoleName}
50       RoleParameters: {get_param: RoleParameters}
51
52 outputs:
53   role_data:
54     description: Role data for the Gnocchi role.
55     value:
56       service_name: gnocchi_metricd
57       monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
58       config_settings:
59         map_merge:
60           - get_attr: [GnocchiServiceBase, role_data, config_settings]
61           - gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
62       step_config: |
63         include ::tripleo::profile::base::gnocchi::metricd
64       upgrade_tasks:
65         - name: Check if gnocchi_metricd is deployed
66           command: systemctl is-enabled openstack-gnocchi-metricd
67           tags: common
68           ignore_errors: True
69           register: gnocchi_metricd_enabled
70         - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
71           shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b'
72           when: gnocchi_metricd_enabled.rc == 0
73           tags: step0,validation
74         - name: Stop gnocchi_metricd service
75           tags: step1
76           when: gnocchi_metricd_enabled.rc == 0
77           service: name=openstack-gnocchi-metricd state=stopped