diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-11-17 15:38:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-17 15:38:34 -0800 |
commit | b4a294841e063784afe32c289bf3fd6410edc6d6 (patch) | |
tree | b0d6435b8846f95ce836d4fb78100ea509d60b21 /playbooks/openshift-checks/README.md | |
parent | 9e97038fe0dbd6aa842a260ccc10b35f7aefe787 (diff) | |
parent | 9f2de18076bbec19116351a7a3552d4fd2f6790a (diff) | |
download | openshift-b4a294841e063784afe32c289bf3fd6410edc6d6.tar.gz openshift-b4a294841e063784afe32c289bf3fd6410edc6d6.tar.bz2 openshift-b4a294841e063784afe32c289bf3fd6410edc6d6.tar.xz openshift-b4a294841e063784afe32c289bf3fd6410edc6d6.zip |
Merge pull request #6147 from mtnbikenc/consolidate-openshift-checks
Automatic merge from submit-queue.
Playbook Consolidation - openshift-checks
- Create playbooks/openshift-checks directory
- Move everything from playbooks/byo/openshift-checks to playbooks/openshift-checks
- Move everything from playbooks/common/openshift-checks to playbooks/openshift-checks/private
- Fix all include path references throughout playbooks/
Trello: https://trello.com/c/2Rx1uvjz/547-2-playbook-consolidation-openshift-checks
Diffstat (limited to 'playbooks/openshift-checks/README.md')
-rw-r--r-- | playbooks/openshift-checks/README.md | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/playbooks/openshift-checks/README.md b/playbooks/openshift-checks/README.md new file mode 100644 index 000000000..0b7ea91ff --- /dev/null +++ b/playbooks/openshift-checks/README.md @@ -0,0 +1,104 @@ +# OpenShift health checks + +This directory contains Ansible playbooks for detecting potential problems prior +to an install, as well as health checks to run on existing OpenShift clusters. + +Ansible's default operation mode is to fail fast, on the first error. However, +when performing checks, it is useful to gather as much information about +problems as possible in a single run. + +Thus, the playbooks run a battery of checks against the inventory hosts and +gather intermediate errors, giving a more complete diagnostic of the state of +each host. If any check failed, the playbook run will be marked as failed. + +To facilitate understanding the problems that were encountered, a custom +callback plugin summarizes execution errors at the end of a playbook run. + +## Available playbooks + +1. Pre-install playbook ([pre-install.yml](pre-install.yml)) - verifies system + requirements and look for common problems that can prevent a successful + installation of a production cluster. + +2. Diagnostic playbook ([health.yml](health.yml)) - check an existing cluster + for known signs of problems. + +3. Certificate expiry playbooks ([certificate_expiry](certificate_expiry)) - + check that certificates in use are valid and not expiring soon. + +4. Adhoc playbook ([adhoc.yml](adhoc.yml)) - use it to run adhoc checks or to + list existing checks. + See the [next section](#the-adhoc-playbook) for a usage example. + +## Running + +With a [recent installation of Ansible](../../../README.md#setup), run the playbook +against your inventory file. Here is the step-by-step: + +1. If you haven't done it yet, clone this repository: + + ```console + $ git clone https://github.com/openshift/openshift-ansible + $ cd openshift-ansible + ``` + +2. Install the [dependencies](../../../README.md#setup) + +3. Run the appropriate playbook: + + ```console + $ ansible-playbook -i <inventory file> playbooks/openshift-checks/pre-install.yml + ``` + + or + + ```console + $ ansible-playbook -i <inventory file> playbooks/openshift-checks/health.yml + ``` + + or + + ```console + $ ansible-playbook -i <inventory file> playbooks/openshift-checks/certificate_expiry/default.yaml -v + ``` + +### The adhoc playbook + +The adhoc playbook gives flexibility to run any check or a custom group of +checks. What will be run is determined by the `openshift_checks` variable, +which, among other ways supported by Ansible, can be set on the command line +using the `-e` flag. + +For example, to run the `docker_storage` check: + +```console +$ ansible-playbook -i <inventory file> playbooks/openshift-checks/adhoc.yml -e openshift_checks=docker_storage +``` + +To run more checks, use a comma-separated list of check names: + +```console +$ ansible-playbook -i <inventory file> playbooks/openshift-checks/adhoc.yml -e openshift_checks=docker_storage,disk_availability +``` + +To run an entire class of checks, use the name of a check group tag, prefixed by `@`. This will run all checks tagged `preflight`: + +```console +$ ansible-playbook -i <inventory file> playbooks/openshift-checks/adhoc.yml -e openshift_checks=@preflight +``` + +It is valid to specify multiple check tags and individual check names together +in a comma-separated list. + +To list all of the available checks and tags, run the adhoc playbook without +setting the `openshift_checks` variable: + +```console +$ ansible-playbook -i <inventory file> playbooks/openshift-checks/adhoc.yml +``` + +## Running in a container + +This repository is built into a Docker image including Ansible so that it can +be run anywhere Docker is available, without the need to manually install dependencies. +Instructions for doing so may be found [in the README](../../../README_CONTAINER_IMAGE.md). |