Merge "Add external_post_deploy_tasks interface"
This commit is contained in:
commit
4609fab079
|
@ -115,6 +115,19 @@ resources:
|
||||||
- get_param: [role_data, {{role.name}}, external_deploy_tasks]
|
- get_param: [role_data, {{role.name}}, external_deploy_tasks]
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
ExternalPostDeployTasks:
|
||||||
|
type: OS::Heat::Value
|
||||||
|
properties:
|
||||||
|
type: comma_delimited_list
|
||||||
|
value:
|
||||||
|
yaql:
|
||||||
|
# processing from per-role unique tasks into globally unique tasks
|
||||||
|
expression: coalesce($.data, []).flatten().distinct()
|
||||||
|
data:
|
||||||
|
{%- for role in enabled_roles %}
|
||||||
|
- get_param: [role_data, {{role.name}}, external_post_deploy_tasks]
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
{%- for step in range(1, deploy_steps_max) %}
|
{%- for step in range(1, deploy_steps_max) %}
|
||||||
# BEGIN workflow_tasks handling
|
# BEGIN workflow_tasks handling
|
||||||
WorkflowTasks_Step{{step}}:
|
WorkflowTasks_Step{{step}}:
|
||||||
|
@ -444,7 +457,18 @@ outputs:
|
||||||
- overcloud
|
- overcloud
|
||||||
- post_deploy_steps
|
- post_deploy_steps
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
- hosts: undercloud
|
||||||
|
name: External deployment Post Deploy tasks
|
||||||
|
gather_facts: no
|
||||||
|
any_errors_fatal: yes
|
||||||
|
become: false
|
||||||
|
tasks:
|
||||||
|
- include: external_post_deploy_steps_tasks.yaml
|
||||||
|
tags:
|
||||||
|
- external
|
||||||
|
- external_deploy_steps
|
||||||
external_deploy_steps_tasks: {get_attr: [ExternalDeployTasks, value]}
|
external_deploy_steps_tasks: {get_attr: [ExternalDeployTasks, value]}
|
||||||
|
external_post_deploy_steps_tasks: {get_attr: [ExternalPostDeployTasks, value]}
|
||||||
update_steps_tasks: |
|
update_steps_tasks: |
|
||||||
{%- for role in roles %}
|
{%- for role in roles %}
|
||||||
- include: {{role.name}}/update_tasks.yaml
|
- include: {{role.name}}/update_tasks.yaml
|
||||||
|
|
|
@ -218,6 +218,16 @@ resources:
|
||||||
expression: coalesce($.data, []).where($ != null).select($.get('external_deploy_tasks')).where($ != null).flatten().distinct()
|
expression: coalesce($.data, []).where($ != null).select($.get('external_deploy_tasks')).where($ != null).flatten().distinct()
|
||||||
data: {get_attr: [ServiceChain, role_data]}
|
data: {get_attr: [ServiceChain, role_data]}
|
||||||
|
|
||||||
|
ExternalPostDeployTasks:
|
||||||
|
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('external_post_deploy_tasks')).where($ != null).flatten().distinct()
|
||||||
|
data: {get_attr: [ServiceChain, role_data]}
|
||||||
|
|
||||||
UpgradeTasks:
|
UpgradeTasks:
|
||||||
type: OS::Heat::Value
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
|
@ -308,6 +318,7 @@ outputs:
|
||||||
workflow_tasks: {get_attr: [WorkflowTasks, value]}
|
workflow_tasks: {get_attr: [WorkflowTasks, value]}
|
||||||
step_config: {get_attr: [PuppetStepConfig, value]}
|
step_config: {get_attr: [PuppetStepConfig, value]}
|
||||||
external_deploy_tasks: {get_attr: [ExternalDeployTasks, value]}
|
external_deploy_tasks: {get_attr: [ExternalDeployTasks, value]}
|
||||||
|
external_post_deploy_tasks: {get_attr: [ExternalPostDeployTasks, value]}
|
||||||
upgrade_tasks: {get_attr: [UpgradeTasks, value]}
|
upgrade_tasks: {get_attr: [UpgradeTasks, value]}
|
||||||
post_upgrade_tasks: {get_attr: [PostUpgradeTasks, value]}
|
post_upgrade_tasks: {get_attr: [PostUpgradeTasks, value]}
|
||||||
update_tasks: {get_attr: [UpdateTasks, value]}
|
update_tasks: {get_attr: [UpdateTasks, value]}
|
||||||
|
|
|
@ -124,6 +124,13 @@ The Heat guide for the `OS::Mistral::Workflow task property
|
||||||
<https://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Mistral::Workflow-prop-tasks>`_
|
<https://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Mistral::Workflow-prop-tasks>`_
|
||||||
has more details about the expected dictionary.
|
has more details about the expected dictionary.
|
||||||
|
|
||||||
|
* external_deploy_tasks: Ansible tasks to be run each step on the undercloud
|
||||||
|
where a variable "step" is provided to enable conditionally running tasks
|
||||||
|
at a given step.
|
||||||
|
|
||||||
|
* external_post_deploy_tasks: Ansible tasks to be run on the undercloud
|
||||||
|
after all other deploy steps have completed.
|
||||||
|
|
||||||
Batch Upgrade Steps
|
Batch Upgrade Steps
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Service templates now support an external_post_deploy_tasks interface,
|
||||||
|
this works in the same way as external_deploy_tasks but runs after all
|
||||||
|
other deploy steps have completed.
|
|
@ -49,6 +49,7 @@ OPTIONAL_DOCKER_SECTIONS = ['docker_puppet_tasks', 'upgrade_tasks',
|
||||||
'metadata_settings', 'kolla_config',
|
'metadata_settings', 'kolla_config',
|
||||||
'global_config_settings', 'logging_source',
|
'global_config_settings', 'logging_source',
|
||||||
'logging_groups', 'external_deploy_tasks',
|
'logging_groups', 'external_deploy_tasks',
|
||||||
|
'external_post_deploy_tasks',
|
||||||
'docker_config_scripts']
|
'docker_config_scripts']
|
||||||
REQUIRED_DOCKER_PUPPET_CONFIG_SECTIONS = ['config_volume', 'step_config',
|
REQUIRED_DOCKER_PUPPET_CONFIG_SECTIONS = ['config_volume', 'step_config',
|
||||||
'config_image']
|
'config_image']
|
||||||
|
|
Loading…
Reference in New Issue