Merge "Configure snmpd auth params in ceilometer profile"
[apex-tripleo-heat-templates.git] / overcloud.j2.yaml
index 584fdfd..7cf6ad5 100644 (file)
@@ -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
@@ -356,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}
@@ -415,7 +433,7 @@ resources:
         -
 {% for role in roles %}
           - list_join:
-            - "\n"
+            - ""
             - {get_attr: [{{role.name}}, hosts_entry]}
 {% endfor %}
 
@@ -596,12 +614,24 @@ resources:
       PingTestIps:
         list_join:
         - ' '
-        - - {get_attr: [{{primary_role_name}}, resource.0.external_ip_address]}
-          - {get_attr: [{{primary_role_name}}, resource.0.internal_api_ip_address]}
-          - {get_attr: [{{primary_role_name}}, resource.0.storage_ip_address]}
-          - {get_attr: [{{primary_role_name}}, resource.0.storage_mgmt_ip_address]}
-          - {get_attr: [{{primary_role_name}}, resource.0.tenant_ip_address]}
-          - {get_attr: [{{primary_role_name}}, resource.0.management_ip_address]}
+        - - yaql:
+              expression: coalesce($.data, []).first(null)
+              data: {get_attr: [{{primary_role_name}}, external_ip_address]}
+          - yaql:
+              expression: coalesce($.data, []).first(null)
+              data: {get_attr: [{{primary_role_name}}, internal_api_ip_address]}
+          - yaql:
+              expression: coalesce($.data, []).first(null)
+              data: {get_attr: [{{primary_role_name}}, storage_ip_address]}
+          - yaql:
+              expression: coalesce($.data, []).first(null)
+              data: {get_attr: [{{primary_role_name}}, storage_mgmt_ip_address]}
+          - yaql:
+              expression: coalesce($.data, []).first(null)
+              data: {get_attr: [{{primary_role_name}}, tenant_ip_address]}
+          - yaql:
+              expression: coalesce($.data, []).first(null)
+              data: {get_attr: [{{primary_role_name}}, management_ip_address]}
 
   UpdateWorkflow:
     type: OS::TripleO::Tasks::UpdateWorkflow
@@ -637,6 +667,7 @@ resources:
   AllNodesDeploySteps:
     type: OS::TripleO::PostDeploySteps
     depends_on:
+      - AllNodesExtraConfig
 {% for role in roles %}
       - {{role.name}}AllNodesDeployment
 {% endfor %}
@@ -688,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 %}