ARA Records Ansible
Project description
ARA Records Ansible
ARA Records Ansible playbooks and makes them easier to understand and troubleshoot.
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.
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.
Reporting interface
A simple reporting interface built-in to the API server without any extra dependencies.
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.
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
Bugs, issues and enhancements: https://github.com/ansible-community/ara/issues
IRC: #ara on Freenode
Website and blog: https://ara.recordsansible.org
Twitter: https://twitter.com/arecordsansible
Contributing
Contributions to the project are welcome and appreciated !
Get started with the contributor’s documentation.
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/>.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ara-1.4.1.0rc1.tar.gz
.
File metadata
- Download URL: ara-1.4.1.0rc1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37802d0d17f35ee9aa4a8cf94b3e10bdc25c7ca2852d49371fd406e7e931ffec |
|
MD5 | ae4a4fcbef930c72e45381c2fc5bd42a |
|
BLAKE2b-256 | fce879af200ecef1bc5f7c67a7ad32365667bd2fe618cf5ce82d193ea8674771 |
File details
Details for the file ara-1.4.1.0rc1-py2.py3-none-any.whl
.
File metadata
- Download URL: ara-1.4.1.0rc1-py2.py3-none-any.whl
- Upload date:
- Size: 390.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e24e45712cf296b28c9e6f8678605fc2d1048b2b4466475bedb3c97cb2f72fd7 |
|
MD5 | 5997c4428b04f5217d10e3968fbad6ee |
|
BLAKE2b-256 | 5996b1d5926983f34b8d6ed5a41675e82664966d845c6c8de9c094cf86cfb931 |