Merge "Parameterized deployment hosts"
This commit is contained in:
commit
1c9b288079
|
@ -45,6 +45,14 @@ parameters:
|
||||||
description: >
|
description: >
|
||||||
Setting this to a unique value will re-run any deployment tasks which
|
Setting this to a unique value will re-run any deployment tasks which
|
||||||
perform configuration on a Heat stack-update.
|
perform configuration on a Heat stack-update.
|
||||||
|
deployment_source_hosts:
|
||||||
|
default: 'undercloud'
|
||||||
|
type: string
|
||||||
|
description: Host or hostgroup that runs the deployment
|
||||||
|
deployment_target_hosts:
|
||||||
|
default: 'overcloud'
|
||||||
|
type: string
|
||||||
|
description: Host or hostgroup that consists of the target systems for the deployment
|
||||||
EndpointMap:
|
EndpointMap:
|
||||||
default: {}
|
default: {}
|
||||||
description: Mapping of service endpoint -> protocol. Typically set
|
description: Mapping of service endpoint -> protocol. Typically set
|
||||||
|
@ -382,16 +390,18 @@ outputs:
|
||||||
str_replace:
|
str_replace:
|
||||||
params:
|
params:
|
||||||
BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]}
|
BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]}
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
template: |
|
template: |
|
||||||
- hosts: undercloud
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: Gather facts undercloud
|
name: Gather facts from undercloud
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
become: false
|
become: false
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
- hosts: overcloud
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Gather facts overcloud
|
name: Gather facts from overcloud
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
@ -404,7 +414,7 @@ outputs:
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- hosts: overcloud
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Common roles for TripleO servers
|
name: Common roles for TripleO servers
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -414,7 +424,7 @@ outputs:
|
||||||
tags:
|
tags:
|
||||||
- common_roles
|
- common_roles
|
||||||
|
|
||||||
- hosts: {{primary_role_name}}:overcloud
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Overcloud deploy step tasks for step 0
|
name: Overcloud deploy step tasks for step 0
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -429,7 +439,7 @@ outputs:
|
||||||
tags:
|
tags:
|
||||||
- overcloud
|
- overcloud
|
||||||
- deploy_steps
|
- deploy_steps
|
||||||
- hosts: {{primary_role_name}}:overcloud
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Server deployments
|
name: Server deployments
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -445,7 +455,7 @@ outputs:
|
||||||
- overcloud
|
- overcloud
|
||||||
- pre_deploy_steps
|
- pre_deploy_steps
|
||||||
|
|
||||||
- hosts: {{primary_role_name}}:overcloud
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Host prep steps
|
name: Host prep steps
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -463,7 +473,7 @@ outputs:
|
||||||
|
|
||||||
{%- for step in range(1,deploy_steps_max) %}
|
{%- for step in range(1,deploy_steps_max) %}
|
||||||
|
|
||||||
- hosts: undercloud
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External deployment step {{step}}
|
name: External deployment step {{step}}
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -476,7 +486,7 @@ outputs:
|
||||||
- external
|
- external
|
||||||
- external_deploy_steps
|
- external_deploy_steps
|
||||||
|
|
||||||
- hosts: {{primary_role_name}}:overcloud
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Overcloud deploy step tasks for {{step}}
|
name: Overcloud deploy step tasks for {{step}}
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -495,7 +505,7 @@ outputs:
|
||||||
- overcloud
|
- overcloud
|
||||||
- deploy_steps
|
- deploy_steps
|
||||||
|
|
||||||
- hosts: {{primary_role_name}}:overcloud
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Overcloud common deploy step tasks {{step}}
|
name: Overcloud common deploy step tasks {{step}}
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -509,7 +519,7 @@ outputs:
|
||||||
- deploy_steps
|
- deploy_steps
|
||||||
|
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
- hosts: {{primary_role_name}}:overcloud
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Server Post Deployments
|
name: Server Post Deployments
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -525,7 +535,7 @@ outputs:
|
||||||
- overcloud
|
- overcloud
|
||||||
- post_deploy_steps
|
- post_deploy_steps
|
||||||
|
|
||||||
- hosts: undercloud
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External deployment Post Deploy tasks
|
name: External deployment Post Deploy tasks
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
|
@ -543,20 +553,25 @@ outputs:
|
||||||
- include: {{role.name}}/update_tasks.yaml
|
- include: {{role.name}}/update_tasks.yaml
|
||||||
when: tripleo_role_name == '{{role.name}}'
|
when: tripleo_role_name == '{{role.name}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
update_steps_playbook: |
|
update_steps_playbook:
|
||||||
- hosts: undercloud
|
str_replace:
|
||||||
name: Gather facts undercloud
|
params:
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
|
template: |
|
||||||
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
|
name: Gather facts from undercloud
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
become: false
|
become: false
|
||||||
- hosts: overcloud
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Gather facts overcloud
|
name: Gather facts from overcloud
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
- hosts: overcloud
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Run update
|
name: Run update
|
||||||
serial: 1
|
serial: 1
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
@ -574,20 +589,25 @@ outputs:
|
||||||
- include: {{role.name}}/pre_upgrade_rolling_tasks.yaml
|
- include: {{role.name}}/pre_upgrade_rolling_tasks.yaml
|
||||||
when: tripleo_role_name == '{{role.name}}'
|
when: tripleo_role_name == '{{role.name}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
pre_upgrade_rolling_steps_playbook: |
|
pre_upgrade_rolling_steps_playbook:
|
||||||
- hosts: undercloud
|
str_replace:
|
||||||
name: Gather facts undercloud
|
params:
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
|
template: |
|
||||||
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
|
name: Gather facts from undercloud
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
become: false
|
become: false
|
||||||
- hosts: overcloud
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Gather facts overcloud
|
name: Gather facts from overcloud
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
- hosts: overcloud
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Run pre-upgrade rolling tasks
|
name: Run pre-upgrade rolling tasks
|
||||||
serial: 1
|
serial: 1
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
@ -601,8 +621,13 @@ outputs:
|
||||||
- include: {{role.name}}/upgrade_tasks.yaml
|
- include: {{role.name}}/upgrade_tasks.yaml
|
||||||
when: tripleo_role_name == '{{role.name}}'
|
when: tripleo_role_name == '{{role.name}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
upgrade_steps_playbook: |
|
upgrade_steps_playbook:
|
||||||
- hosts: overcloud
|
str_replace:
|
||||||
|
params:
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
|
template: |
|
||||||
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
tasks:
|
tasks:
|
||||||
- include: upgrade_steps_tasks.yaml
|
- include: upgrade_steps_tasks.yaml
|
||||||
with_sequence: start=0 end={{upgrade_steps_max-1}}
|
with_sequence: start=0 end={{upgrade_steps_max-1}}
|
||||||
|
@ -613,15 +638,25 @@ outputs:
|
||||||
- include: {{role.name}}/post_upgrade_tasks.yaml
|
- include: {{role.name}}/post_upgrade_tasks.yaml
|
||||||
when: tripleo_role_name == '{{role.name}}'
|
when: tripleo_role_name == '{{role.name}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
post_upgrade_steps_playbook: |
|
post_upgrade_steps_playbook:
|
||||||
- hosts: overcloud
|
str_replace:
|
||||||
|
params:
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
|
template: |
|
||||||
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
tasks:
|
tasks:
|
||||||
- include: post_upgrade_steps_tasks.yaml
|
- include: post_upgrade_steps_tasks.yaml
|
||||||
with_sequence: start=0 end={{post_upgrade_steps_max-1}}
|
with_sequence: start=0 end={{post_upgrade_steps_max-1}}
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: step
|
loop_var: step
|
||||||
fast_forward_upgrade_playbook:
|
fast_forward_upgrade_playbook:
|
||||||
- hosts: overcloud
|
str_replace:
|
||||||
|
params:
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
|
template: |
|
||||||
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
|
@ -707,8 +742,13 @@ outputs:
|
||||||
- include: {{role.name}}/post_update_tasks.yaml
|
- include: {{role.name}}/post_update_tasks.yaml
|
||||||
when: tripleo_role_name == '{{role.name}}'
|
when: tripleo_role_name == '{{role.name}}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
post_update_steps_playbook: |
|
post_update_steps_playbook:
|
||||||
- hosts: overcloud
|
str_replace:
|
||||||
|
params:
|
||||||
|
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
|
||||||
|
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
|
||||||
|
template: |
|
||||||
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
tasks:
|
tasks:
|
||||||
- include: post_update_steps_tasks.yaml
|
- include: post_update_steps_tasks.yaml
|
||||||
with_sequence: start=0 end={{post_update_steps_max-1}}
|
with_sequence: start=0 end={{post_update_steps_max-1}}
|
||||||
|
|
Loading…
Reference in New Issue