Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / gnocchi-statsd.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   MonitoringSubscriptionGnocchiStatsd:
34     default: 'overcloud-gnocchi-statsd'
35     type: string
36
37 resources:
38   GnocchiServiceBase:
39     type: ./gnocchi-base.yaml
40     properties:
41       ServiceData: {get_param: ServiceData}
42       ServiceNetMap: {get_param: ServiceNetMap}
43       DefaultPasswords: {get_param: DefaultPasswords}
44       EndpointMap: {get_param: EndpointMap}
45       RoleName: {get_param: RoleName}
46       RoleParameters: {get_param: RoleParameters}
47
48 outputs:
49   role_data:
50     description: Role data for the Gnocchi role.
51     value:
52       service_name: gnocchi_statsd
53       monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiStatsd}
54       config_settings:
55         map_merge:
56           - get_attr: [GnocchiServiceBase, role_data, config_settings]
57           - tripleo.gnocchi_statsd.firewall_rules:
58               '140 gnocchi-statsd':
59                 dport: 8125
60                 proto: 'udp'
61       step_config: |
62         include ::tripleo::profile::base::gnocchi::statsd
63       upgrade_tasks:
64         - name: Check if gnocchi_statsd is deployed
65           command: systemctl is-enabled openstack-gnocchi-statsd
66           tags: common
67           ignore_errors: True
68           register: gnocchi_statsd_enabled
69         - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
70           shell: /usr/bin/systemctl show 'openstack-gnocchi-statsd' --property ActiveState | grep '\bactive\b'
71           when: gnocchi_statsd_enabled.rc == 0
72           tags: step0,validation
73         - name: Stop gnocchi_statsd service
74           tags: step1
75           when: gnocchi_statsd_enabled.rc == 0
76           service: name=openstack-gnocchi-statsd state=stopped