Merge "New validation: ensure image-serve service is working as expected"
This commit is contained in:
commit
6d61d8d4dd
13
playbooks/image-serve.yaml
Normal file
13
playbooks/image-serve.yaml
Normal 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
|
3
roles/image-serve/defaults/main.yaml
Normal file
3
roles/image-serve/defaults/main.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
container_registry_host: 127.0.0.1
|
||||
container_registry_port: 8787
|
28
roles/image-serve/meta/main.yaml
Normal file
28
roles/image-serve/meta/main.yaml
Normal 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: []
|
22
roles/image-serve/tasks/main.yaml
Normal file
22
roles/image-serve/tasks/main.yaml
Normal 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
|
||||
|
7
roles/image-serve/vars/main.yml
Normal file
7
roles/image-serve/vars/main.yml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user