TripleO documentation update for Validations
Now we have CLI support for running the validations. This submissions improves the current documentation available and move the current validations docs to its own section. Change-Id: Ia36b0d557e2a362294e7ab9e7781ea3a09cb0450
This commit is contained in:
parent
fc77597842
commit
5faf00e45c
|
@ -43,6 +43,15 @@ Upgrades/Updates/FFWD-Upgrade
|
||||||
|
|
||||||
upgrade/index
|
upgrade/index
|
||||||
|
|
||||||
|
Validations
|
||||||
|
-----------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
:includehidden:
|
||||||
|
|
||||||
|
validations/index
|
||||||
|
|
||||||
Documentation Conventions
|
Documentation Conventions
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
|
|
@ -139,26 +139,8 @@ Validations
|
||||||
|
|
||||||
You can run the ``prep`` validations to verify the hardware. Later in
|
You can run the ``prep`` validations to verify the hardware. Later in
|
||||||
the process, the validations will be run by the undercloud processes.
|
the process, the validations will be run by the undercloud processes.
|
||||||
|
Refer to the Ansible section for running directly the validations
|
||||||
However, the undercloud is not set up yet. You can install Ansible on
|
over baremetal nodes `validations_no_undercloud`_.
|
||||||
your local machine (that has SSH connectivity to the undercloud) and
|
|
||||||
validate the undercloud from there.
|
|
||||||
|
|
||||||
You need Ansible version 2 and the hostname/IP address of the
|
|
||||||
undercloud (referred to ``$UNDERCLOUD_HOST`` here)::
|
|
||||||
|
|
||||||
$ sudo yum install ansible
|
|
||||||
$ git clone https://git.openstack.org/openstack/tripleo-validations
|
|
||||||
$ cd tripleo-validations
|
|
||||||
$ printf "[undercloud]\n$UNDERCLOUD_HOST" > hosts
|
|
||||||
|
|
||||||
Then get the ``prep`` validations::
|
|
||||||
|
|
||||||
$ grep -l '^\s\+-\s\+prep' -r validations
|
|
||||||
|
|
||||||
And run them one by one::
|
|
||||||
|
|
||||||
$ ansible-playbook -i hosts validations/validation-name.yaml
|
|
||||||
|
|
||||||
|
|
||||||
Configuration Files
|
Configuration Files
|
||||||
|
@ -428,3 +410,4 @@ The following hardware types are supported but not enabled by default:
|
||||||
.. _irmc: https://docs.openstack.org/ironic/latest/admin/drivers/irmc.html
|
.. _irmc: https://docs.openstack.org/ironic/latest/admin/drivers/irmc.html
|
||||||
.. _cisco-ucs-managed: https://docs.openstack.org/ironic/latest/admin/drivers/ucs.html
|
.. _cisco-ucs-managed: https://docs.openstack.org/ironic/latest/admin/drivers/ucs.html
|
||||||
.. _cisco-ucs-standalone: https://docs.openstack.org/ironic/latest/admin/drivers/cimc.html
|
.. _cisco-ucs-standalone: https://docs.openstack.org/ironic/latest/admin/drivers/cimc.html
|
||||||
|
.. _validations_no_undercloud: ../../validations/ansible.html
|
||||||
|
|
|
@ -22,5 +22,4 @@ TripleO Install Guide
|
||||||
advanced_deployment/custom
|
advanced_deployment/custom
|
||||||
controlplane_backup_restore/00_index
|
controlplane_backup_restore/00_index
|
||||||
troubleshooting/troubleshooting
|
troubleshooting/troubleshooting
|
||||||
validations/validations
|
|
||||||
mistral-api/mistral-api
|
mistral-api/mistral-api
|
||||||
|
|
|
@ -167,7 +167,7 @@ Installing the Undercloud
|
||||||
.. admonition:: Validations
|
.. admonition:: Validations
|
||||||
:class: validations
|
:class: validations
|
||||||
|
|
||||||
:doc:`../validations/validations` will be installed and
|
:doc:`../../validations/index` will be installed and
|
||||||
configured during undercloud installation. You can set
|
configured during undercloud installation. You can set
|
||||||
``enable_validations = false`` in ``undercloud.conf`` to prevent
|
``enable_validations = false`` in ``undercloud.conf`` to prevent
|
||||||
that.
|
that.
|
||||||
|
|
|
@ -140,5 +140,5 @@ Updating Undercloud Components
|
||||||
If you added custom OVS ports to the undercloud (e.g. in a virtual
|
If you added custom OVS ports to the undercloud (e.g. in a virtual
|
||||||
testing environment) you may need to re-add them at this point.
|
testing environment) you may need to re-add them at this point.
|
||||||
|
|
||||||
.. _validations: ../install/validations/validations.html#running-a-group-of-validations
|
.. _validations: ../validations/index.html
|
||||||
.. _tripleo-validations: https://github.com/openstack/tripleo-validations/tree/master/validations
|
.. _tripleo-validations: https://github.com/openstack/tripleo-validations/tree/master/validations
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
Running validations using Ansible
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Validations
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
You can run the ``prep`` validations to verify the hardware. Later in
|
||||||
|
the process, the validations will be run by the undercloud processes.
|
||||||
|
|
||||||
|
However, the undercloud is not set up yet. You can install Ansible on
|
||||||
|
your local machine (that has SSH connectivity to the undercloud) and
|
||||||
|
validate the undercloud from there.
|
||||||
|
|
||||||
|
You need Ansible version 2 and the hostname/IP address of the
|
||||||
|
undercloud (referred to ``$UNDERCLOUD_HOST`` here)::
|
||||||
|
|
||||||
|
$ sudo yum install ansible
|
||||||
|
$ git clone https://git.openstack.org/openstack/tripleo-validations
|
||||||
|
$ cd tripleo-validations
|
||||||
|
$ printf "[undercloud]\n$UNDERCLOUD_HOST" > hosts
|
||||||
|
|
||||||
|
Then get the ``prep`` validations::
|
||||||
|
|
||||||
|
$ grep -l '^\s\+-\s\+prep' -r playbooks
|
||||||
|
|
||||||
|
And run them one by one::
|
||||||
|
|
||||||
|
$ ansible-playbook -i hosts playbooks/validation-name.yaml
|
|
@ -0,0 +1,83 @@
|
||||||
|
CLI support for validations
|
||||||
|
===========================
|
||||||
|
|
||||||
|
The following section describes the options
|
||||||
|
when running or listing the existing validations.
|
||||||
|
|
||||||
|
.. note:: Both running or listing validations are
|
||||||
|
supported currently only by calling Mistral.
|
||||||
|
It is expected to have support to call the
|
||||||
|
Ansible playbooks directly.
|
||||||
|
|
||||||
|
Running validations
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Validations can be executed by groups or individually.
|
||||||
|
The current CLI implementation allows to run them
|
||||||
|
using the following CLI options:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator run [options]
|
||||||
|
|
||||||
|
``--plan``: This option allows to execute the
|
||||||
|
validations overriding the default plan name.
|
||||||
|
The default value is set to ``overcloud``.
|
||||||
|
To override this options use for example:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator run --plan mycloud
|
||||||
|
|
||||||
|
``--validation-name``: This options allows to execute
|
||||||
|
a set of specific validations. Specify them as
|
||||||
|
<validation_id>[,<validation_id>,...] which means a
|
||||||
|
comma separated list. The default value for this
|
||||||
|
option is [].
|
||||||
|
For example you can run this as:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator run --validation-name check-ftype,512e
|
||||||
|
|
||||||
|
`--group`: This option allows to run specific group
|
||||||
|
validations, if more than one group is required, then
|
||||||
|
separate the group names with commas. The default value for this option
|
||||||
|
is ['pre-deployment'].
|
||||||
|
Run this option for example like:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator run --group pre-upgrade,prep
|
||||||
|
|
||||||
|
Listing validations
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Validations can be listed by groups and
|
||||||
|
depending which validations will be listed,
|
||||||
|
the output might be configured as a table, json or yaml.
|
||||||
|
The user can list the validations using the following
|
||||||
|
command:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator list [options]
|
||||||
|
|
||||||
|
``--output``: This option allows to change
|
||||||
|
the default output for listing the validations.
|
||||||
|
The options are json, yaml or table.
|
||||||
|
Run this option for example like:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator list --output json
|
||||||
|
|
||||||
|
``--group``: This option allows to filter and list
|
||||||
|
specific group validations, if more than one group
|
||||||
|
is required to be listed, separate the group names
|
||||||
|
with commas. By default all group validations
|
||||||
|
will be listed.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
openstack tripleo validator list --group pre-upgrade,prep
|
|
@ -0,0 +1,64 @@
|
||||||
|
Validations guide
|
||||||
|
=================
|
||||||
|
|
||||||
|
Since the Newton release, TripleO ships with extensible checks for
|
||||||
|
verifying the Undercloud configuration, hardware setup, and the
|
||||||
|
Overcloud deployment to find common issues early.
|
||||||
|
|
||||||
|
The TripleO UI runs the validations automatically. Since
|
||||||
|
Rocky is possible to run the validations using the TripleO
|
||||||
|
CLI.
|
||||||
|
|
||||||
|
.. note:: The TripleO UI is marked for deprecation beginning with
|
||||||
|
OpenStack Stein.
|
||||||
|
|
||||||
|
The validations are assigned into various groups that indicate when in
|
||||||
|
the deployment workflow they are expected to run:
|
||||||
|
|
||||||
|
* **no-op** validations will run a no-op operation to verify that
|
||||||
|
the workflow is working as it supossed to, it will run in both
|
||||||
|
the Undercloud and Overcloud nodes.
|
||||||
|
|
||||||
|
* **openshift-on-openstack** validations will check that the
|
||||||
|
environment meets the requirements to be able to deploy OpenShift
|
||||||
|
on OpenStack.
|
||||||
|
|
||||||
|
* **prep** validations check the hardware configuration of the
|
||||||
|
Undercloud node and should be run before ``openstack undercloud
|
||||||
|
install``. Running prep validations should not rely on Mistral
|
||||||
|
because it might not be installed yet.
|
||||||
|
|
||||||
|
* **pre-introspection** should be run before we introspect nodes using
|
||||||
|
Ironic Inspector.
|
||||||
|
|
||||||
|
* **pre-deployment** validations should be executed before ``openstack
|
||||||
|
overcloud deploy``
|
||||||
|
|
||||||
|
* **post-deployment** should be run after the Overcloud deployment has
|
||||||
|
finished.
|
||||||
|
|
||||||
|
* **pre-upgrade** try to validate your OpenStack deployment before you upgrade it.
|
||||||
|
|
||||||
|
* **post-upgrade** try to validate your OpenStack deployment after you upgrade it.
|
||||||
|
|
||||||
|
Note that for most of these validations, a failure does not mean that
|
||||||
|
you'll be unable to deploy or run OpenStack. But it can indicate
|
||||||
|
potential issues with long-term or production setups. If you're
|
||||||
|
running an environment for developing or testing TripleO, it's okay
|
||||||
|
that some validations fail. In a production setup, they should not.
|
||||||
|
|
||||||
|
The list of all existing validations and the specific documentation
|
||||||
|
for the project is described on the `tripleo-validations documentation page`_.
|
||||||
|
|
||||||
|
The following sections describe the different ways of running and listing the
|
||||||
|
currently installed validations.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:includehidden:
|
||||||
|
|
||||||
|
cli
|
||||||
|
mistral
|
||||||
|
ansible
|
||||||
|
|
||||||
|
.. _tripleo-validations documentation page: http://docs.openstack.org/developer/tripleo-validations/readme.html
|
|
@ -1,45 +1,8 @@
|
||||||
Validations
|
Running validations using mistral
|
||||||
===========
|
---------------------------------
|
||||||
|
|
||||||
Since the Newton release, TripleO ships with extensible checks for
|
Running single validations
|
||||||
verifying the undercloud configuration, hardware setup, and the
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
deployment to find common issues early.
|
|
||||||
|
|
||||||
The TripleO UI runs the validations automatically. While work is
|
|
||||||
underway for having them in the command line workflow, too, they need
|
|
||||||
to be run by calling a Mistral workflow currently.
|
|
||||||
|
|
||||||
The validations are assigned into various groups that indicate when in
|
|
||||||
the deployment workflow are they expected to run:
|
|
||||||
|
|
||||||
* **prep** validations check the hardware configuration of the
|
|
||||||
undercloud node and should be run before ``openstack undercloud
|
|
||||||
install``.
|
|
||||||
|
|
||||||
* **pre-introspection** should be run before we introspect nodes using
|
|
||||||
Ironic Inspector.
|
|
||||||
|
|
||||||
* **pre-deployment** validations should be executed before ``openstack
|
|
||||||
overcloud deploy``
|
|
||||||
|
|
||||||
* **post-deployment** should be run after the overcloud deployment has
|
|
||||||
finished.
|
|
||||||
|
|
||||||
* **pre-upgrade** try to validate your undercloud before you upgrade it.
|
|
||||||
|
|
||||||
Note that for most of these validations, a failure does not mean that
|
|
||||||
you'll be unable to deploy or run OpenStack. But it can indicate
|
|
||||||
potential issues with long-term or production setups. If you're
|
|
||||||
running an environment for developing or testing TripleO, it's okay
|
|
||||||
that some validations fail. In a production setup they should not.
|
|
||||||
|
|
||||||
The list of all existing validations and their groups is on the
|
|
||||||
`tripleo-validations documentation page`_.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Running a single validation
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
If you want to run one validation in particular (because you're trying
|
If you want to run one validation in particular (because you're trying
|
||||||
things out or want to see whether you fixed the failure), you can run
|
things out or want to see whether you fixed the failure), you can run
|
||||||
|
@ -77,7 +40,8 @@ summary.
|
||||||
|
|
||||||
|
|
||||||
Custom validations
|
Custom validations
|
||||||
------------------
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Support for `custom validations`_ has been added in the Rocky development cycle.
|
Support for `custom validations`_ has been added in the Rocky development cycle.
|
||||||
It allows operators to add their own bespoke validations, in cases when it's
|
It allows operators to add their own bespoke validations, in cases when it's
|
||||||
not appropriate to include these in the set of default TripleO validations.
|
not appropriate to include these in the set of default TripleO validations.
|
||||||
|
@ -105,7 +69,7 @@ container holding the deployment plan.
|
||||||
.. _running_validation_group:
|
.. _running_validation_group:
|
||||||
|
|
||||||
Running a group of validations
|
Running a group of validations
|
||||||
------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The deployment documentation highlights places where you can run a
|
The deployment documentation highlights places where you can run a
|
||||||
specific group of validations. Here's how to run the
|
specific group of validations. Here's how to run the
|
||||||
|
@ -136,7 +100,7 @@ the method above::
|
||||||
$ openstack action execution run tripleo.validations.list_validations '{"groups": ["pre-deployment"]}' | jq ".result[] | .id"
|
$ openstack action execution run tripleo.validations.list_validations '{"groups": ["pre-deployment"]}' | jq ".result[] | .id"
|
||||||
|
|
||||||
Another example are the "pre-upgrade" validations which are added during the P
|
Another example are the "pre-upgrade" validations which are added during the P
|
||||||
development cycle (tracked with this blueprint_). These can be executed as
|
development cycle. These can be executed as
|
||||||
the example above but instead using the "pre-upgrade" group::
|
the example above but instead using the "pre-upgrade" group::
|
||||||
|
|
||||||
openstack workflow execution create tripleo.validations.v1.run_groups '{"group_names": ["pre-upgrade"]}'
|
openstack workflow execution create tripleo.validations.v1.run_groups '{"group_names": ["pre-upgrade"]}'
|
||||||
|
@ -175,10 +139,3 @@ reasons that the validation fails. For example::
|
||||||
"stderr": "",
|
"stderr": "",
|
||||||
"stdout": "Task 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-heat-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-ironic-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-zaqar first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-glance-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-glance-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nFailure! The validation failed for all hosts:\n* localhost\n"
|
"stdout": "Task 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-heat-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-ironic-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-zaqar first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-glance-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nTask 'Fail if services were not running' failed:\nHost: localhost\nMessage: One of the undercloud services was not active. Please check openstack-glance-api first and then confirm the status of undercloud services in general before attempting to update or upgrade the environment.\n\nFailure! The validation failed for all hosts:\n* localhost\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _blueprint: https://blueprints.launchpad.net/tripleo/+spec/pre-upgrade-validations
|
|
||||||
.. _tripleo-validations documentation page: http://docs.openstack.org/developer/tripleo-validations/readme.html#existing-validations
|
|
||||||
.. _custom validations: https://review.openstack.org/#/c/393775/
|
|
Loading…
Reference in New Issue