Merge "Comment parameters for registry in docker.yaml"
[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   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   MonitoringSubscriptionGnocchiMetricd:
30     default: 'overcloud-gnocchi-metricd'
31     type: string
32   GnocchiMetricdWorkers:
33     default: '%{::os_workers}'
34     description: Number of workers for Gnocchi MetricD
35     type: string
36
37 resources:
38   GnocchiServiceBase:
39     type: ./gnocchi-base.yaml
40     properties:
41       ServiceNetMap: {get_param: ServiceNetMap}
42       DefaultPasswords: {get_param: DefaultPasswords}
43       EndpointMap: {get_param: EndpointMap}
44       RoleName: {get_param: RoleName}
45       RoleParameters: {get_param: RoleParameters}
46
47 outputs:
48   role_data:
49     description: Role data for the Gnocchi role.
50     value:
51       service_name: gnocchi_metricd
52       monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
53       config_settings:
54         map_merge:
55           - get_attr: [GnocchiServiceBase, role_data, config_settings]
56           - gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
57       step_config: |
58         include ::tripleo::profile::base::gnocchi::metricd
59       upgrade_tasks:
60         - name: Check if gnocchi_metricd is deployed
61           command: systemctl is-enabled openstack-gnocchi-metricd
62           tags: common
63           ignore_errors: True
64           register: gnocchi_metricd_enabled
65         - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
66           shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b'
67           when: gnocchi_metricd_enabled.rc == 0
68           tags: step0,validation
69         - name: Stop gnocchi_metricd service
70           tags: step1
71           when: gnocchi_metricd_enabled.rc == 0
72           service: name=openstack-gnocchi-metricd state=stopped