split baremetal playbook
Separate quickstart baremetal playbook into smaller playbooks that follow the same breakpoints as the libvirt playbook in tripleo-quickstart-extras. This is part of the preparations to convert CI to follow the step by step workflow the users will follow to reproduce CI Change-Id: I6cc171641c8390e458eb474be3479e732eb2c985
This commit is contained in:
parent
51fc52197c
commit
70b2ebc6db
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
- name: copy over config files
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-config
|
||||
|
||||
- name: Perpare the baremetal overcloud
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- baremetal-prep-overcloud
|
||||
|
||||
- name: Prepare overcloud containers
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-prep-containers, when: containerized_overcloud|bool }
|
||||
|
||||
- name: Run tripleo-validations pre-introspection tests
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
validations_group: ['pre-introspection']
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
||||
- name: Prepare the overcloud images for deployment
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-images
|
||||
|
||||
- name: Prepare overcloud flavors
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-prep-flavors,
|
||||
when: step_overcloud_prep_flavors|default(true)|bool }
|
||||
|
||||
- name: Prepare the undercloud networks for the overcloud deployment
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-network
|
||||
|
||||
- name: Prepare the SSL Configuration for the overcloud deployment
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-ssl }
|
||||
|
||||
- name: Run tripleo-validations pre-deployment tests
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
validations_group: ['pre-deployment']
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
# Execute sanity checks agsinst the overcloud deployment
|
||||
- name: Sanity check the overcloud services
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-sanity-checks,
|
||||
when: run_sanity_checks|default(false)|bool }
|
||||
|
||||
# Validate the deployment
|
||||
- name: validate the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-simple, when: test_ping|bool }
|
||||
|
||||
# Execute tempest against the overcloud deployment
|
||||
- name: Execute tempest against the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-tempest, when: run_tempest|bool }
|
||||
|
||||
- name: Delete the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-delete
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-delete,
|
||||
when: step_delete_overcloud|default(false)|bool }
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
- name: Deploy the overcloud
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-deploy
|
||||
|
||||
# Add the overcloud nodes to the generated inventory.
|
||||
- name: Inventory the overcloud
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
tags:
|
||||
- overcloud-deploy
|
||||
vars:
|
||||
inventory: all
|
||||
roles:
|
||||
- tripleo-inventory
|
||||
|
||||
- name: Check the result of the deployment
|
||||
hosts: localhost
|
||||
tags:
|
||||
- overcloud-deploy
|
||||
tasks:
|
||||
- name: ensure the deployment result has been read into memory
|
||||
include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json"
|
||||
|
||||
# overcloud_deploy_result = ["failed", "passed"]
|
||||
- name: did the deployment pass or fail?
|
||||
debug: var=overcloud_deploy_result
|
||||
failed_when: overcloud_deploy_result == "failed"
|
||||
|
||||
- name: Run tripleo-validations post-deployment tests
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
validations_group: ['post-deployment']
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
- name: Validate IPMI and instackenv.json
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- { role: validate-ipmi,
|
||||
when: not use_testenv_broker|default(false)|bool }
|
||||
|
||||
- name: Deploy the undercloud
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- undercloud-deploy
|
||||
|
||||
- name: Configure tripleo-validations
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
run_tripleo_validations_setup: True
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
||||
- name: Validate the undercloud
|
||||
hosts: undercloud
|
||||
roles:
|
||||
- { role: validate-undercloud,
|
||||
when: run_validate_undercloud|default(false)|bool }
|
||||
|
||||
- name: Build images for quickstart
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: build-images, when: to_build|default(false)|bool }
|
||||
tags:
|
||||
- get-images
|
||||
- images
|
|
@ -1,184 +1,5 @@
|
|||
---
|
||||
- name: Validate IPMI and instackenv.json
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- { role: validate-ipmi,
|
||||
when: not use_testenv_broker|default(false)|bool }
|
||||
|
||||
- name: Deploy the undercloud
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- undercloud-deploy
|
||||
|
||||
- name: Configure tripleo-validations
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
run_tripleo_validations_setup: True
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
||||
|
||||
- name: Validate the undercloud
|
||||
hosts: undercloud
|
||||
roles:
|
||||
- { role: validate-undercloud,
|
||||
when: run_validate_undercloud|default(false)|bool }
|
||||
|
||||
- name: Build images for quickstart
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: build-images, when: to_build|default(false)|bool }
|
||||
tags:
|
||||
- get-images
|
||||
- images
|
||||
|
||||
- name: copy over config files
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-config
|
||||
|
||||
- name: Perpare the baremetal overcloud
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- baremetal-prep-overcloud
|
||||
|
||||
- name: Prepare overcloud containers
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-prep-containers, when: containerized_overcloud|bool }
|
||||
|
||||
- name: Run tripleo-validations pre-introspection tests
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
validations_group: ['pre-introspection']
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool }
|
||||
|
||||
- name: Prepare the overcloud images for deployment
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-images
|
||||
|
||||
- name: Prepare overcloud flavors
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-prep-flavors,
|
||||
when: step_overcloud_prep_flavors|default(true)|bool }
|
||||
|
||||
- name: Prepare the undercloud networks for the overcloud deployment
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-prep-network
|
||||
|
||||
- name: Prepare the SSL Configuration for the overcloud deployment
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-ssl }
|
||||
|
||||
- name: Run tripleo-validations pre-deployment tests
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
validations_group: ['pre-deployment']
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
||||
|
||||
- name: Deploy the overcloud
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- overcloud-deploy
|
||||
|
||||
# Add the overcloud nodes to the generated inventory.
|
||||
- name: Inventory the overcloud
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
tags:
|
||||
- overcloud-deploy
|
||||
vars:
|
||||
inventory: all
|
||||
roles:
|
||||
- tripleo-inventory
|
||||
|
||||
- name: Check the result of the deployment
|
||||
hosts: localhost
|
||||
tags:
|
||||
- overcloud-deploy
|
||||
tasks:
|
||||
- name: ensure the deployment result has been read into memory
|
||||
include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json"
|
||||
|
||||
# overcloud_deploy_result = ["failed", "passed"]
|
||||
- name: did the deployment pass or fail?
|
||||
debug: var=overcloud_deploy_result
|
||||
failed_when: overcloud_deploy_result == "failed"
|
||||
|
||||
- name: Run tripleo-validations post-deployment tests
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
tags:
|
||||
- tripleo-validations
|
||||
vars:
|
||||
validations_group: ['post-deployment']
|
||||
roles:
|
||||
- { role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
||||
# Execute sanity checks agsinst the overcloud deployment
|
||||
- name: Sanity check the overcloud services
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-sanity-checks,
|
||||
when: run_sanity_checks|default(false)|bool }
|
||||
|
||||
# Validate the deployment
|
||||
- name: validate the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-simple, when: test_ping|bool }
|
||||
|
||||
# Execute tempest against the overcloud deployment
|
||||
- name: Execute tempest against the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-tempest, when: run_tempest|bool }
|
||||
|
||||
- name: Delete the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-delete
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: overcloud-delete,
|
||||
when: step_delete_overcloud|default(false)|bool }
|
||||
- include: baremetal-full-undercloud.yml
|
||||
- include: baremetal-full-overcloud-prep.yml
|
||||
- include: baremetal-full-overcloud.yml
|
||||
- include: baremetal-full-overcloud-validate.yml
|
||||
|
|
Loading…
Reference in New Issue