path: root/overcloud.j2.yaml
diff options
authorSaravanan KR <skramaja@redhat.com>2017-02-24 06:27:58 -0500
committerSaravanan KR <skramaja@redhat.com>2017-05-15 10:06:46 +0530
commita096ddab348d296994838e02169662ca916e09da (patch)
tree31f5d0e0da6a9ccfa833be088891231e58e693e5 /overcloud.j2.yaml
parent0bf3c7ebb85536d1b90c73e54a0d7fc61aae989b (diff)
Add role specific information to the service template
When a service is enabled on multiple roles, the parameters for the service will be global. This change enables an option to provide role specific parameter to services and other templates. Two new parameters - RoleName and RoleParameters, are added to the service template. RoleName provides the role name of on which the current instance of the service is being applied on. RoleParameters provides the list of parameters which are configured specific to the role in the environment file, like below: parameters_default: # Default value for applied to all roles NovaReservedHostMemory: 2048 ComputeDpdkParameters: # Applied only to ComputeDpdk role NovaReservedHostMemory: 4096 In above sample, the cluster contains 2 roles - Compute, ComputeDpdk. The values of ComputeDpdkParameters will be passed on to the templates as RoleParameters while creating the stack for ComputeDpdk role. The parameter which supports role specific configuration, should find the parameter first in in the RoleParameters list, if not found, then the default (for all roles) should be used. Implements: blueprint tripleo-derive-parameters Change-Id: I72376a803ec6b2ed93903cc0c95a6ffce718b6dc
Diffstat (limited to 'overcloud.j2.yaml')
1 files changed, 7 insertions, 0 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml
index 7cf6ad5..cd42a50 100644
--- a/overcloud.j2.yaml
+++ b/overcloud.j2.yaml
@@ -171,6 +171,11 @@ parameters:
type: json
description: Optional scheduler hints to pass to nova
default: {}
+ {{role.name}}Parameters:
+ type: json
+ description: Optional Role Specific parameters to be provided to service
+ default: {}
{% endfor %}
# Identifiers to trigger tasks on nodes
@@ -285,6 +290,8 @@ resources:
ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
+ RoleName: {{role.name}}
+ RoleParameters: {get_param: {{role.name}}Parameters}
# Filter any null/None service_names which may be present due to mapping
# of services to OS::Heat::None