b849b7919ef48177a72a3bd1a8e76683e2ffc949
[apex-tripleo-heat-templates.git] / puppet / services / services.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   Utility stack to convert an array of services into a set of combined
5   role configs.
6
7 parameters:
8   Services:
9     default: []
10     description: |
11         List nested stack service templates.
12     type: comma_delimited_list
13   ServiceNetMap:
14     default: {}
15     description: Mapping of service_name -> network name. Typically set
16                  via parameter_defaults in the resource registry.  This
17                  mapping overrides those in ServiceNetMapDefaults.
18     type: json
19   EndpointMap:
20     default: {}
21     description: Mapping of service endpoint -> protocol. Typically set
22                  via parameter_defaults in the resource registry.
23     type: json
24
25 resources:
26
27   ServiceChain:
28     type: OS::Heat::ResourceChain
29     properties:
30       resources: {get_param: Services}
31       concurrent: true
32       resource_properties:
33         ServiceNetMap: {get_param: ServiceNetMap}
34         EndpointMap: {get_param: EndpointMap}
35
36 outputs:
37   role_data:
38     description: Combined Role data for this set of services.
39     value:
40       service_names:
41         # Filter any null/None service_names which may be present due to mapping
42         # of services to OS::Heat::None
43         yaql:
44           expression: list($.data.s_names.where($ != null))
45           data: {s_names: {get_attr: [ServiceChain, role_data, service_name]}}
46       config_settings: {map_merge: {get_attr: [ServiceChain, role_data, config_settings]}}
47       step_config: {list_join: ["\n", {get_attr: [ServiceChain, role_data, step_config]}]}