X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=overcloud.j2.yaml;h=7cf6ad5cb4002cb28068d83363652c56ee1ab35b;hb=ff22a006becab049087280827421f5f92bf75df0;hp=7b7801128410b2c8459cc1497a9ff632f31cea5d;hpb=21c5ff30bb8a54913baf6c31dd83f54ad5596ccd;p=apex-tripleo-heat-templates.git diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index 7b780112..7cf6ad5c 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: > @@ -43,7 +51,9 @@ parameters: type: string ControlFixedIPs: default: [] - description: Should be used for arbitrary ips. + description: > + Control the IP allocation for the ControlVirtualIP port. E.g. + [{'ip_address':'1.2.3.4'}] type: json InternalApiVirtualFixedIPs: default: [] @@ -114,6 +124,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 +264,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 +305,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 +371,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 +433,7 @@ resources: - {% for role in roles %} - list_join: - - "\n" + - "" - {get_attr: [{{role.name}}, hosts_entry]} {% endfor %} @@ -581,22 +616,22 @@ resources: - ' ' - - yaql: expression: coalesce($.data, []).first(null) - data: {get_attr: [Controller, external_ip_address]} + data: {get_attr: [{{primary_role_name}}, external_ip_address]} - yaql: expression: coalesce($.data, []).first(null) - data: {get_attr: [Controller, internal_api_ip_address]} + data: {get_attr: [{{primary_role_name}}, internal_api_ip_address]} - yaql: expression: coalesce($.data, []).first(null) - data: {get_attr: [Controller, storage_ip_address]} + data: {get_attr: [{{primary_role_name}}, storage_ip_address]} - yaql: expression: coalesce($.data, []).first(null) - data: {get_attr: [Controller, storage_mgmt_ip_address]} + data: {get_attr: [{{primary_role_name}}, storage_mgmt_ip_address]} - yaql: expression: coalesce($.data, []).first(null) - data: {get_attr: [Controller, tenant_ip_address]} + data: {get_attr: [{{primary_role_name}}, tenant_ip_address]} - yaql: expression: coalesce($.data, []).first(null) - data: {get_attr: [Controller, management_ip_address]} + data: {get_attr: [{{primary_role_name}}, management_ip_address]} UpdateWorkflow: type: OS::TripleO::Tasks::UpdateWorkflow @@ -632,6 +667,7 @@ resources: AllNodesDeploySteps: type: OS::TripleO::PostDeploySteps depends_on: + - AllNodesExtraConfig {% for role in roles %} - {{role.name}}AllNodesDeployment {% endfor %} @@ -683,4 +719,10 @@ outputs: value: {% 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 %}