Move containers common volumes from yaql to list_concat
[apex-tripleo-heat-templates.git] / docker / services / services.yaml
1 heat_template_version: ocata
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   DefaultPasswords:
25     default: {}
26     description: Mapping of service -> default password. Used to help
27                  pass top level passwords managed by Heat into services.
28     type: json
29
30 resources:
31
32   PuppetServices:
33     type: ../../puppet/services/services.yaml
34     properties:
35       Services: {get_param: Services}
36       ServiceNetMap: {get_param: ServiceNetMap}
37       EndpointMap: {get_param: EndpointMap}
38       DefaultPasswords: {get_param: DefaultPasswords}
39
40   ServiceChain:
41     type: OS::Heat::ResourceChain
42     properties:
43       resources: {get_param: Services}
44       concurrent: true
45       resource_properties:
46         ServiceNetMap: {get_param: ServiceNetMap}
47         EndpointMap: {get_param: EndpointMap}
48         DefaultPasswords: {get_param: DefaultPasswords}
49
50 outputs:
51   role_data:
52     description: Combined Role data for this set of services.
53     value:
54       service_names:
55         {get_attr: [PuppetServices, role_data, service_names]}
56       monitoring_subscriptions:
57         {get_attr: [PuppetServices, role_data, monitoring_subscriptions]}
58       logging_sources:
59         {get_attr: [PuppetServices, role_data, logging_sources]}
60       logging_groups:
61         {get_attr: [PuppetServices, role_data, logging_groups]}
62       service_config_settings:
63         {get_attr: [PuppetServices, role_data, service_config_settings]}
64       config_settings:
65         {get_attr: [PuppetServices, role_data, config_settings]}
66       global_config_settings:
67         {get_attr: [PuppetServices, role_data, global_config_settings]}
68       step_config:
69         {get_attr: [ServiceChain, role_data, step_config]}
70       puppet_config: {get_attr: [ServiceChain, role_data, puppet_config]}
71       kolla_config:
72         map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
73       docker_config:
74         {get_attr: [ServiceChain, role_data, docker_config]}
75       docker_puppet_tasks:
76         {get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
77       host_prep_tasks:
78         yaql:
79           # Note we use distinct() here to filter any identical tasks
80           expression: $.data.where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
81           data: {get_attr: [ServiceChain, role_data]}
82       upgrade_tasks:
83         yaql:
84           # Note we use distinct() here to filter any identical tasks, e.g yum update for all services
85           expression: $.data.where($ != null).select($.get('upgrade_tasks')).where($ != null).flatten().distinct()
86           data: {get_attr: [ServiceChain, role_data]}
87       upgrade_batch_tasks:
88         yaql:
89           # Note we use distinct() here to filter any identical tasks, e.g yum update for all services
90           expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
91           data: {get_attr: [ServiceChain, role_data]}
92       service_metadata_settings:
93         get_attr: [PuppetServices, role_data, service_metadata_settings]