Remove workflow_tasks

I don't think it's used anymore.

Change-Id: I928b53d7388e460da3b26306b9f3c548808d329e
This commit is contained in:
Thomas Herve 2019-01-24 11:08:53 +01:00
parent 55e7174e41
commit ae2ccb5f41
5 changed files with 1 additions and 131 deletions

View File

@ -115,17 +115,6 @@ parameters:
{% endfor %}
conditions:
{% for step in range(1, deploy_steps_max) %}
WorkflowTasks_Step{{step}}_Enabled:
or:
{%- for role in enabled_roles %}
- not:
equals:
- get_param: [role_data, {{role.name}}, workflow_tasks, step{{step}}]
- ''
- False
{%- endfor %}
{% endfor %}
{% for role in enabled_roles %}
{{role.name}}NonZero:
not:
@ -230,71 +219,6 @@ resources:
- get_param: [role_data, {{role.name}}, external_upgrade_tasks]
{%- endfor %}
{%- for step in range(1, deploy_steps_max) %}
# BEGIN workflow_tasks handling
WorkflowTasks_Step{{step}}:
type: OS::Mistral::Workflow
condition: WorkflowTasks_Step{{step}}_Enabled
depends_on:
{%- if step == 1 %}
{%- for dep in enabled_roles %}
- {{dep.name}}ArtifactsDeploy
{%- endfor %}
{%- else %}
{%- for dep in enabled_roles %}
- {{dep.name}}Deployment_Step{{step -1}}
{%- endfor %}
{%- endif %}
properties:
name: {list_join: [".", ["tripleo", {get_param: stack_name}, "workflow_tasks", "step{{step}}"]]}
type: direct
tags:
- tripleo-heat-templates-managed
- {get_param: stack_name}
tasks:
yaql:
expression: $.data.where($ != '').select($.get('step{{step}}')).where($ != null).flatten()
data:
{%- for role in enabled_roles %}
- get_param: [role_data, {{role.name}}, workflow_tasks]
{%- endfor %}
WorkflowTasks_Step{{step}}_Execution:
type: OS::TripleO::WorkflowSteps
condition: WorkflowTasks_Step{{step}}_Enabled
depends_on: WorkflowTasks_Step{{step}}
properties:
actions:
CREATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
params:
env:
heat_stack_name: { get_param: stack_name }
service_ips: { get_param: ctlplane_service_ips }
role_merged_configs:
{%- for r in roles %}
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
{%- endfor %}
blacklisted_ip_addresses: {get_param: blacklisted_ip_addresses}
blacklisted_hostnames: {get_param: blacklisted_hostnames}
evaluate_env: false
UPDATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
params:
env:
heat_stack_name: { get_param: stack_name }
service_ips: { get_param: ctlplane_service_ips }
role_merged_configs:
{%- for r in roles %}
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
{%- endfor %}
blacklisted_ip_addresses: {get_param: blacklisted_ip_addresses}
blacklisted_hostnames: {get_param: blacklisted_hostnames}
evaluate_env: false
always_update: true
# END workflow_tasks handling
{% endfor %}
BootstrapServerId:
type: OS::Heat::Value
properties:
@ -333,7 +257,6 @@ resources:
type: OS::TripleO::DeploymentSteps
condition: {{role.name}}NonZero
depends_on:
- WorkflowTasks_Step{{step}}_Execution
# TODO(gfidente): the following if/else condition
# replicates what is already defined for the
# WorkflowTasks_StepX resource and can be remove

View File

@ -145,15 +145,6 @@ resources:
expression: coalesce($.data.role_data, []).where($ != null).select($.get('service_config_settings')).where($ != null).reduce($1.mergeWith($2), {})
data: {role_data: {get_attr: [ServiceChain, role_data]}}
WorkflowTasks:
type: OS::Heat::Value
properties:
type: json
value:
yaql:
expression: coalesce($.data.role_data, []).where($ != null).select($.get('workflow_tasks')).where($ != null).reduce($1.mergeWith($2), {})
data: {role_data: {get_attr: [ServiceChain, role_data]}}
DeployStepsTasks:
type: OS::Heat::Value
properties:
@ -340,7 +331,6 @@ outputs:
data: {get_attr: [ServiceChain, role_data, config_settings]}
global_config_settings: {get_attr: [GlobalConfigSettings, value]}
service_config_settings: {get_attr: [ServiceConfigSettings, value]}
workflow_tasks: {get_attr: [WorkflowTasks, value]}
step_config: {get_attr: [PuppetStepConfig, value]}
deploy_steps_tasks: {get_attr: [DeployStepsTasks, value]}
external_deploy_tasks: {get_attr: [ExternalDeployTasks, value]}

View File

@ -1,6 +0,0 @@
# This environment can be used to optionally disable the mistral workflow_tasks
# by mapping OS::Mistral resources to None.
resource_registry:
OS::Mistral::Workflow: OS::Heat::None
OS::Mistral::ExternalResource: OS::Heat::None

View File

@ -100,37 +100,6 @@ are re-asserted when applying latter ones.
5) Service activation (Pacemaker)
It is also possible to use Mistral actions or workflows together with
a deployment step, these are executed before the main configuration run.
To describe actions or workflows from within a service use:
* workflow_tasks: One or more workflow task properties
which expects a map where the key is the step and the value a list of
dictionaries descrbing each a workflow task, for example::
workflow_tasks:
step2:
- name: echo
action: std.echo output=Hello
step3:
- name: external
workflow: my-pre-existing-workflow-name
input:
workflow_param1: value
workflow_param2: value
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>`_
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 (deprecated)
--------------------------------

View File

@ -52,7 +52,7 @@ envs_containing_endpoint_map = ['no-tls-endpoints-public-ip.yaml',
'tls-endpoints-public-ip.yaml',
'tls-everywhere-endpoints-dns.yaml']
ENDPOINT_MAP_FILE = 'endpoint_map.yaml'
OPTIONAL_SECTIONS = ['workflow_tasks', 'cellv2_discovery']
OPTIONAL_SECTIONS = ['cellv2_discovery']
REQUIRED_DOCKER_SECTIONS = ['service_name', 'docker_config', 'puppet_config',
'config_settings']
OPTIONAL_DOCKER_SECTIONS = ['docker_puppet_tasks', 'upgrade_tasks',
@ -699,12 +699,6 @@ def validate_docker_service(filename, tpl):
print('ERROR: fast_forward_post_upgrade_tasks validation failed')
return 1
if 'workflow_tasks' in role_data and \
filename not in WORKFLOW_TASKS_EXCLUSIONS:
print('ERROR: workflow_tasks are no longer supported '
'with config-download in %s.' % filename)
return 1
if 'parameters' in tpl:
for param in required_params:
if param not in tpl['parameters']: