X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=overcloud.j2.yaml;h=e1c70dc73f535db0f842c44e31dbe42553e2a1f2;hb=37447494de7380409f4461835a2b1882ead37985;hp=8998ce11cc6d2fc1894010dea3ff42604e5cd12e;hpb=03421f809747681f85430d9ac63d722d7e444688;p=apex-tripleo-heat-templates.git diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index 8998ce11..e1c70dc7 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -1,5 +1,13 @@ -{% set primary_role_name = roles[0].name -%} -heat_template_version: ocata +{%- 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: pike description: > Deploy an OpenStack environment, consisting of several node types (roles), @@ -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: [] @@ -161,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 @@ -254,6 +269,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 @@ -265,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 @@ -285,6 +312,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: @@ -640,6 +674,7 @@ resources: AllNodesDeploySteps: type: OS::TripleO::PostDeploySteps depends_on: + - AllNodesExtraConfig {% for role in roles %} - {{role.name}}AllNodesDeployment {% endfor %}