|
| 1 | +# Visualizing Ansitheus reports with ARA Records Ansible (ARA) |
| 2 | + |
| 3 | +## 1. About ara |
| 4 | + |
| 5 | +[ara](https://ara.recordsansible.org/) provides Ansible reporting by recording ``ansible`` and ``ansible-playbook`` commands regardless of how and where they run: |
| 6 | + |
| 7 | +- from most Linux distributions and even on Mac OS (as long as ``python >= 3.8`` is available) |
| 8 | +- from tools that run Ansible like ansible-(pull|test|runner|navigator), AWX & Automation Controller (Tower), Molecule and Semaphore |
| 9 | +- from a terminal, a script or by hand |
| 10 | +- from a laptop, desktop, server, virtual machine, container or execution environment |
| 11 | +- from CI/CD platforms such as Jenkins, Rundeck and Zuul |
| 12 | +- from git forges like GitHub, GitLab, Gitea & Forgejo |
| 13 | + |
| 14 | +The recorded results are available via an included CLI, a REST API as well as a self-hosted, local-first web reporting interface. |
| 15 | + |
| 16 | +<!-- https://github.com/ansible-community/ara/blob/master/doc/source/_static/demo.mp4 --> |
| 17 | +https://github.com/ansible-community/ara/assets/1291204/4fbdf5f7-509c-46ea-beb0-726b43e1b985 |
| 18 | + |
| 19 | +## 2. Getting started |
| 20 | + |
| 21 | +Started from version v2.2.0, Ansitheus already bundles ara on its Docker image. Checkout the [quickstart](./quickstart.md) for detail. |
| 22 | + |
| 23 | +Firstly configure your ARA API server. Make sure it works properly. You can quickly deploy it using `docker-compose`: |
| 24 | + |
| 25 | +```yaml |
| 26 | +version: "3.8" |
| 27 | + |
| 28 | +services: |
| 29 | + postgres: |
| 30 | + image: postgres:latest |
| 31 | + container_name: postgres |
| 32 | + environment: |
| 33 | + POSTGRES_USER: ara |
| 34 | + POSTGRES_PASSWORD: ara_password |
| 35 | + POSTGRES_DB: ara |
| 36 | + volumes: |
| 37 | + - postgres_data:/var/lib/postgresql/data |
| 38 | + restart: unless-stopped |
| 39 | + |
| 40 | + ara: |
| 41 | + image: recordsansible/ara-api:latest |
| 42 | + container_name: ara |
| 43 | + environment: |
| 44 | + - ARA_ALLOWED_HOSTS=["*"] |
| 45 | + - ARA_DATABASE_DRIVER=postgresql |
| 46 | + - ARA_DATABASE_USER=ara |
| 47 | + - ARA_DATABASE_PASSWORD=ara_password |
| 48 | + - ARA_DATABASE_HOST=postgres |
| 49 | + - ARA_DATABASE_NAME=ara |
| 50 | + ports: |
| 51 | + - "8000:8000" |
| 52 | + depends_on: |
| 53 | + - postgres |
| 54 | + restart: unless-stopped |
| 55 | + |
| 56 | +volumes: |
| 57 | + postgres_data: |
| 58 | +``` |
| 59 | +
|
| 60 | +Now you can use visualize Ansitheus report using ARA (**don't forget to update `ARA_API.*` variables**). |
| 61 | + |
| 62 | +```shell |
| 63 | +docker run --name ansitheus --rm --network host \ |
| 64 | + -e ARA_API_SERVER=http://localhost:8000 \ |
| 65 | + -e ARA_API_CLIENT=http \ |
| 66 | + -v /tmp/test/sub:/etc/ansitheus \ |
| 67 | + -v /tmp/facts_cache:/tmp/facts_cache \ |
| 68 | + kiennt26/ansitheus:v2.2.0 deploy --inventory /etc/ansitheus/inventory.ini |
| 69 | +``` |
| 70 | + |
| 71 | +Result: |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
0 commit comments