RETIRED, this project has moved to https://github.com/ansible-community/ara
Go to file
David Moreau Simard 201a8d95f4
CLI: Port "ara playbook list" command from ara 0.x
This is the first command being ported and so it includes the base
framework for integrating other commands with cliff.

The docs are also re-arranged to include the new commands, some
examples, as well as the existing ara-manage commands.

Change-Id: Ia758e4b70ec0a6821e97b5b66d123dfe33cc63d3
2020-07-15 22:10:00 -04:00
.github/ISSUE_TEMPLATE Add GitHub issue templates for bugs and enhancements 2019-06-07 23:03:07 -04:00
.zuul.d settings: align with dynaconf preference for ruamel.yaml 2020-07-02 10:04:15 -04:00
ara CLI: Port "ara playbook list" command from ara 0.x 2020-07-15 22:10:00 -04:00
contrib Added centos 8 based container for ara api server 2020-07-03 13:17:41 +00:00
doc CLI: Port "ara playbook list" command from ara 0.x 2020-07-15 22:10:00 -04:00
playbooks Re-structure integration tests 2019-06-20 10:22:27 -04:00
roles Updated docs, updated vars files for ara_web and ara_frontend_nginx to support Debian 10 2020-05-08 12:03:39 +02:00
tests container-images: Run SQL migrations automatically at boot 2020-05-05 13:34:59 -04:00
.black.toml Rename pyproject.toml to .black.toml to address pep517 2019-04-24 21:17:34 -04:00
.editorconfig 💥 first commit 2018-03-29 12:36:14 -04:00
.gitignore Feature to ignore Ansible files based on patterns. 2020-01-29 15:42:35 +00:00
.gitreview Switch default branch from feature/1.0 to master 2019-06-04 20:33:00 -04:00
LICENSE 💥 first commit 2018-03-29 12:36:14 -04:00
README.rst Refresh README 2020-05-07 23:17:10 -04:00
manage.py Make manage.py executable 2019-05-21 16:56:59 -04:00
requirements.txt CLI: Port "ara playbook list" command from ara 0.x 2020-07-15 22:10:00 -04:00
setup.cfg CLI: Port "ara playbook list" command from ara 0.x 2020-07-15 22:10:00 -04:00
setup.py Bootstrap the repository with the basic machinery (#1) 2018-03-29 12:36:22 -04:00
test-requirements.txt docs: isolate docs requirements and add API server dependencies 2019-11-28 10:11:45 -05:00
tox.ini docs: isolate docs requirements and add API server dependencies 2019-11-28 10:11:45 -05:00

README.rst

ARA Records Ansible

ARA Records Ansible playbooks and makes them easier to understand and troubleshoot.

image

How it works

ARA saves Ansible playbook execution results to local or remote databases by using an Ansible callback plugin.

This callback plugin leverages built-in python API clients to send data to a REST API server where data and metrics are made available for querying, browsing, monitoring or for integration in other tools and interfaces.

image

What it looks like

API browser

Included by the API server with django-rest-framework, the API browser allows users to navigate the different API endpoints and query recorded data.

image

Reporting interface

A simple reporting interface built-in to the API server without any extra dependencies.

image

ara-web

A project that is a work in progress and would appreciate contributions, ara-web is a stateless javascript interface to the API built with react and patternfly.

image

Getting started

Recording playbooks without an API server

The default API client, offline, requires API server dependencies to be installed but does not need the API server to be running in order to query or send data.

With defaults and using a local sqlite database:

# Install Ansible and ARA (with API server dependencies) for the current user
python3 -m pip install --user ansible "ara[server]"

# Configure Ansible to use the ARA callback plugin
export ANSIBLE_CALLBACK_PLUGINS="$(python3 -m ara.setup.callback_plugins)"

# Run an Ansible playbook
ansible-playbook playbook.yaml

# Start the built-in development server to browse recorded results
ara-manage runserver

Recording playbooks with an API server

When running Ansible from multiple servers or locations, data can be aggregated by running the API server as a service and configuring the ARA Ansible callback plugin to use the http API client with the API server endpoint.

The API server is a relatively simple django web application written in python that can run with WSGI application servers such as gunicorn, uwsgi or mod_wsgi.

Alternatively, the API server can also run from a container image such as the one available on DockerHub:

# Start an API server from the image on DockerHub:
mkdir -p ~/.ara/server
podman run --name api-server --detach --tty \
  --volume ~/.ara/server:/opt/ara:z -p 8000:8000 \
  docker.io/recordsansible/ara-api:latest

Once the server is running, Ansible playbook results can be sent to it by configuring the ARA callback plugin:

# Install Ansible and ARA (without API server dependencies) for the current user
python3 -m pip install --user ansible ara

# Configure Ansible to use the ARA callback plugin
export ANSIBLE_CALLBACK_PLUGINS="$(python3 -m ara.setup.callback_plugins)"

# Set up the ARA callback to know where the API server is located
export ARA_API_CLIENT="http"
export ARA_API_SERVER="http://127.0.0.1:8000"

# Run an Ansible playbook
ansible-playbook playbook.yaml

Data will be available on the API server in real time as the playbook progresses and completes.

Live demo

Deployments of the ARA API server and ara-web are available for demonstration and test purposes:

These live demos are deployed using the ara_api and ara_web Ansible roles.

Documentation

Documentation for installing, configuring, running and using ARA is available on readthedocs.io.

Community and getting help

Contributing

Contributions to the project are welcome and appreciated !

Get started with the contributor's documentation.

Authors

Contributors to the project can be viewed on GitHub.

Copyright

Copyright (c) 2020 Red Hat, Inc.

ARA Records Ansible 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 Records Ansible 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 Records Ansible.  If not, see <http://www.gnu.org/licenses/>.