Skip to content
Permalink
Browse files

further doc updates, reflect 1.1.0.

* Better explain how QUADS "runs"
* Small fix for cron example
* Remove references to Ansible CMDB, it's not in 1.1.0 yet and will need
to be re-added
* Fix table of contents.

Change-Id: I79519ac32a466689ec67cef43ca04175c912cac8
  • Loading branch information...
sadsfae committed Aug 7, 2019
1 parent 841141a commit b027f0b1762f31e2244c89bdf9ed1426ef5aaf00
Showing with 31 additions and 18 deletions.
  1. +18 −13 README.md
  2. +13 −5 cron/quads
@@ -20,6 +20,10 @@ QUADS automates the future scheduling, end-to-end provisioning and delivery of b
* [Installing QUADS with Docker Compose](#installing-quads-with-docker-compose)
* [Installing QUADS from Github](#installing-quads-from-github)
* [Installing QUADS from RPM](#installing-quads-from-rpm)
* [Installing other QUADS Components](#installing-other-quads-components)
* [QUADS Wiki](#quads-wiki)
* [QUADS Move Command](#quads-move-command)
* [Making QUADS Run](#making-quads-run)
* [QUADS Usage Documentation](#quads-usage-documentation)
* [How Provisioning Works](#how-provisioning-works)
* [QUADS Move Host Command](#quads-move-host-command)
@@ -240,26 +244,27 @@ echo 'alias quads="quads-cli"' >> /root/.bashrc
- There is also a Wordpress Wiki [VM](https://github.com/redhat-performance/ops-tools/tree/master/ansible/wiki-wordpress-nginx-mariadb) QUADS component that we use a place to automate documentation via a Markdown to Python RPC API but any Markdown-friendly documentation platform could suffice. Note that the container deployment sets this up for you.
- You'll then simply need to create an `infrastructure` page and `assignments` page and denote their `page id` for use in automation. This is set in `conf/quads.yml`
- We also provide the `krusze` theme which does a great job of rendering Markdown-based tables, and the `JP Markdown` plugin which is required to upload Markdown to the [Wordpress XMLRPC Python API](https://hobo.house/2016/08/30/auto-generating-server-infrastructure-documentation-with-python-wordpress-foreman/)
- On CentOS/RHEL7 you'll need the [python2-wordpress-xmlrpc](https://github.com/redhat-performance/ops-tools/raw/master/packages/python2-wordpress-xmlrpc-2.3-11.fc28.noarch.rpm) package unless you satisfy it with pip.
- You'll also need `bind-utils` package installed that provides the `host` command

#### Foreman Hammer CLI
- For full Foreman functionality you'll want to have a working [hammer cli](https://theforeman.org/2013/11/hammer-cli-for-foreman-part-i-setup.html) setup on your QUADS host as well.

#### Ansible CMDB
- We use the [Ansible CMDB](https://github.com/fboender/ansible-cmdb) project as an additional validation step and to generate a one-time Ansible facts-generated web page for all the hosts in each QUADS assignment.
- Install the package for this or consume it via Github.

```
yum install ansible https://github.com/fboender/ansible-cmdb/releases/download/1.27/ansible-cmdb-1.27-2.noarch.rpm
```
- You can turn off this functionality in `/opt/quads/conf/quads.yml` via `gather_ansible_facts: false`

#### QUADS Move Command
- QUADS relies on calling an external script, trigger or workflow to enact the actual provisioning of machines. You can look at and modify our [move-and-rebuild-host](https://github.com/redhat-performance/quads/blob/master/bin/move-and-rebuild-host.sh) script to suit your environment for this purpose. Read more about this in the [move-host-command](https://github.com/redhat-performance/quads#quads-move-host-command) section below.

- Note: RPM installations will have ```quads-cli``` and tools in your system $PATH but you will need to login to a new shell to pick it up.

### Making QUADS Run
- QUADS is a passive service and does not do anything you do not tell it to do. We control QUADS with cron, please copy and modify our [example cron commands](https://raw.githubusercontent.com/redhat-performance/quads/master/cron/quads) to your liking, adjust as needed.

- Below are the major components run out of cron that makes everything work.

| Service Command | Category | Purpose |
|-----------------|----------|---------|
| quads-cli --move-hosts | provisioning | checks for hosts to move/reclaim as scheduled |
| validate-env.py | validation | checks clouds pending to be released for all enabled validation checks |
| regenerate_wiki.py | documentation | keeps your infra wiki updated based on current state of environment |
| simple_table_web.py | visualization | keeps your systems availability and usage visualization up to date |
| make_instackenv_json.py | openstack | keeps optional openstack triple-o installation files up-to-date |


## QUADS Usage Documentation

- Define the various cloud environments
@@ -1,4 +1,4 @@
"SHELL=/bin/bash
SHELL=/bin/bash
PYTHONPATH=/opt/quads
#######################################
#
@@ -15,18 +15,26 @@ PYTHONPATH=/opt/quads
#
# We use flock to make sure running crons have log management
# https://linux.die.net/man/1/flock
#######################################
#
#
# NOTE YOU ONLY NEED ONE OF THE CATEGORIES BELOW
# EITHER PICK CONTAINER or NON-CONTAINER (RPM installation) DEPENDING ON
# YOUR DEPLOYMENT TYPE
#
########################################
##### CONTAINER QUADS SERVER ENTRIES
#######################################
##### ONLY USE WITH CONTAINER DEPLOYMENT
########################################
# * * * * * flock -n /tmp/moveandrebuild.lock -c "docker exec quads bin/quads-cli --move-hosts" 1>>/var/log/move-and-rebuild.log 2>&1
# * * * * * flock -n /tmp/validateenv.lock -c "docker exec quads quads/tools/validate_env.py" 1>/dev/null 2>&1
# */5 * * * * flock -n /tmp/regeneratewiki.lock -c "docker exec quads quads/tools/regenerate_wiki.py" 1>/dev/null 2>&1
# 0 0 * * * flock -n /tmp/notify.lock -c "docker exec quads quads/tools/notify.py" 1>/dev/null 2>&1
# 0 0 * * * flock -n /tmp/simpletableweb.lock -c "docker exec quads quads/tools/simple_table_web.py" 1>/dev/null 2>&1
# * * * * * flock -n /tmp/makeinstackenv.lock -c "docker exec quads quads/tools/make_instackenv_json.py" 1>/dev/null 2>&1
########################################
#########################################
##### NON-CONTAINER QUADS SERVER ENTRIES
########################################
##### ONLY USE WITH RPM OR SOURCE INSTALL
#########################################
# * * * * * flock -n /tmp/moveandrebuild.lock -c "/opt/quads/bin/quads-cli --move-hosts" 1>>/var/log/move-and-rebuild.log 2>&1
# * * * * * flock -n /tmp/validateenv.lock -c "/opt/quads/quads/tools/validate_env.py" 1>/dev/null 2>&1
# */5 * * * * flock -n /tmp/regeneratewiki.lock "/opt/quads/quads/tools/regenerate_wiki.py" 1>/dev/null 2>&1

0 comments on commit b027f0b

Please sign in to comment.
You can’t perform that action at this time.