Hiera optimization: use a new hiera hook
[apex-tripleo-heat-templates.git] / puppet / services / panko-api.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Panko 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   MonitoringSubscriptionPankoApi:
22     default: 'overcloud-ceilometer-panko-api'
23     type: string
24   EnableInternalTLS:
25     type: boolean
26     default: false
27
28 resources:
29   PankoBase:
30     type: ./panko-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 Panko API service.
47     value:
48       service_name: panko_api
49       monitoring_subscription: {get_param: MonitoringSubscriptionPankoApi}
50       config_settings:
51         map_merge:
52           - get_attr: [PankoBase, role_data, config_settings]
53           - get_attr: [ApacheServiceBase, role_data, config_settings]
54           - panko::wsgi::apache::ssl: {get_param: EnableInternalTLS}
55             panko::wsgi::apache::servername:
56               str_replace:
57                 template:
58                   '%{::fqdn_$NETWORK}'
59                 params:
60                   $NETWORK: {get_param: [ServiceNetMap, PankoApiNetwork]}
61             panko::api::service_name: 'httpd'
62             panko::api::enable_proxy_headers_parsing: true
63             tripleo.panko_api.firewall_rules:
64               '140 panko-api':
65                 dport:
66                   - 8779
67                   - 13779
68             panko::api::host:
69               str_replace:
70                 template:
71                   '%{::fqdn_$NETWORK}'
72                 params:
73                   $NETWORK: {get_param: [ServiceNetMap, PankoApiNetwork]}
74             # NOTE: bind IP is found in Heat replacing the network name with the
75             # local node IP for the given network; replacement examples
76             # (eg. for internal_api):
77             # internal_api -> IP
78             # internal_api_uri -> [IP]
79             # internal_api_subnet - > IP/CIDR
80             panko::wsgi::apache::bind_host: {get_param: [ServiceNetMap, PankoApiNetwork]}
81       service_config_settings:
82         get_attr: [PankoBase, role_data, service_config_settings]
83       step_config: |
84         include tripleo::profile::base::panko::api