cinder: switch CinderCronDbPurgeUser to 'cinder'
[apex-tripleo-heat-templates.git] / common / deploy-steps.j2
index 2b004af..5c923a9 100644 (file)
@@ -4,6 +4,9 @@
   # On upgrade certain roles can be disabled for operator driven upgrades
   # See major_upgrade_steps.j2.yaml and post-upgrade.j2.yaml
   {%- set enabled_roles = roles -%}
+  {%- set is_upgrade = false -%}
+{%- else %}
+  {%- set is_upgrade = true -%}
 {%- endif -%}
 {%- set primary_role = [enabled_roles[0]] -%}
 {%- for role in enabled_roles -%}
@@ -45,6 +48,10 @@ parameters:
     description: Mapping of service endpoint -> protocol. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  ConfigDebug:
+    default: false
+    description: Whether to run config management (e.g. Puppet) in debug mode.
+    type: boolean
   DockerPuppetDebug:
     type: string
     default: ''
@@ -63,7 +70,7 @@ conditions:
     {%- for role in enabled_roles %}
       - not:
           equals:
-            - get_param: [role_data, {{role.name}}, service_workflow_tasks, step{{step}}]
+            - get_param: [role_data, {{role.name}}, workflow_tasks, step{{step}}]
             - ''
       - False
     {%- endfor %}
@@ -82,6 +89,7 @@ resources:
         - name: role_name
         - name: update_identifier
         - name: bootstrap_server_id
+        - name: enable_debug
         - name: docker_puppet_debug
         - name: docker_puppet_process_count
       config:
@@ -95,7 +103,7 @@ resources:
             _TASKS: {get_file: deploy-steps-tasks.yaml}
 
 {%- for step in range(1, deploy_steps_max) %}
-# BEGIN service_workflow_tasks handling
+# BEGIN workflow_tasks handling
   WorkflowTasks_Step{{step}}:
     type: OS::Mistral::Workflow
     condition: WorkflowTasks_Step{{step}}_Enabled
@@ -111,14 +119,14 @@ resources:
     {%- endfor %}
     {%- endif %}
     properties:
-      name: {list_join: [".", ["tripleo", {get_param: stack_name}, "workflowtasks", "step{{step}}"]]}
+      name: {list_join: [".", ["tripleo", {get_param: stack_name}, "workflow_tasks", "step{{step}}"]]}
       type: direct
       tasks:
         yaql:
           expression: $.data.where($ != '').select($.get('step{{step}}')).where($ != null).flatten()
           data:
           {%- for role in enabled_roles %}
-            - get_param: [role_data, {{role.name}}, service_workflow_tasks]
+            - get_param: [role_data, {{role.name}}, workflow_tasks]
           {%- endfor %}
 
   WorkflowTasks_Step{{step}}_Execution:
@@ -148,7 +156,7 @@ resources:
                 {%- endfor %}
             evaluate_env: false
       always_update: true
-# END service_workflow_tasks handling
+# END workflow_tasks handling
 {% endfor %}
 
 # Artifacts config and HostPrepConfig is done on all roles, not only
@@ -189,7 +197,11 @@ resources:
                 tasks:
                   # Join host_prep_tasks with the other per-host configuration
                   list_concat:
+{%- if is_upgrade|default(false) and role.disable_upgrade_deployment|default(false) %}
+                    - []
+{%- else %}
                     - {get_param: [role_data, {{role.name}}, host_prep_tasks]}
+{%- endif %}
                     -
 {%- raw %}
                       # Write the manifest for baremetal puppet configuration
@@ -284,6 +296,7 @@ resources:
         role_name: {{role.name}}
         update_identifier: {get_param: DeployIdentifier}
         bootstrap_server_id: {get_param: [servers, {{primary_role_name}}, '0']}
+        enable_debug: {get_param: ConfigDebug}
         docker_puppet_debug: {get_param: DockerPuppetDebug}
         docker_puppet_process_count: {get_param: DockerPuppetProcessCount}
   {% endfor %}
@@ -363,8 +376,3 @@ outputs:
               with_sequence: start=0 end={{upgrade_steps_max-1}}
               loop_control:
                 loop_var: step
-            - include: deploy_steps_tasks.yaml
-              with_sequence: start=0 end={{deploy_steps_max-1}}
-              loop_control:
-                loop_var: step
-