@@ -55,6 +55,18 @@ parameters:
55
55
Control the IP allocation for the ControlVirtualIP port. E.g.
56
56
[{'ip_address':'1.2.3.4'}]
57
57
type : json
58
+ ExtraConfig :
59
+ default : {}
60
+ description : |
61
+ Additional hiera configuration to inject into the cluster.
62
+ type : json
63
+ {% for role in roles %}
64
+ {{role.name}}ExtraConfig:
65
+ default : {}
66
+ description : |
67
+ Role specific additional hiera configuration to inject into the cluster.
68
+ type : json
69
+ {% endfor %}
58
70
InternalApiVirtualFixedIPs :
59
71
default : []
60
72
description : >
@@ -323,6 +335,46 @@ resources:
323
335
type : json
324
336
value : {get_attr: [{{role.name}}ServiceChain, role_data]}
325
337
338
+ {{role.name}}ServiceConfigSettings:
339
+ type : OS::Heat::Value
340
+ properties :
341
+ type : json
342
+ value :
343
+ map_merge :
344
+ - get_attr : [{{role.name}}ServiceChainRoleData, value, config_settings]
345
+ {% for r in roles %}
346
+ - get_attr : [{{r.name}}ServiceChainRoleData, value, global_config_settings]
347
+ {% endfor %}
348
+ # This next step combines two yaql passes:
349
+ # - The inner one does a deep merge on the service_config_settings for all roles
350
+ # - The outer one filters the map based on the services enabled for the role
351
+ # then merges the result into one map.
352
+ - yaql :
353
+ expression : let(root => $) -> $.data.map.items().where($[0] in coalesce($root.data.services, [])).select($[1]).reduce($1.mergeWith($2), {})
354
+ data :
355
+ map :
356
+ yaql :
357
+ expression : $.data.where($ != null).reduce($1.mergeWith($2), {})
358
+ data :
359
+ {% for r in roles %}
360
+ - get_attr : [{{r.name}}ServiceChainRoleData, value, service_config_settings]
361
+ {% endfor %}
362
+ services : {get_attr: [{{role.name}}ServiceNames, value]}
363
+
364
+ {{role.name}}MergedConfigSettings:
365
+ type : OS::Heat::Value
366
+ properties :
367
+ type : json
368
+ value :
369
+ config_settings : {}
370
+ global_config_settings : {}
371
+ service_config_settings : {}
372
+ merged_config_settings :
373
+ map_merge :
374
+ - get_attr : [{{role.name}}ServiceConfigSettings, value]
375
+ - get_param : ExtraConfig
376
+ - get_param : {{role.name}}ExtraConfig
377
+
326
378
# Filter any null/None service_names which may be present due to mapping
327
379
# of services to OS::Heat::None
328
380
{{role.name}}ServiceNames:
@@ -437,27 +489,7 @@ resources:
437
489
{% else %}
438
490
NovaComputeSchedulerHints : {get_param: NovaComputeSchedulerHints}
439
491
{% endif %}
440
- ServiceConfigSettings :
441
- map_merge :
442
- - get_attr : [{{role.name}}ServiceChainRoleData, value, config_settings]
443
- {% for r in roles %}
444
- - get_attr : [{{r.name}}ServiceChain, role_data, global_config_settings]
445
- {% endfor %}
446
- # This next step combines two yaql passes:
447
- # - The inner one does a deep merge on the service_config_settings for all roles
448
- # - The outer one filters the map based on the services enabled for the role
449
- # then merges the result into one map.
450
- - yaql :
451
- expression : let(root => $) -> $.data.map.items().where($[0] in coalesce($root.data.services, [])).select($[1]).reduce($1.mergeWith($2), {})
452
- data :
453
- map :
454
- yaql :
455
- expression : $.data.where($ != null).reduce($1.mergeWith($2), {})
456
- data :
457
- {% for r in roles %}
458
- - get_attr : [{{r.name}}ServiceChain, role_data, service_config_settings]
459
- {% endfor %}
460
- services : {get_attr: [{{role.name}}ServiceNames, value]}
492
+ ServiceConfigSettings : {get_attr: [{{role.name}}ServiceConfigSettings, value]}
461
493
ServiceNames : {get_attr: [{{role.name}}ServiceNames, value]}
462
494
MonitoringSubscriptions : {get_attr: [{{role.name}}ServiceChainRoleData, value, monitoring_subscriptions]}
463
495
ServiceMetadataSettings : {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
@@ -784,7 +816,10 @@ resources:
784
816
{% endfor %}
785
817
role_data :
786
818
{% for role in roles %}
787
- {{role.name}}: {get_attr: [{{role.name}}ServiceChainRoleData, value]}
819
+ {{role.name}}:
820
+ map_merge :
821
+ - {get_attr: [{{role.name}}ServiceChainRoleData, value]}
822
+ - {get_attr: [{{role.name}}MergedConfigSettings, value]}
788
823
{% endfor %}
789
824
790
825
ServerOsCollectConfigData :
@@ -869,7 +904,10 @@ outputs:
869
904
description : The configuration data associated with each role
870
905
value :
871
906
{% for role in roles %}
872
- {{role.name}}: {get_attr: [{{role.name}}ServiceChainRoleData, value]}
907
+ {{role.name}}:
908
+ map_merge :
909
+ - {get_attr: [{{role.name}}ServiceChainRoleData, value]}
910
+ - {get_attr: [{{role.name}}MergedConfigSettings, value]}
873
911
{% endfor %}
874
912
RoleNetIpMap :
875
913
description : Mapping of each network to a list of IPs for each role
0 commit comments