Validate that the services are running after installation
We do it in test-bifrost, but not during a normal installation. Change-Id: I4e770d1504d2fd544eb637d20fc6c742218060fb
This commit is contained in:
parent
bcda97b630
commit
df33abf96b
@ -42,6 +42,8 @@ skip_bootstrap: False
|
|||||||
skip_start: False
|
skip_start: False
|
||||||
# set to true to skip performing online data migrations
|
# set to true to skip performing online data migrations
|
||||||
skip_migrations: "{{ skip_bootstrap }}"
|
skip_migrations: "{{ skip_bootstrap }}"
|
||||||
|
# set to true to skip validating the services
|
||||||
|
skip_validation: "{{ skip_start }}"
|
||||||
|
|
||||||
# Default network interface that bifrost will be attached to.
|
# Default network interface that bifrost will be attached to.
|
||||||
# This is used in ipa_* so it must be before
|
# This is used in ipa_* so it must be before
|
||||||
|
@ -71,3 +71,7 @@
|
|||||||
- name: "Perform online data migrations"
|
- name: "Perform online data migrations"
|
||||||
include: migrations.yml
|
include: migrations.yml
|
||||||
when: skip_migrations | bool != True
|
when: skip_migrations | bool != True
|
||||||
|
|
||||||
|
- name: "Validate deployment"
|
||||||
|
include: validate.yml
|
||||||
|
when: not skip_validation | bool
|
||||||
|
85
playbooks/roles/bifrost-ironic-install/tasks/validate.yml
Normal file
85
playbooks/roles/bifrost-ironic-install/tasks/validate.yml
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
# implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: "Authentication environment - keystone version"
|
||||||
|
set_fact:
|
||||||
|
testing_env:
|
||||||
|
OS_AUTH_TYPE: password
|
||||||
|
OS_AUTH_URL: "{{ ironic.service_catalog.auth_url }}"
|
||||||
|
OS_USERNAME: "{{ ironic.service_catalog.username }}"
|
||||||
|
OS_PASSWORD: "{{ ironic.service_catalog.password }}"
|
||||||
|
OS_PROJECT_NAME: "{{ ironic.service_catalog.project_name }}"
|
||||||
|
OS_USER_DOMAIN_NAME: default
|
||||||
|
OS_PROJECT_DOMAIN_NAME: default
|
||||||
|
when: enable_keystone | bool
|
||||||
|
no_log: yes
|
||||||
|
|
||||||
|
- name: "Authentication environment - no-auth version"
|
||||||
|
set_fact:
|
||||||
|
testing_env:
|
||||||
|
OS_AUTH_TYPE: none
|
||||||
|
OS_ENDPOINT: "{{ ironic_api_url }}"
|
||||||
|
when: noauth_mode | bool
|
||||||
|
|
||||||
|
- name: "Authentication environment - HTTP basic version"
|
||||||
|
set_fact:
|
||||||
|
testing_env:
|
||||||
|
OS_AUTH_TYPE: http_basic
|
||||||
|
OS_ENDPOINT: "{{ ironic_api_url }}"
|
||||||
|
OS_USERNAME: "{{ admin_username }}"
|
||||||
|
OS_PASSWORD: "{{ admin_password }}"
|
||||||
|
when:
|
||||||
|
- not noauth_mode | bool
|
||||||
|
- not enable_keystone | bool
|
||||||
|
no_log: yes
|
||||||
|
|
||||||
|
- name: "Validate API access and at least one conductor"
|
||||||
|
command: baremetal conductor list -f value -c Hostname
|
||||||
|
environment: "{{ testing_env | combine(bifrost_venv_env if enable_venv else {}) }}"
|
||||||
|
register: conductor_list
|
||||||
|
failed_when: conductor_list.rc != 0 or conductor_list.stdout | trim == ""
|
||||||
|
retries: 6
|
||||||
|
delay: 5
|
||||||
|
until: conductor_list is not failed
|
||||||
|
|
||||||
|
- name: "Authentication environment - no-auth inspector version"
|
||||||
|
set_fact:
|
||||||
|
testing_env:
|
||||||
|
OS_AUTH_TYPE: none
|
||||||
|
OS_ENDPOINT: "{{ ironic_inspector_api_url }}"
|
||||||
|
when:
|
||||||
|
- noauth_mode | bool
|
||||||
|
- enable_inspector | bool
|
||||||
|
|
||||||
|
- name: "Authentication environment - HTTP basic inspector version"
|
||||||
|
set_fact:
|
||||||
|
testing_env:
|
||||||
|
OS_AUTH_TYPE: http_basic
|
||||||
|
OS_ENDPOINT: "{{ ironic_inspector_api_url }}"
|
||||||
|
OS_USERNAME: "{{ admin_username }}"
|
||||||
|
OS_PASSWORD: "{{ admin_password }}"
|
||||||
|
when:
|
||||||
|
- not noauth_mode | bool
|
||||||
|
- not enable_keystone | bool
|
||||||
|
- enable_inspector | bool
|
||||||
|
no_log: yes
|
||||||
|
|
||||||
|
- name: "Validate introspection API access"
|
||||||
|
command: baremetal introspection list
|
||||||
|
environment: "{{ testing_env | combine(bifrost_venv_env if enable_venv else {}) }}"
|
||||||
|
register: introspection_list
|
||||||
|
retries: 6
|
||||||
|
delay: 5
|
||||||
|
until: introspection_list is not failed
|
||||||
|
when: enable_inspector | bool
|
5
releasenotes/notes/validate-261b92bc614f5d4a.yaml
Normal file
5
releasenotes/notes/validate-261b92bc614f5d4a.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``bifrost-ironic-install`` role now validates that the services have
|
||||||
|
been started successfully, use ``skip_validation`` to disable.
|
Loading…
x
Reference in New Issue
Block a user