Merge "Describe use of Manila/CephFS in capabilites_map"
[apex-tripleo-heat-templates.git] / puppet / services / aodh-api.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Aodh API 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   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   MonitoringSubscriptionAodhApi:
22     default: 'overcloud-ceilometer-aodh-api'
23     type: string
24   EnableInternalTLS:
25     type: boolean
26     default: false
27
28 resources:
29   AodhBase:
30     type: ./aodh-base.yaml
31     properties:
32       ServiceNetMap: {get_param: ServiceNetMap}
33       DefaultPasswords: {get_param: DefaultPasswords}
34       EndpointMap: {get_param: EndpointMap}
35
36   ApacheServiceBase:
37     type: ./apache.yaml
38     properties:
39       ServiceNetMap: {get_param: ServiceNetMap}
40       DefaultPasswords: {get_param: DefaultPasswords}
41       EndpointMap: {get_param: EndpointMap}
42       EnableInternalTLS: {get_param: EnableInternalTLS}
43
44 outputs:
45   role_data:
46     description: Role data for the Aodh API service.
47     value:
48       service_name: aodh_api
49       monitoring_subscription: {get_param: MonitoringSubscriptionAodhApi}
50       config_settings:
51         map_merge:
52           - get_attr: [AodhBase, role_data, config_settings]
53           - get_attr: [ApacheServiceBase, role_data, config_settings]
54           - aodh::wsgi::apache::ssl: {get_param: EnableInternalTLS}
55             aodh::wsgi::apache::servername:
56               str_replace:
57                 template:
58                   "%{hiera('fqdn_$NETWORK')}"
59                 params:
60                   $NETWORK: {get_param: [ServiceNetMap, AodhApiNetwork]}
61             aodh::wsgi::apache::wsgi_process_display_name: 'aodh_wsgi'
62             aodh::api::service_name: 'httpd'
63             aodh::api::enable_proxy_headers_parsing: true
64             tripleo.aodh_api.firewall_rules:
65               '128 aodh-api':
66                 dport:
67                   - 8042
68                   - 13042
69             aodh::api::host:
70               str_replace:
71                 template:
72                   "%{hiera('fqdn_$NETWORK')}"
73                 params:
74                   $NETWORK: {get_param: [ServiceNetMap, AodhApiNetwork]}
75             # NOTE: bind IP is found in Heat replacing the network name with the
76             # local node IP for the given network; replacement examples
77             # (eg. for internal_api):
78             # internal_api -> IP
79             # internal_api_uri -> [IP]
80             # internal_api_subnet - > IP/CIDR
81             aodh::wsgi::apache::bind_host: {get_param: [ServiceNetMap, AodhApiNetwork]}
82       service_config_settings:
83         get_attr: [AodhBase, role_data, service_config_settings]
84       step_config: |
85         include tripleo::profile::base::aodh::api
86       metadata_settings:
87         get_attr: [ApacheServiceBase, role_data, metadata_settings]
88       upgrade_tasks:
89         - name: Stop aodh_api service (running under httpd)
90           tags: step2
91           service: name=httpd state=stopped