diff options
Diffstat (limited to 'overcloud.j2.yaml')
-rw-r--r-- | overcloud.j2.yaml | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index de7cc0d5..a2d501d3 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -1,4 +1,12 @@ -{% set primary_role_name = roles[0].name -%} +{%- set primary_role = [roles[0]] -%} +{%- for role in roles -%} + {%- if 'primary' in role.tags and 'controller' in role.tags -%} + {%- set _ = primary_role.pop() -%} + {%- set _ = primary_role.append(role) -%} + {%- endif -%} +{%- endfor -%} +{%- set primary_role_name = primary_role[0].name -%} +# primary role is: {{primary_role_name}} heat_template_version: ocata description: > @@ -114,6 +122,11 @@ parameters: description: What interface to add to the HypervisorNeutronPhysicalBridge. type: string + NodeCreateBatchSize: + default: 30 + description: Maxiumum batch size for creating nodes + type: number + # Jinja loop for Role in role_data.yaml {% for role in roles %} # Parameters generated for {{role.name}} Role @@ -249,6 +262,16 @@ resources: type: json value: {get_attr: [EndpointMap, endpoint_map]} + SshKnownHostsConfig: + type: OS::TripleO::Ssh::KnownHostsConfig + properties: + known_hosts: + list_join: + - '' + {% for role in roles %} + - {get_attr: [{{role.name}}, known_hosts_entry]} + {% endfor %} + # Jinja loop for Role in roles_data.yaml {% for role in roles %} # Resources generated for {{role.name}} Role @@ -280,6 +303,13 @@ resources: config: {get_attr: [hostsConfig, config_id]} servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]} + {{role.name}}SshKnownHostsDeployment: + type: OS::Heat::StructuredDeployments + properties: + name: {{role.name}}SshKnownHostsDeployment + config: {get_resource: SshKnownHostsConfig} + servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]} + {{role.name}}AllNodesDeployment: type: OS::Heat::StructuredDeployments depends_on: @@ -339,6 +369,9 @@ resources: {{role.name}}: type: OS::Heat::ResourceGroup depends_on: Networks + update_policy: + batch_create: + max_batch_size: {get_param: NodeCreateBatchSize} properties: count: {get_param: {{role.name}}Count} removal_policies: {get_param: {{role.name}}RemovalPolicies} @@ -398,7 +431,7 @@ resources: - {% for role in roles %} - list_join: - - "\n" + - "" - {get_attr: [{{role.name}}, hosts_entry]} {% endfor %} @@ -684,3 +717,9 @@ outputs: {% for role in roles %} {{role.name}}: {get_attr: [{{role.name}}ServiceChain, role_data]} {% endfor %} + RoleNetIpMap: + description: Mapping of each network to a list of IPs for each role + value: +{% for role in roles %} + {{role.name}}: {get_attr: [{{role.name}}IpListMap, net_ip_map]} +{% endfor %} |