fc5bf6e315
This patch allows us to run tripleo-validations tests through the Mistral framework for newton release and above. It also allows us to run negative tests for pre-introspections validations like: - undercloud-ram - undercloud-cpu - undercloud-disk-space The pre-deployment and post-deployment should be done and will be done through different patches. Change-Id: Iec07a18322252af2d484bc3f06a59dbd1b08f537 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
172 lines
3.8 KiB
YAML
172 lines
3.8 KiB
YAML
---
|
|
- name: Baremetal undercloud install
|
|
hosts: localhost
|
|
roles:
|
|
- baremetal-undercloud
|
|
tags:
|
|
- baremetal-undercloud
|
|
|
|
- name: Add the undercloud node to the generated inventory
|
|
hosts: localhost
|
|
gather_facts: yes
|
|
roles:
|
|
- tripleo-inventory
|
|
tags:
|
|
- undercloud-inventory
|
|
|
|
- name: Setup repositories
|
|
hosts: undercloud
|
|
gather_facts: yes
|
|
roles:
|
|
- repo-setup
|
|
tags:
|
|
- undercloud-repo-setup
|
|
|
|
- name: Install packages
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- baremetal-undercloud/packages
|
|
tags:
|
|
- undercloud-pkgs-install
|
|
|
|
- name: Deploy the undercloud
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- undercloud-deploy
|
|
tags:
|
|
- 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: Prepare baremetal for the overcloud deployment
|
|
hosts: undercloud
|
|
roles:
|
|
- baremetal-prep-overcloud
|
|
tags:
|
|
- baremetal-prep-overcloud
|
|
|
|
- name: Prepare configuration files for the overcloud deployment
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-config
|
|
tags:
|
|
- overcloud-prep-config
|
|
|
|
- name: Fetch the overcloud images
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
become: true
|
|
roles:
|
|
- fetch-images
|
|
tags:
|
|
- overcloud-fetch-images
|
|
|
|
- name: Prepare the overcloud images for deployment
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-images
|
|
tags:
|
|
- overcloud-prep-images
|
|
|
|
- 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 overcloud flavors
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-flavors
|
|
tags:
|
|
- overcloud-prep-flavors
|
|
|
|
- name: Prepare the undercloud networks for the overcloud deployment
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- overcloud-prep-network
|
|
tags:
|
|
- overcloud-prep-network
|
|
|
|
- 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: yes
|
|
roles:
|
|
- overcloud-deploy
|
|
tags:
|
|
- overcloud-deploy
|
|
|
|
- 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}
|
|
|
|
- name: Add the overcloud nodes to the generated inventory
|
|
hosts: undercloud
|
|
gather_facts: yes
|
|
vars:
|
|
inventory: all
|
|
roles:
|
|
- tripleo-inventory
|
|
tags:
|
|
- overcloud-inventory
|
|
|
|
- name: Check the result of the deployment
|
|
hosts: localhost
|
|
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"
|
|
tags:
|
|
- overcloud-deploy-check
|
|
|
|
- name: Validate the overcloud
|
|
hosts: undercloud
|
|
gather_facts: no
|
|
roles:
|
|
- { role: validate-simple, when: test_ping|bool }
|
|
tags:
|
|
- overcloud-validate
|
|
|