Merge "Introduce pre_deploy_step_tasks"
This commit is contained in:
commit
4749fef686
@ -259,6 +259,16 @@ conditions:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
|
PreDeployStepTasks:
|
||||||
|
type: OS::Heat::Value
|
||||||
|
properties:
|
||||||
|
type: comma_delimited_list
|
||||||
|
value:
|
||||||
|
list_concat_unique:
|
||||||
|
{%- for role in enabled_roles %}
|
||||||
|
- get_param: [role_data, {{role.name}}, pre_deploy_step_tasks]
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
ExternalDeployTasks:
|
ExternalDeployTasks:
|
||||||
type: OS::Heat::Value
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
@ -714,6 +724,40 @@ outputs:
|
|||||||
- overcloud
|
- overcloud
|
||||||
- container_setup_tasks
|
- container_setup_tasks
|
||||||
|
|
||||||
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
|
strategy: tripleo_free
|
||||||
|
name: Pre Deployment Step Tasks
|
||||||
|
become: true
|
||||||
|
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
|
||||||
|
any_errors_fatal: yes
|
||||||
|
vars:
|
||||||
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
|
deploy_identifier: DEPLOY_IDENTIFIER
|
||||||
|
enable_debug: ENABLE_DEBUG
|
||||||
|
enable_puppet: ENABLE_PUPPET
|
||||||
|
container_cli: CONTAINER_CLI
|
||||||
|
container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH
|
||||||
|
container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED
|
||||||
|
docker_puppet_debug: DOCKER_PUPPET_DEBUG
|
||||||
|
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
|
||||||
|
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
|
||||||
|
tasks:
|
||||||
|
- name: Pre Deployment Step Tasks
|
||||||
|
delegate_to: localhost
|
||||||
|
run_once: true
|
||||||
|
debug:
|
||||||
|
msg: Use --start-at-task 'Pre Deployment Step Tasks' to resume from this task
|
||||||
|
{%- for role in roles %}
|
||||||
|
- name: {{role.name}} Pre Deployment Step Tasks block
|
||||||
|
include_tasks: {{role.name}}/pre_deploy_step_tasks.yaml
|
||||||
|
when:
|
||||||
|
- tripleo_role_name == '{{role.name}}'
|
||||||
|
- "'{{role.name}}/pre_deploy_step_tasks.yaml' is exists"
|
||||||
|
{%- endfor %}
|
||||||
|
tags:
|
||||||
|
- overcloud
|
||||||
|
- pre_deploy_steps_tasks
|
||||||
|
|
||||||
{%- for step in range(1,deploy_steps_max) %}
|
{%- for step in range(1,deploy_steps_max) %}
|
||||||
|
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
@ -877,6 +921,7 @@ outputs:
|
|||||||
|
|
||||||
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]}
|
external_post_deploy_steps_tasks: {get_attr: [ExternalPostDeployTasks, value]}
|
||||||
|
pre_deploy_step_tasks: {get_attr: [PreDeployStepTasks, value]}
|
||||||
update_steps_playbook:
|
update_steps_playbook:
|
||||||
{{ self.deploy_steps_str_replace_params() }}
|
{{ self.deploy_steps_str_replace_params() }}
|
||||||
template: |
|
template: |
|
||||||
|
@ -311,6 +311,16 @@ resources:
|
|||||||
expression: coalesce($.data, []).where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
|
expression: coalesce($.data, []).where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
|
||||||
data: {get_attr: [ServiceChain, role_data]}
|
data: {get_attr: [ServiceChain, role_data]}
|
||||||
|
|
||||||
|
PreDeployStepTasks:
|
||||||
|
type: OS::Heat::Value
|
||||||
|
properties:
|
||||||
|
type: comma_delimited_list
|
||||||
|
value:
|
||||||
|
yaql:
|
||||||
|
# Note we use distinct() here to filter any identical tasks
|
||||||
|
expression: coalesce($.data, []).where($ != null).select($.get('pre_deploy_step_tasks')).where($ != null).flatten().distinct()
|
||||||
|
data: {get_attr: [ServiceChain, role_data]}
|
||||||
|
|
||||||
AnsibleGroupVars:
|
AnsibleGroupVars:
|
||||||
type: OS::Heat::Value
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
@ -381,3 +391,4 @@ outputs:
|
|||||||
vars:
|
vars:
|
||||||
tripleo_firewall_rules: {get_attr: [FirewallRules, value]}
|
tripleo_firewall_rules: {get_attr: [FirewallRules, value]}
|
||||||
- {get_attr: [HostPrepTasks, value]}
|
- {get_attr: [HostPrepTasks, value]}
|
||||||
|
pre_deploy_step_tasks: {get_attr: [PreDeployStepTasks, value]}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds pre_deploy_step_tasks support which is run after kolla files are setup
|
||||||
|
and podman is configured, but before any deployment task or external deployment
|
||||||
|
task. The use case is being able to start containers before any deployment task.
|
Loading…
Reference in New Issue
Block a user