1 #FIXME move into common when specfile adds it
2 heat_template_version: pike
5 Utility stack to convert an array of services into a set of combined
12 List nested stack service templates.
13 type: comma_delimited_list
16 description: Dictionary packing service data
20 description: Mapping of service_name -> network name. Typically set
21 via parameter_defaults in the resource registry. This
22 mapping overrides those in ServiceNetMapDefaults.
26 description: Mapping of service endpoint -> protocol. Typically set
27 via parameter_defaults in the resource registry.
31 description: Mapping of service -> default password. Used to help
32 pass top level passwords managed by Heat into services.
36 description: Role name on which the service is applied
39 description: Role Specific parameters to be provided to service
46 type: OS::Heat::ResourceChain
48 resources: {get_param: Services}
51 ServiceData: {get_param: ServiceData}
52 ServiceNetMap: {get_param: ServiceNetMap}
53 EndpointMap: {get_param: EndpointMap}
54 DefaultPasswords: {get_param: DefaultPasswords}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
59 type: OS::TripleO::LoggingConfiguration
61 ServiceServerMetadataHook:
62 type: OS::TripleO::ServiceServerMetadataHook
64 RoleData: {get_attr: [ServiceChain, role_data]}
68 description: Combined Role data for this set of services.
71 {get_attr: [ServiceChain, role_data, service_name]}
72 monitoring_subscriptions:
74 expression: list($.data.role_data.where($ != null).select($.get('monitoring_subscription')).where($ != null))
75 data: {role_data: {get_attr: [ServiceChain, role_data]}}
77 # Transform the individual logging_source configuration from
78 # each service in the chain into a global list, adding some
79 # default configuration at the same time.
83 default_format => $.data.default_format,
84 pos_file_path => $.data.pos_file_path,
85 sources => $.data.sources.flatten()
87 $sources.where($ != null).select({
91 'format' => $.get('format', $default_format),
92 'pos_file' => $.get('pos_file', $pos_file_path + '/' + $.tag + '.pos')
96 - {get_attr: [LoggingConfiguration, LoggingDefaultSources]}
98 expression: list($.data.role_data.where($ != null).select($.get('logging_source')).where($ != null))
99 data: {role_data: {get_attr: [ServiceChain, role_data]}}
101 - {get_attr: [LoggingConfiguration, LoggingExtraSources]}
102 default_format: {get_attr: [LoggingConfiguration, LoggingDefaultFormat]}
103 pos_file_path: {get_attr: [LoggingConfiguration, LoggingPosFilePath]}
105 # Build a list of unique groups to which we should add the
109 set(($.data.default + $.data.extra + $.data.role_data.where($ != null).select($.get('logging_groups'))).flatten()).where($)
111 default: {get_attr: [LoggingConfiguration, LoggingDefaultGroups]}
112 extra: {get_attr: [LoggingConfiguration, LoggingExtraGroups]}
113 role_data: {get_attr: [ServiceChain, role_data]}
114 config_settings: {map_merge: {get_attr: [ServiceChain, role_data, config_settings]}}
115 global_config_settings:
118 expression: list($.data.role_data.where($ != null).select($.get('global_config_settings')).where($ != null))
119 data: {role_data: {get_attr: [ServiceChain, role_data]}}
120 service_config_settings:
122 expression: $.data.role_data.where($ != null).select($.get('service_config_settings')).where($ != null).reduce($1.mergeWith($2), {})
123 data: {role_data: {get_attr: [ServiceChain, role_data]}}
124 service_workflow_tasks:
126 expression: $.data.role_data.where($ != null).select($.get('service_workflow_tasks')).where($ != null).reduce($1.mergeWith($2), {})
127 data: {role_data: {get_attr: [ServiceChain, role_data]}}
128 step_config: {get_attr: [ServiceChain, role_data, step_config]}
131 # Note we use distinct() here to filter any identical tasks, e.g yum update for all services
132 expression: $.data.where($ != null).select($.get('upgrade_tasks')).where($ != null).flatten().distinct()
133 data: {get_attr: [ServiceChain, role_data]}
136 # Note we use distinct() here to filter any identical tasks, e.g yum update for all services
137 expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
138 data: {get_attr: [ServiceChain, role_data]}
139 service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]}
141 # Keys to support docker/services
142 puppet_config: {get_attr: [ServiceChain, role_data, puppet_config]}
144 map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
146 {get_attr: [ServiceChain, role_data, docker_config]}
148 {get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
151 # Note we use distinct() here to filter any identical tasks
152 expression: $.data.where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
153 data: {get_attr: [ServiceChain, role_data]}