Change flat network name for nosdn fdio scenario
[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   MetricProcessingDelay:
41     default: 30
42     description: Delay between processing metrics.
43     type: number
44
45 resources:
46   GnocchiServiceBase:
47     type: ./gnocchi-base.yaml
48     properties:
49       ServiceData: {get_param: ServiceData}
50       ServiceNetMap: {get_param: ServiceNetMap}
51       DefaultPasswords: {get_param: DefaultPasswords}
52       EndpointMap: {get_param: EndpointMap}
53       RoleName: {get_param: RoleName}
54       RoleParameters: {get_param: RoleParameters}
55
56 outputs:
57   role_data:
58     description: Role data for the Gnocchi role.
59     value:
60       service_name: gnocchi_metricd
61       monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
62       config_settings:
63         map_merge:
64           - get_attr: [GnocchiServiceBase, role_data, config_settings]
65           - gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
66             gnocchi::metricd::metric_processing_delay: {get_param: MetricProcessingDelay}
67       step_config: |
68         include ::tripleo::profile::base::gnocchi::metricd
69       upgrade_tasks:
70         - name: Check if gnocchi_metricd is deployed
71           command: systemctl is-enabled openstack-gnocchi-metricd
72           tags: common
73           ignore_errors: True
74           register: gnocchi_metricd_enabled
75         - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
76           shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b'
77           when: gnocchi_metricd_enabled.rc == 0
78           tags: step0,validation
79         - name: Stop gnocchi_metricd service
80           tags: step1
81           when: gnocchi_metricd_enabled.rc == 0
82           service: name=openstack-gnocchi-metricd state=stopped