diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 0136147702..42403840c0 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -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 diff --git a/common/services.yaml b/common/services.yaml index 12fdf1d570..8abe98123a 100644 --- a/common/services.yaml +++ b/common/services.yaml @@ -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]} diff --git a/environments/disable-workflow-tasks.yaml b/environments/disable-workflow-tasks.yaml deleted file mode 100644 index cd4efbbf89..0000000000 --- a/environments/disable-workflow-tasks.yaml +++ /dev/null @@ -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 diff --git a/puppet/services/README.rst b/puppet/services/README.rst index f2d87c63c4..519fa1f7ee 100644 --- a/puppet/services/README.rst +++ b/puppet/services/README.rst @@ -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 -`_ -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) -------------------------------- diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index 1a5604c767..d5757829c9 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -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']: