From d91ae0ea1572a02505d69a432186e44e980f3f87 Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Tue, 22 May 2018 13:42:59 +0200 Subject: [PATCH] Document the custom validations feature Change-Id: I9359adb90f7055301dd3f5dd974ae5d3199b15dd Implements: blueprint custom-validations Depends-On: I9e9131b355312c53f12d154976d5d9cd706cc338 --- .../install/validations/validations.rst | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/doc/source/install/validations/validations.rst b/doc/source/install/validations/validations.rst index d6da1650..8c8d20c3 100644 --- a/doc/source/install/validations/validations.rst +++ b/doc/source/install/validations/validations.rst @@ -5,7 +5,7 @@ Since the Newton release, TripleO ships with extensible checks for verifying the undercloud configuration, hardware setup, and the deployment to find common issues early. -The TripleO GUI runs the validations automatically. While work is +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. @@ -48,11 +48,13 @@ it like so:: $ source stackrc $ openstack workflow execution create tripleo.validations.v1.run_validation '{"validation_name": "undercloud-ram"}' -This will run the "undercloud-ram.yaml" validation. All validations -are stored in the -``/usr/share/openstack-tripleo-validations/validations/`` directory, -so to get the name of the validation (``undercloud-ram`` here) find -the right one there and use its filename without an extension. +This will run the "undercloud-ram.yaml" validation. + +The undercloud comes with a set of default validations, which are stored in a +Swift container called ``tripleo-validations``. To get the list of available +validations, run ``openstack container list tripleo-validations``. To get the +name of the validation (``undercloud-ram`` here) find the right one there and +use its filename without an extension. The command will return an execution ID, which you can query for the results. To find out whether the validation finished, run:: @@ -74,6 +76,32 @@ and error messages it encountered along the way as well as an overall summary. +Custom validations +------------------ +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 +not appropriate to include these in the set of default TripleO validations. + +Custom validations are associated with deployment plans and stored in the +plan's Swift container, together with the rest of the plan files. + +To add custom validations for a deployment plan, create a ``custom-validations`` +subdirectory within the deployment plan Swift container and place the +validations yaml files there. + +To run a custom validation, follow the same procedure as for running one of the +default validations - determine the name of the validation by listing the contents +of the ``custom-validations`` subdirectory, and supply that name (without the +.yaml extension) to the ``run_validation`` workflow. + +If a validation with the same name is found both in the set of default +validations, and in custom validations, the custom validation is always picked. +This means that, if you wish to override a default validation with your custom +implementation of it, all you need to do is create a validation with the same +name and place it in the ``custom-validations`` subdirectory of the Swift +container holding the deployment plan. + + .. _running_validation_group: Running a group of validations @@ -153,3 +181,4 @@ reasons that the validation fails. For example:: .. _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/