diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/deploy-steps.j2 | 18 | ||||
-rw-r--r-- | common/services.yaml | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 9cf4ead0..b798a67f 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -10,6 +10,7 @@ {%- set primary_role_name = primary_role[0].name -%} # primary role is: {{primary_role_name}} {% set deploy_steps_max = 6 -%} +{% set update_steps_max = 6 -%} heat_template_version: pike @@ -319,4 +320,21 @@ outputs: with_sequence: count={{deploy_steps_max-1}} loop_control: loop_var: step + update_steps_tasks: | +{%- for role in roles %} + - include: {{role.name}}/update_tasks.yaml + when: role_name == '{{role.name}}' +{%- endfor %} + update_steps_playbook: | + - hosts: overcloud + serial: 1 + tasks: + - include: update_steps_tasks.yaml + with_sequence: count={{update_steps_max-1}} + loop_control: + loop_var: step + - include: deploy_steps_tasks.yaml + with_sequence: count={{deploy_steps_max-1}} + loop_control: + loop_var: step diff --git a/common/services.yaml b/common/services.yaml index 0bc3462f..a8186e43 100644 --- a/common/services.yaml +++ b/common/services.yaml @@ -193,6 +193,16 @@ resources: expression: coalesce($.data, []).where($ != null).select($.get('upgrade_tasks')).where($ != null).flatten().distinct() data: {get_attr: [ServiceChain, role_data]} + UpdateTasks: + type: OS::Heat::Value + properties: + type: comma_delimited_list + value: + yaql: + # Note we use distinct() here to filter any identical tasks, e.g yum update for all services + expression: coalesce($.data, []).where($ != null).select($.get('update_tasks')).where($ != null).flatten().distinct() + data: {get_attr: [ServiceChain, role_data]} + UpgradeBatchTasks: type: OS::Heat::Value properties: @@ -253,6 +263,7 @@ outputs: service_workflow_tasks: {get_attr: [ServiceWorkflowTasks, value]} step_config: {get_attr: [PuppetStepConfig, value]} upgrade_tasks: {get_attr: [UpgradeTasks, value]} + update_tasks: {get_attr: [UpdateTasks, value]} upgrade_batch_tasks: {get_attr: [UpgradeBatchTasks, value]} service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]} |