From f79d80c9f65778520150e01cf1c71f7fcb197311 Mon Sep 17 00:00:00 2001 From: Ronelle Landy Date: Wed, 24 Jan 2018 16:38:17 -0500 Subject: [PATCH] Integrate Validate-HA work into OVB jobs - Split baremetal-undercloud playbook - Integrate the pieces into baremetal-full-deploy - Add feature set file to a separate tq review - Use ovb-common settings for downstream tests - Add missing tags for consistent usage Depends-On: I860f257d7b8fcaf7b935575eab22d211f4da39b5 Change-Id: I7743927f71b5f8a7f616ccd11910e9a91bb726fb --- playbooks/baremetal-full-deploy.yml | 6 + playbooks/baremetal-full-overcloud-prep.yml | 26 +++- playbooks/baremetal-full-overcloud.yml | 2 + playbooks/baremetal-full-undercloud.yml | 4 + playbooks/baremetal-undercloud.yml | 156 -------------------- 5 files changed, 32 insertions(+), 162 deletions(-) diff --git a/playbooks/baremetal-full-deploy.yml b/playbooks/baremetal-full-deploy.yml index 5195cb475..233f6de7f 100644 --- a/playbooks/baremetal-full-deploy.yml +++ b/playbooks/baremetal-full-deploy.yml @@ -5,4 +5,10 @@ - include: ovb-setup.yml when: undercloud_type == 'ovb' +- include: baremetal-undercloud.yml + when: undercloud_type == 'baremetal' and environment_type is defined + - include: baremetal-quickstart-extras.yml + +- include: overcloud-validate-ha.yml + when: validate_ha_overcloud is defined and validate_ha_overcloud|bool diff --git a/playbooks/baremetal-full-overcloud-prep.yml b/playbooks/baremetal-full-overcloud-prep.yml index adc25f8d2..76034e3e0 100644 --- a/playbooks/baremetal-full-overcloud-prep.yml +++ b/playbooks/baremetal-full-overcloud-prep.yml @@ -1,21 +1,35 @@ --- +- name: Prepare the undercloud networks for the overcloud deployment + hosts: undercloud + gather_facts: no + roles: + - overcloud-prep-network + tags: + - overcloud-prep-network + - name: copy over config files hosts: undercloud gather_facts: no roles: - overcloud-prep-config + tags: + - overcloud-prep-config - name: Perpare the baremetal overcloud hosts: undercloud gather_facts: yes roles: - baremetal-prep-overcloud + tags: + - baremetal-prep-overcloud - name: Prepare overcloud containers hosts: undercloud gather_facts: no roles: - { role: overcloud-prep-containers, when: containerized_overcloud|bool } + tags: + - overcloud-prep-containers - name: Run tripleo-validations pre-introspection tests hosts: undercloud @@ -33,6 +47,8 @@ gather_facts: no roles: - overcloud-prep-images + tags: + - overcloud-prep-images - name: Prepare overcloud flavors hosts: undercloud @@ -40,18 +56,16 @@ 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 + tags: + - overcloud-prep-flavors - name: Prepare the SSL Configuration for the overcloud deployment hosts: undercloud gather_facts: no roles: - { role: overcloud-ssl } + tags: + - overcloud-ssl - name: Run tripleo-validations pre-deployment tests hosts: undercloud diff --git a/playbooks/baremetal-full-overcloud.yml b/playbooks/baremetal-full-overcloud.yml index fbebeed6d..f3598e5e1 100644 --- a/playbooks/baremetal-full-overcloud.yml +++ b/playbooks/baremetal-full-overcloud.yml @@ -4,6 +4,8 @@ gather_facts: no roles: - overcloud-deploy + tags: + - overcloud-deploy # Add the overcloud nodes to the generated inventory. - name: Inventory the overcloud diff --git a/playbooks/baremetal-full-undercloud.yml b/playbooks/baremetal-full-undercloud.yml index a8ebf734d..ae5ef4d10 100644 --- a/playbooks/baremetal-full-undercloud.yml +++ b/playbooks/baremetal-full-undercloud.yml @@ -4,6 +4,8 @@ gather_facts: no roles: - undercloud-deploy + tags: + - undercloud-deploy - name: Configure tripleo-validations hosts: undercloud @@ -21,6 +23,8 @@ roles: - { role: validate-undercloud, when: run_validate_undercloud|default(false)|bool } + tags: + - validate-undercloud - name: Build images for quickstart hosts: undercloud diff --git a/playbooks/baremetal-undercloud.yml b/playbooks/baremetal-undercloud.yml index 5dc936169..0ad7b2d69 100644 --- a/playbooks/baremetal-undercloud.yml +++ b/playbooks/baremetal-undercloud.yml @@ -29,159 +29,3 @@ - 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: Prepare overcloud containers - hosts: undercloud - gather_facts: no - roles: - - overcloud-prep-containers - tags: - - overcloud-prep-containers - -- 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: Prepare SSL for the overcloud - hosts: undercloud - gather_facts: no - roles: - - overcloud-ssl - tags: - - 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: 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 -