Merge "Add external deployment tasks executed on undercloud"
This commit is contained in:
commit
31488edbc4
@ -102,6 +102,19 @@ resources:
|
|||||||
params:
|
params:
|
||||||
_TASKS: {get_file: deploy-steps-tasks.yaml}
|
_TASKS: {get_file: deploy-steps-tasks.yaml}
|
||||||
|
|
||||||
|
ExternalDeployTasks:
|
||||||
|
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_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}}:
|
||||||
@ -360,10 +373,21 @@ outputs:
|
|||||||
- include: {{role.name}}/host_prep_tasks.yaml
|
- include: {{role.name}}/host_prep_tasks.yaml
|
||||||
when: role_name == '{{role.name}}'
|
when: role_name == '{{role.name}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{%- for step in range(1,deploy_steps_max) %}
|
||||||
|
- hosts: undercloud
|
||||||
|
name: Undercloud deployment step {{step}}
|
||||||
|
vars:
|
||||||
|
step: '{{step}}'
|
||||||
|
tasks:
|
||||||
|
- include: external_deploy_steps_tasks.yaml
|
||||||
|
- hosts: overcloud
|
||||||
|
name: Overcloud deployment step {{step}}
|
||||||
|
vars:
|
||||||
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
|
step: '{{step}}'
|
||||||
|
tasks:
|
||||||
- include: deploy_steps_tasks.yaml
|
- include: deploy_steps_tasks.yaml
|
||||||
with_sequence: count={{deploy_steps_max-1}}
|
{%- endfor %}
|
||||||
loop_control:
|
|
||||||
loop_var: step
|
|
||||||
- hosts: overcloud
|
- hosts: overcloud
|
||||||
name: Server Post Deployments
|
name: Server Post Deployments
|
||||||
tasks:
|
tasks:
|
||||||
@ -374,6 +398,7 @@ outputs:
|
|||||||
when: role_name == '{{role.name}}'
|
when: role_name == '{{role.name}}'
|
||||||
with_items: "{{ '{{' }} {{role.name}}_post_deployments|default([]) {{ '}}' }}"
|
with_items: "{{ '{{' }} {{role.name}}_post_deployments|default([]) {{ '}}' }}"
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
external_deploy_steps_tasks: {get_attr: [ExternalDeployTasks, 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
|
||||||
|
@ -183,6 +183,16 @@ resources:
|
|||||||
expression: coalesce($.data.role_data, []).where($ != null).select($.get('workflow_tasks')).where($ != null).reduce($1.mergeWith($2), {})
|
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]}}
|
data: {role_data: {get_attr: [ServiceChain, role_data]}}
|
||||||
|
|
||||||
|
ExternalDeployTasks:
|
||||||
|
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_deploy_tasks')).where($ != null).flatten().distinct()
|
||||||
|
data: {get_attr: [ServiceChain, role_data]}
|
||||||
|
|
||||||
UpgradeTasks:
|
UpgradeTasks:
|
||||||
type: OS::Heat::Value
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
@ -272,6 +282,7 @@ outputs:
|
|||||||
service_config_settings: {get_attr: [ServiceConfigSettings, value]}
|
service_config_settings: {get_attr: [ServiceConfigSettings, value]}
|
||||||
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]}
|
||||||
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]}
|
||||||
|
@ -48,7 +48,7 @@ OPTIONAL_DOCKER_SECTIONS = ['docker_puppet_tasks', 'upgrade_tasks',
|
|||||||
'service_config_settings', 'host_prep_tasks',
|
'service_config_settings', 'host_prep_tasks',
|
||||||
'metadata_settings', 'kolla_config',
|
'metadata_settings', 'kolla_config',
|
||||||
'global_config_settings', 'logging_source',
|
'global_config_settings', 'logging_source',
|
||||||
'logging_groups']
|
'logging_groups', 'external_deploy_tasks']
|
||||||
REQUIRED_DOCKER_PUPPET_CONFIG_SECTIONS = ['config_volume', 'step_config',
|
REQUIRED_DOCKER_PUPPET_CONFIG_SECTIONS = ['config_volume', 'step_config',
|
||||||
'config_image']
|
'config_image']
|
||||||
OPTIONAL_DOCKER_PUPPET_CONFIG_SECTIONS = [ 'puppet_tags', 'volumes' ]
|
OPTIONAL_DOCKER_PUPPET_CONFIG_SECTIONS = [ 'puppet_tags', 'volumes' ]
|
||||||
|
Loading…
Reference in New Issue
Block a user