Run healthcheck-openstack from utility host
Instead of running healtcheck-openstack from localhost, we launch it from utility host now which has required env and credentials to access cloud. Change-Id: If0c11958bbe3ab64f4f535c7e795f3e035f52a60
This commit is contained in:
parent
5f8ac6b975
commit
70c48b47b2
@ -21,38 +21,36 @@
|
|||||||
# Test os-keystone-install.yml
|
# Test os-keystone-install.yml
|
||||||
# Many parts of keystone testing is happening in playbooks already, as
|
# Many parts of keystone testing is happening in playbooks already, as
|
||||||
# we are using it for setting up all the other openstack services.
|
# we are using it for setting up all the other openstack services.
|
||||||
- name: Test Keystone
|
- name: Test OpenStack basic functionality
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
hosts: localhost
|
hosts: utility_all[0]
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: "{{ utility_venv_bin }}/python"
|
||||||
vars_files:
|
vars_files:
|
||||||
- defaults/healthchecks-vars.yml
|
- defaults/healthchecks-vars.yml
|
||||||
tasks:
|
tasks:
|
||||||
- name: Authenticate to the cloud and retrieve the service catalog
|
- name: Test keystone
|
||||||
openstack.cloud.auth:
|
block:
|
||||||
cloud: default
|
- name: Authenticate to the cloud and retrieve the service catalog
|
||||||
interface: internal
|
openstack.cloud.catalog_service_info:
|
||||||
verify: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}"
|
cloud: default
|
||||||
|
interface: "{{ item }}"
|
||||||
|
verify: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}"
|
||||||
|
with_items:
|
||||||
|
- internal
|
||||||
|
- public
|
||||||
|
register: service_catalog
|
||||||
|
|
||||||
- name: Show service catalog
|
- name: Show service catalog
|
||||||
debug:
|
debug:
|
||||||
var: service_catalog
|
var: service_catalog.results
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-keystone-install
|
- healthchecks-keystone-install
|
||||||
|
|
||||||
|
|
||||||
# Test os-barbican-install.yml
|
- name: Test Glance
|
||||||
# TO BE IMPLEMENTED -- there is no ansible module for that so cli might be needed.
|
block:
|
||||||
|
|
||||||
# Test os-glance-install.yml
|
|
||||||
# If tempest is installed, this is tested anyway and can be skipped.
|
|
||||||
- name: Test Glance
|
|
||||||
gather_facts: no
|
|
||||||
hosts: localhost
|
|
||||||
vars_files:
|
|
||||||
- defaults/healthchecks-vars.yml
|
|
||||||
tasks:
|
|
||||||
- block:
|
|
||||||
- name: Image(s) download
|
- name: Image(s) download
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ item.url }}"
|
url: "{{ item.url }}"
|
||||||
@ -82,18 +80,13 @@
|
|||||||
when:
|
when:
|
||||||
# No point of doing glance tests is glance isn't deployed.
|
# No point of doing glance tests is glance isn't deployed.
|
||||||
- "groups['glance_all'] | length > 0"
|
- "groups['glance_all'] | length > 0"
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-glance-install
|
- healthchecks-glance-install
|
||||||
|
|
||||||
# Test os-cinder-install.yml
|
|
||||||
- name: Test cinder
|
- name: Test cinder
|
||||||
gather_facts: no
|
block:
|
||||||
hosts: localhost
|
|
||||||
vars_files:
|
|
||||||
- defaults/healthchecks-vars.yml
|
|
||||||
tasks:
|
|
||||||
- block:
|
|
||||||
# This automatically waits for completion by default.
|
# This automatically waits for completion by default.
|
||||||
# There is no module to check the current state of a creation, so we need to run
|
# There is no module to check the current state of a creation, so we need to run
|
||||||
# This synchronously
|
# This synchronously
|
||||||
@ -111,21 +104,13 @@
|
|||||||
with_items: "{{ cinder_volumes }}"
|
with_items: "{{ cinder_volumes }}"
|
||||||
when:
|
when:
|
||||||
- groups['cinder_all'] | length > 0
|
- groups['cinder_all'] | length > 0
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-cinder-install
|
- healthchecks-cinder-install
|
||||||
|
|
||||||
# NOTE(evrardjp): This doesn't respect playbook order, as we'll need neutron tests to
|
|
||||||
# run before nova tests
|
|
||||||
|
|
||||||
# Test os-neutron-install.yml
|
- name: Test neutron
|
||||||
- name: Test neutron
|
block:
|
||||||
gather_facts: no
|
|
||||||
hosts: localhost
|
|
||||||
vars_files:
|
|
||||||
- defaults/healthchecks-vars.yml
|
|
||||||
tasks:
|
|
||||||
- block:
|
|
||||||
- name: Create networks
|
- name: Create networks
|
||||||
openstack.cloud.network:
|
openstack.cloud.network:
|
||||||
cloud: default
|
cloud: default
|
||||||
@ -190,19 +175,13 @@
|
|||||||
with_items: "{{ neutron_networks['private']['subnets'] }}"
|
with_items: "{{ neutron_networks['private']['subnets'] }}"
|
||||||
when:
|
when:
|
||||||
- "groups['neutron_all'] | length > 0"
|
- "groups['neutron_all'] | length > 0"
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-neutron-install
|
- healthchecks-neutron-install
|
||||||
|
|
||||||
|
# Test os-heat-install.yml
|
||||||
# Test os-heat-install.yml
|
- name: Test heat
|
||||||
- name: Test heat
|
block:
|
||||||
gather_facts: no
|
|
||||||
hosts: localhost
|
|
||||||
vars_files:
|
|
||||||
- defaults/healthchecks-vars.yml
|
|
||||||
tasks:
|
|
||||||
- block:
|
|
||||||
- name: Fetch minimum heat stack
|
- name: Fetch minimum heat stack
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ heat_stack['source_url'] }}"
|
url: "{{ heat_stack['source_url'] }}"
|
||||||
@ -222,18 +201,14 @@
|
|||||||
parameters: "{{ heat_stack['parameters'] }}"
|
parameters: "{{ heat_stack['parameters'] }}"
|
||||||
when:
|
when:
|
||||||
- "groups['heat_all'] | length > 0"
|
- "groups['heat_all'] | length > 0"
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-heat-install
|
- healthchecks-heat-install
|
||||||
|
|
||||||
# Test os-nova-install.yml
|
|
||||||
- name: Test nova
|
# Test os-nova-install.yml
|
||||||
gather_facts: no
|
- name: Test nova
|
||||||
hosts: localhost
|
block:
|
||||||
vars_files:
|
|
||||||
- defaults/healthchecks-vars.yml
|
|
||||||
tasks:
|
|
||||||
- block:
|
|
||||||
- name: Create keypair for nova
|
- name: Create keypair for nova
|
||||||
command: "ssh-keygen -b 2048 -t rsa -f {{ ssh_key }} -q -N ''" # noqa no-changed-when
|
command: "ssh-keygen -b 2048 -t rsa -f {{ ssh_key }} -q -N ''" # noqa no-changed-when
|
||||||
args:
|
args:
|
||||||
@ -297,7 +272,7 @@
|
|||||||
floating_ip_pools: "{{ neutron_networks['public']['name'] }}"
|
floating_ip_pools: "{{ neutron_networks['public']['name'] }}"
|
||||||
key_name: "healthcheck"
|
key_name: "healthcheck"
|
||||||
# Ensure user_data is well passed.
|
# Ensure user_data is well passed.
|
||||||
user_data: |
|
userdata: |
|
||||||
cp /etc/fstab /root/fstab
|
cp /etc/fstab /root/fstab
|
||||||
security_groups:
|
security_groups:
|
||||||
- default
|
- default
|
||||||
@ -336,24 +311,13 @@
|
|||||||
when:
|
when:
|
||||||
- "groups['nova_all'] | length > 0"
|
- "groups['nova_all'] | length > 0"
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-nova-install
|
- healthchecks-nova-install
|
||||||
|
|
||||||
# Test os-horizon-install.yml
|
# Test os-swift-install.yml
|
||||||
# TO BE IMPLEMENTED
|
- name: Test swift
|
||||||
|
block:
|
||||||
# Test os-designate-install.yml
|
|
||||||
# TO BE IMPLEMENTED with os_recordset
|
|
||||||
|
|
||||||
# Test os-swift-install.yml
|
|
||||||
- name: Test swift
|
|
||||||
gather_facts: no
|
|
||||||
hosts: localhost
|
|
||||||
vars_files:
|
|
||||||
- defaults/healthchecks-vars.yml
|
|
||||||
tasks:
|
|
||||||
- block:
|
|
||||||
- name: Store data in swift
|
- name: Store data in swift
|
||||||
openstack.cloud.object:
|
openstack.cloud.object:
|
||||||
cloud: default
|
cloud: default
|
||||||
@ -365,9 +329,18 @@
|
|||||||
filename: "{{ swift_object['filename'] }}"
|
filename: "{{ swift_object['filename'] }}"
|
||||||
when:
|
when:
|
||||||
- "groups['swift_all'] | length > 0"
|
- "groups['swift_all'] | length > 0"
|
||||||
tags:
|
tags:
|
||||||
- healthchecks
|
- healthchecks
|
||||||
- healthchecks-swift-install
|
- healthchecks-swift-install
|
||||||
|
|
||||||
|
# Test os-barbican-install.yml
|
||||||
|
# TO BE IMPLEMENTED -- there is no ansible module for that so cli might be needed.
|
||||||
|
|
||||||
|
# Test os-horizon-install.yml
|
||||||
|
# TO BE IMPLEMENTED
|
||||||
|
|
||||||
|
# Test os-designate-install.yml
|
||||||
|
# TO BE IMPLEMENTED with os_recordset
|
||||||
|
|
||||||
# Test os-gnocchi-install.yml
|
# Test os-gnocchi-install.yml
|
||||||
# TO BE IMPLEMENTED
|
# TO BE IMPLEMENTED
|
||||||
@ -390,9 +363,6 @@
|
|||||||
# Test os-sahara-install.yml
|
# Test os-sahara-install.yml
|
||||||
# TO BE IMPLEMENTED
|
# TO BE IMPLEMENTED
|
||||||
|
|
||||||
# Test os-molteniron-install.yml
|
|
||||||
# TO BE IMPLEMENTED
|
|
||||||
|
|
||||||
# Test os-octavia-install.yml
|
# Test os-octavia-install.yml
|
||||||
# TO BE IMPLEMENTED
|
# TO BE IMPLEMENTED
|
||||||
|
|
||||||
@ -405,7 +375,9 @@
|
|||||||
# Teardown
|
# Teardown
|
||||||
- name: Teardown
|
- name: Teardown
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
hosts: localhost
|
hosts: utility_all[0]
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: "{{ utility_venv_bin }}/python"
|
||||||
vars_files:
|
vars_files:
|
||||||
- defaults/healthchecks-vars.yml
|
- defaults/healthchecks-vars.yml
|
||||||
tasks:
|
tasks:
|
||||||
|
Loading…
Reference in New Issue
Block a user