rhtconsulting / rhc-ose

OpenShift Automation and Utilities by Red Hat Consulting
42 stars 34 forks source link

added pre validation scripts #236

Closed stratus-ss closed 7 years ago

stratus-ss commented 8 years ago

This PR has been rebased on the updated version of rhc-ose with the changes requested in PR 152

The screen shots have not been updated but the Docker section is now set to warning

What does this PR do?

This pull request adds 2 class files and one executable script which test for the following

It has standard python usage help

[root@lb00 OSE_Setup]# time ./validate-pre-install.py -h
Usage: validate_ose.py [options]

Options:
  -h, --help            show this help message and exit
  --ansible-host-file=ANSIBLE_HOST_FILE
                        Specify location of ansible hostfile
  --show-sha-sums=SHOW_SHA_SUMS
                        Toggle whether or not to show the sha sum of fileson
                        remote host

This script is an audit only and will not do any changes on its own. It can be run like so:

./validate-pre-install.py --ansible-host-file ~/working_ansible --show-sha-sums yes

show_shaw_sums is optional and can be omitted. ansible-host-file is required and the script will terminate if no host file is specified.

The script uses the following colourization schemes for more readable output.

HEADER = '\033[95m'   # Purple
OKBLUE = '\033[94m'   # Blue
OKGREEN = '\033[92m'  # Green
WARNING = '\033[93m'  # Yellow
FAIL = '\033[91m'     # Red
ENDC = '\033[0m'      # Ends special colourization
BOLD = '\033[1m'      # makes text bold
UNDERLINE = '\033[4m' # currently not implemented
HIGHLIGHT = '\033[96m'# currently not implemented

The script expects to parse an ansible host file or a text file with a list of fqdns

Sample output:

Is there a relevant Issue open for this?

Open trello card: https://trello.com/c/ZzI1p8bN

Who would you like to review this?

/cc @etsauer @JaredBurck