Files
tripleo-ha-utils/roles/validate-ha/tasks/heat-validation.yml
Raoul Scarazzini 54bec14470 Use Heat template to verify tests
This commit introduces the usage of heat to verify each HA test made.
The test template involves:

- Orchestration (heat);
- Volumes (cinder);
- Images (glance);
- Network, public and private (neutron);
- Server (nova);

Summary of what this commit does:

- Get rid of the workarounds;
- Get rid of undercloud options and its ha-test-suite local copy (now
  useless);
- Get rid of the old environment file needed to spawn instances;
- Get rid of instance test from ha-test-suite;
- Add Heat template verification method;

Change-Id: I2dd9d67f494717654e39c60ac5fb067afb9e1835
2018-02-02 04:51:39 -05:00

47 lines
1.3 KiB
YAML

---
- name: Load image in Glance to be used by Heat
shell: |
source {{ working_dir }}/overcloudrc
openstack image create \
--disk-format {{ validate_ha_heat_instance_image_format }} \
--file {{ working_dir }}/{{ heat_image_name }} \
--format value \
--column "id" \
validate_ha_image
- name: Execute environment validation via Heat
shell: |
source {{ working_dir }}/overcloudrc
openstack stack create \
--environment validate-ha-heat-environment.yaml \
--template validate-ha-heat-template.yaml \
--wait \
{{ stack_name }}
- name: Get instance IP
shell: |
source {{ working_dir }}/overcloudrc
openstack stack show -c outputs -f json {{ stack_name }} | \
jq --raw-output '.outputs[] | select( .output_key == "server_public_ip") | .output_value'
register: instance_ip
- name: Wait up to one minute for the instance to be reachable
wait_for:
host: "{{ instance_ip.stdout }}"
port: 22
timeout: 60
- name: Clean the created stack
shell: |
source {{ working_dir }}/overcloudrc
openstack stack delete \
--yes \
--wait \
{{ stack_name }}
- name: Clean image in Glance
shell: |
source {{ working_dir }}/overcloudrc
openstack image delete validate_ha_image