Merge "New validation: ensure image-serve service is working as expected"

This commit is contained in:
Zuul 2019-05-04 00:23:23 +00:00 committed by Gerrit Code Review
commit 6d61d8d4dd
5 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,13 @@
---
- hosts: undercloud
vars:
metadata:
name: Verify image-serve service is working and answering
description: >
Ensures image-serve vhost is configured and httpd is running.
groups:
- pre-upgrade
- post-deployment
- post-upgrade
roles:
- image-serve

View File

@ -0,0 +1,3 @@
---
container_registry_host: 127.0.0.1
container_registry_port: 8787

View File

@ -0,0 +1,28 @@
galaxy_info:
author: TripleO Validations Team
company: Red Hat
license: Apache
min_ansible_version: 2.4
platforms:
- name: CentOS
versions:
- 7
- name: RHEL
versions:
- 7
categories:
- cloud
- baremetal
- system
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []

View File

@ -0,0 +1,22 @@
---
- name: get httpd status
systemd:
name: httpd
register: httpd_state
- name: ensure httpd is running
assert:
that: httpd_state.status['SubState'] == 'running'
fail_msg: httpd service is not running
success_msg: httpd service is running as expected
- name: ensure registry does answer
uri:
method: HEAD
url: "http://{{ container_registry_host }}:{{ container_registry_port }}/v2/"
status_code:
- 200
- 204
- 301
- 302

View File

@ -0,0 +1,7 @@
metadata:
name: Image-serve availability
description: Verify that image-serve service is ready
groups:
- pre-upgrade
- post-deployment
- post-upgrade