Breakdown the deploy-steps playbook
This change breaks the deploy-steps monster playbook into isolated playbook
files allowing us to use the deploy-steps entrypoint as a playbook router.
With this change we'll be able to further optimise our playbook processes
in isolation and begin exploring different methods of deployment for parts
of our stack. Additionally this change will make it possible for advanced
users to run playbooks as needed, without having to run everything from
top to bottom.
Change-Id: I34bb41e63ccc65ae47999758ab7ce8a6120ef0a4
Signed-off-by: Kevin Carter <kecarter@redhat.com>
(cherry picked from commit 859f313034
)
This commit is contained in:
parent
acecb87e96
commit
a9122e3ee4
|
@ -425,7 +425,7 @@ outputs:
|
|||
container_puppet_script: {get_file: ./container-puppet.sh}
|
||||
generate-config-tasks: {get_file: generate-config-tasks.yaml}
|
||||
host-container-puppet-tasks: {get_file: host-container-puppet-tasks.yaml}
|
||||
deploy_steps_playbook:
|
||||
deploy_steps_0_playbook:
|
||||
{% block deploy_steps_str_replace_params %}
|
||||
str_replace:
|
||||
params:
|
||||
|
@ -477,7 +477,9 @@ outputs:
|
|||
vars:
|
||||
deploy_source_host: "DEPLOY_SOURCE_HOST"
|
||||
deploy_target_host: "DEPLOY_TARGET_HOST"
|
||||
|
||||
deploy_steps_selinux_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_linear
|
||||
name: Manage SELinux
|
||||
|
@ -505,7 +507,9 @@ outputs:
|
|||
tripleo_hosts_entries_extra_hosts_entries: "{{ extra_hosts_entries }}"
|
||||
tripleo_hosts_entries_vip_hosts_entries: "{{ vip_hosts_entries }}"
|
||||
{% endraw %}
|
||||
|
||||
deploy_steps_common_roles_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_linear
|
||||
name: Common roles for TripleO servers
|
||||
|
@ -526,7 +530,9 @@ outputs:
|
|||
name: tripleo_ssh_known_hosts
|
||||
tags:
|
||||
- common_roles
|
||||
|
||||
deploy_steps_0_tasks_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Deploy step tasks for step 0
|
||||
|
@ -551,7 +557,9 @@ outputs:
|
|||
- overcloud
|
||||
- deploy_steps
|
||||
- step0
|
||||
|
||||
deploy_steps_pre_network_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Server pre network steps
|
||||
|
@ -575,7 +583,9 @@ outputs:
|
|||
tags:
|
||||
- overcloud
|
||||
- pre_deploy_steps
|
||||
|
||||
deploy_steps_network_deployments_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Server network deployments
|
||||
|
@ -612,7 +622,9 @@ outputs:
|
|||
- pre_deploy_steps
|
||||
- network_deploy_steps
|
||||
{% endraw %}
|
||||
|
||||
deploy_steps_network_validation_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Server network validation
|
||||
|
@ -634,7 +646,9 @@ outputs:
|
|||
- pre_deploy_steps
|
||||
- network_deploy_steps
|
||||
{% endraw %}
|
||||
|
||||
deploy_steps_pre_deployment_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Server pre deployment steps
|
||||
|
@ -656,7 +670,9 @@ outputs:
|
|||
tags:
|
||||
- overcloud
|
||||
- pre_deploy_steps
|
||||
|
||||
deploy_steps_host_prep_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Host prep steps
|
||||
|
@ -698,7 +714,9 @@ outputs:
|
|||
tags:
|
||||
- overcloud
|
||||
- host_prep_steps
|
||||
|
||||
deploy_steps_container_setup_tasks_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Overcloud container setup tasks
|
||||
|
@ -731,7 +749,9 @@ outputs:
|
|||
tags:
|
||||
- overcloud
|
||||
- container_setup_tasks
|
||||
|
||||
deploy_steps_pre_deployment_tasks_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Pre Deployment Step Tasks
|
||||
|
@ -765,9 +785,10 @@ outputs:
|
|||
tags:
|
||||
- overcloud
|
||||
- pre_deploy_steps_tasks
|
||||
|
||||
deploy_steps_external_deployment_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
{%- for step in range(1,deploy_steps_max) %}
|
||||
|
||||
- hosts: DEPLOY_SOURCE_HOST
|
||||
strategy: tripleo_free
|
||||
name: External deployment step {{step}}
|
||||
|
@ -866,6 +887,10 @@ outputs:
|
|||
- step{{step}}
|
||||
|
||||
{%- endfor %}
|
||||
deploy_steps_post_deployment_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
strategy: tripleo_free
|
||||
name: Server Post Deployments
|
||||
|
@ -887,7 +912,9 @@ outputs:
|
|||
- overcloud
|
||||
- post_deploy_steps
|
||||
{% endraw %}
|
||||
|
||||
deploy_steps_post_deploy_tasks_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- hosts: DEPLOY_SOURCE_HOST
|
||||
strategy: tripleo_linear
|
||||
name: External deployment Post Deploy tasks
|
||||
|
@ -916,7 +943,23 @@ outputs:
|
|||
- external
|
||||
- external_deploy_steps
|
||||
- external_post_deploy_steps
|
||||
|
||||
deploy_steps_playbook:
|
||||
{{ self.deploy_steps_str_replace_params() }}
|
||||
template: |
|
||||
- import_playbook: deploy_steps_0_playbook.yaml
|
||||
- import_playbook: deploy_steps_selinux_playbook.yaml
|
||||
- import_playbook: deploy_steps_common_roles_playbook.yaml
|
||||
- import_playbook: deploy_steps_0_tasks_playbook.yaml
|
||||
- import_playbook: deploy_steps_pre_network_playbook.yaml
|
||||
- import_playbook: deploy_steps_network_deployments_playbook.yaml
|
||||
- import_playbook: deploy_steps_network_validation_playbook.yaml
|
||||
- import_playbook: deploy_steps_pre_deployment_playbook.yaml
|
||||
- import_playbook: deploy_steps_host_prep_playbook.yaml
|
||||
- import_playbook: deploy_steps_container_setup_tasks_playbook.yaml
|
||||
- import_playbook: deploy_steps_pre_deployment_tasks_playbook.yaml
|
||||
- import_playbook: deploy_steps_external_deployment_playbook.yaml
|
||||
- import_playbook: deploy_steps_post_deployment_playbook.yaml
|
||||
- import_playbook: deploy_steps_post_deploy_tasks_playbook.yaml
|
||||
external_deploy_steps_tasks: {get_attr: [ExternalDeployTasks, value]}
|
||||
external_post_deploy_steps_tasks: {get_attr: [ExternalPostDeployTasks, value]}
|
||||
pre_deploy_step_tasks: {get_attr: [PreDeployStepTasks, value]}
|
||||
|
|
Loading…
Reference in New Issue