Bootstrap documentation and publish it to readthedocs

Add a first bit of documentation around the workflow for recording data.

Change-Id: I9456b71c94e9097ea93394f8f7c33cd272586cc5
This commit is contained in:
David Moreau Simard 2018-09-26 16:40:49 -04:00
parent 64f47cf4e8
commit 0d02f3d459
No known key found for this signature in database
GPG Key ID: CBEB466764A9E621
9 changed files with 139 additions and 0 deletions

View File

@ -1,4 +1,8 @@
- project: - project:
vars:
rtd_webhook_id: '49230'
templates:
- docs-on-readthedocs
check: check:
jobs: jobs:
- ara-server-ansible-integration: - ara-server-ansible-integration:

View File

@ -0,0 +1,7 @@
graph source files
==================
These are exports from the ARA diagrams and graphs made through draw.io.
We're keeping them for version control purposes but the documentation uses
actual images built from these from the ``doc/source/_static/graphs`` directory.

View File

@ -0,0 +1 @@
<mxfile userAgent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" version="9.1.8" editor="www.draw.io" type="device"><diagram id="9906a0a6-bcd4-fe14-221d-85032a32ce87" name="Page-1">7Zxbc5s4FIB/DTPtQzISdx4T95Kd6c5mms5eHmWQbTYycgHnsr9+JZAwSGDjGDtugjvTwBFIQufjHOlIwrAmy6evKVotfqcRJoYJoifD+mSYJvRcl/3hkmchAVZQSuZpHAnZRnAX/4flhUK6jiOcNS7MKSV5vGoKQ5okOMwbMpSm9LF52YySZqkrNMea4C5ERJf+FUf5QkghAJuEGxzPF6Jo3xEJUxTez1O6TkR5hmnNil+ZvEQyL3F9tkARfayJrM+GNUkpzcuj5dMEE964stnK+750pFb1TnGS97nBEXp5QGQtnn1Fs3ye4uwnEVXMn2WzFA+G+a3QsK4fF3GO71Yo5KmPjAQmW+RLIpKrR+Mnc4IyrhPAjkO6jEMhJ2iKyXXVaBNKaMqSEppgnkWe0nsshawt3eJXpUjd8JxmMSG1K2cO/8flNMm/oGVMOIt/4jRCCRJiwR00xXntdlD8mByReJ4wWcgaFLPEa72FRaM/4DTHTzWRaPGvmC5xnj6zS0SqZ1vlLeL1sMX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GWdChg2bC11gYJ6OjJbJW3sk40zIcFwlzN0y0X88MvQlq85IxpmQ4ZlKJ9PWw4/HI0MfzrsjGWdChmozLBk2PAkZ+iStN5JxJmTYphrxOyUZelTFH8k4EzLUsYnl6p+5OR4Z+lc/gpGMMyEDAmU/qg9bPoE0EBvsdPO57zIytvmouvX5fw==</diagram></mxfile>

BIN
doc/source/_static/ara.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -0,0 +1,7 @@
graph image files
=================
These are image files for the ARA diagrams and graphs made through draw.io.
The source files used to generate these graphs are located in
``doc/source/_graphs``.

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

23
doc/source/arch.rst Normal file
View File

@ -0,0 +1,23 @@
Architecture and Workflows
==========================
Recording data from Ansible
---------------------------
.. image:: _static/graphs/recording-workflow.png
0. A human (*or a system, script, etc.*) installs ARA and configures Ansible to use the ARA callback
1. A human (*or a system, script, etc.*) executes an ``ansible-playbook`` command
2. Ansible sends hooks for every event to `callback plugins`_ (``v2_playbook_on_start``, ``v2_runner_on_failed``, etc.)
3. The callback plugin, provided by ara-plugins_, organizes the data sent by Ansible and sends it to the API client
4. The API client, provided by ara-clients_, takes care of actually sending the data to the API over HTTP or locally offline through an internal implementation
5. The API server, provided by ara-server_, receives the POST from the client, validates it and sends it to the database model backend
6. The API server sends a response back to the client with the results
7. The API client sends the response back to the callback with the results
8. The callback plugin returns, ending the callback hook
9. Ansible continues running until it is complete (back to step 2)
.. _callback plugins: https://docs.ansible.com/ansible/latest/plugins/callback.html
.. _ara-plugins: https://github.com/openstack/ara-plugins
.. _ara-clients: https://github.com/openstack/ara-clients
.. _ara-server: https://github.com/openstack/ara-server

86
doc/source/conf.py Normal file
View File

@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2018 Red Hat, Inc.
#
# This file is part of ARA Records Ansible.
#
# ARA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ARA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import sphinx_rtd_theme
import pbr.version
version_info = pbr.version.VersionInfo('ara-server')
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'ara-server'
copyright = u'2018, Red Hat'
author = 'OpenStack community'
# The short X.Y version.
version = version_info.version_string()
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'Red Hat', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

11
doc/source/index.rst Normal file
View File

@ -0,0 +1,11 @@
Welcome to the ARA server documentation!
========================================
.. image:: _static/ara.png
Table of Contents
=================
.. toctree::
:maxdepth: 3
Architecture and workflows <arch>