Skip to main content

ARA Records Ansible

Project description

ARA Records Ansible

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

doc/source/_static/ara-with-icon.png

How it works

ARA Records 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.

doc/source/_static/graphs/recording-workflow.png

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.

doc/source/_static/ui-api-browser.png

Reporting interface

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

doc/source/_static/ui-playbook-search.png

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.

doc/source/_static/ui-ara-web.png

Getting started

Requirements

  • Any recent Linux distribution or Mac OS with python >=3.5 available

  • The ara Ansible plugins must be installed for the same python interpreter as Ansible itself

For RHEL 7 and CentOS 7 it is recommended to run the API server in a container due to missing or outdated dependencies. See this issue for more information.

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

# Use the CLI to see recorded playbooks
ara playbook list

# 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 with podman 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

# or with docker:
docker 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

# Use the CLI to see recorded playbooks
ara playbook list

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

Read more about how container images are built and how to run them in the documentation.

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 from the ara Ansible collection: https://github.com/ansible-community/ara-collection

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.

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

ara-1.5.0.0rc2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

ara-1.5.0.0rc2-py2.py3-none-any.whl (406.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ara-1.5.0.0rc2.tar.gz.

File metadata

  • Download URL: ara-1.5.0.0rc2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.8

File hashes

Hashes for ara-1.5.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 75e976175f18acdd76ca9c40a968d22e9bda3106f57d298a3b6c3d3b460012ea
MD5 21d57e681ceb3566565b12a43adaabd5
BLAKE2b-256 47f8746b55d49c5922fe057cd2091a48e3796ab00e58beb77d3b8db5d1ca3a2b

See more details on using hashes here.

File details

Details for the file ara-1.5.0.0rc2-py2.py3-none-any.whl.

File metadata

  • Download URL: ara-1.5.0.0rc2-py2.py3-none-any.whl
  • Upload date:
  • Size: 406.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.8

File hashes

Hashes for ara-1.5.0.0rc2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3e6c9c0f8300ca52babecfd1d9bae1b10eac94eab6cd0d51f3cd945eda07f758
MD5 edadc7ddcc054bd513f7e10d98dfbf2d
BLAKE2b-256 06a9bbf26391fc4d06d719cca1e3fae305a1da8064aeca1179baaa6623421715

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page