The controller fqdn that ran the playbook is now recorded and can be
searched for both in the UI and the CLI.
Fixes: https://github.com/ansible-community/ara/issues/193
Change-Id: I53e8d158fc3b6ba7a16582234aaa2542eab5fcdc
- add debug logging and recover the log files
- discard database and settings file between container tests
Change-Id: Ifd8a8d544c4c550873a9eb586de038710a60ba05
Threading is prone to database lock exceptions when using the default
database backend (sqlite) and so disable it by default.
Users can enable threading when using mysql or postgresql by specifying
the ARA_CALLBACK_THREADS environment variable or callback_threads in
ansible.cfg.
Fixes: https://github.com/ansible-community/ara/issues/195
Change-Id: I80edfd6268684722c2783e01323355d791c19b9d
- Install which (because it's sometimes not installed by default)
- Fedora 33 images are out now, build and publish them
- Remove PyYAML workaround that is no longer necessary
Fixes: https://github.com/ansible-community/ara/issues/192
Change-Id: Ia64455655cd37299d84c657a3dc87e079f92f790
Variable precedence is higher in the playbook than from the job vars
which are provided through the inventory.
Use another variable and default properly instead.
Change-Id: I8c5cf72c78ea01ba1bc0a6fef2f9499837e9b262
With the coming rate limiting on docker hub, users might want to have an
alternative to pull from.
Change-Id: I35714fdd069165c9766371c83393aa431237ccec
The playbook creates a specified number of fake hosts (as localhost)
and runs a task file against them a specified number of times.
By default it will create 25 hosts and run 50 tasks against them,
providing 1250 results.
Change-Id: I88642041d8cee3c11f9d993d6dca245d7eb33f8e
It turns out that we had been missing out on handler tasks because we
need to use the hook "v2_playbook_on_handler_task_start" for those.
Fixes: https://github.com/ansible-community/ara/issues/178
Change-Id: Id05ba581fb22eee26270c7f4bccc3445e87b5d3b
When querying the API for a playbook's detail, it would return all of
it's children (hosts, files, tasks, results) which could be very slow
when dealing with larger playbooks.
We no longer do that for playbooks as well as plays and tasks.
Instead, we can easily find a playbook's resources by searching for them
with the playbook id like so:
- /api/v1/plays?playbook=<id>
- /api/v1/tasks?playbook=<id>
- /api/v1/results?playbook=<id>
... and so on.
This commit adapts the built-in UI because it would've otherwise been
broken by the change.
Fixes: https://github.com/ansible-community/ara/issues/158
Change-Id: I442bff657e5da9d6a3916ebdbc5e66c0e670b00f
- Merge documentation about plugins and their use cases in a single page
- Improve documentation about plugins and their use cases
- Streamline docs on setup helpers
- Expand toctree on the index from 2 to 3 to include deeper headers
- Rename and re-order sections
- Generally decapitalize ara
- Generally remove personal pronouns (you, your, etc.)
- Allow line lengths up to 120 up from 80
Change-Id: If79a47ff66fc90415ed74f8507c3fe82d4f3488d
This leverages the contribution from Fabian [1] for building an image
based on CentOS8.
The image will be built and tested for every new patch with Zuul and
it'll be pushed to DockerHub [2] after every merge.
The tag nomenclature had to be changed in order to fit the distribution
as an attribute, before:
- latest (tagged from source-latest)
- pypi-latest
- distribution-latest
- source-latest
to:
- latest (tagged from fedora32-source-latest)
- fedora32-source-latest
- fedora32-distribution-latest
- fedora32-pypi-latest
- centos8-pypi-latest
[1]: 8491cc5a72
[2]: https://hub.docker.com/r/recordsansible/ara-api
Change-Id: I971abd97039a28e825b6b7cd43a7559abe709f30
The role no longer works since a change that now prohibits local
execution on the executor [1] and this makes the jobs hit POST_FAILURE.
It is not critical so disable it while we figure it out.
[1]: https://review.opendev.org/#/c/742229/
Change-Id: I127463ae0fa6661e72d77d5af960062f7abdf134
The mustache brackets and the semicolon were confusing yaml and ansible:
template error while templating string:
expected token 'end of print statement', got ':'.
Change-Id: I34cbfc8132ce698da9dcef23f54ae3869b294a1d
At the end of CI jobs that involve running Ansible playbooks which take
care of integration tests, we generate a static report that is linked in
the Zuul build artifacts.
Putting it in the server directory makes sense and it's easier to align
everything with that.
Change-Id: I3070efd025ed63591b888e721e8556c3bac1d2b7
This inherits from the "ara-container-images" job that already builds
and test container images, this additional job just publishes the
resulting images.
Change-Id: I456eb2ae942bcb8dbd4206c2858b2e408995ae30
This contributes scripts to build and run ARA API server container images.
Both use a Fedora base image but one installs ARA from source while
the the other installs ARA from fedora packages.
The images are set up to use the gunicorn application server and include
the necessary libraries for users that wish to use the postgresql or
mysql backends.
The scripts are tested with the included playbooks and zuul job.
Change-Id: If85210395dd3d93c80da83fd69b86eecfa0185ef
On the offchance that the download of the container image fails, we
should retry to avoid failing for a momentary network error.
Change-Id: I60f7486f3fee996e71804372ddc0faff18294c64
This will allow the ansible.cfg file to get picked up by log collection
in order to see what the templated file looks like.
Also fix stray double quotes for labels.
Change-Id: I311cbf99c070ef4b34ec112a134af9b015e64493
zuul.change isn't available in the post and periodic pipelines so we
shouldn't try to include it.
We're splitting this into a different file so we can add more things
later.
Change-Id: I53a257aafba395e07afc0a1755e26cab28c1b2f0
This adds a secret for authenticating with the live demo instance,
and a job which runs basic integration tests. The results of these tests
are sent to the live demo instance.
The job is set to run in the "post" Zuul pipeline so the secret cannot be
exposed by speculatively testing a job change.
Change-Id: I8a7926ed547b1acb4b7021ca7c63abb9d68c0ac9
These new action and lookup plugins makes it easier to query ARA from
inside a playbook.
In terms of practical use, this first iteration allows us to have an
integration test playbook that asserts some of ARA's features such as
playbook names and labels.
Change-Id: I38bea1062f0002886ecde70827f70d27248a1868
This allows users to set default playbooks labels without needing to
specify the 'ara_playbook_label' variable.
In practice, it can be used to set labels on playbooks without needing
to modify playbooks or the playbook vars.
Fixes: https://github.com/ansible-community/ara/issues/95
Change-Id: Ib1d3b33d1766905061e5534677764aa9c42a99b0
The latest supported version of Ansible (currently 2.9) is used in
integration test jobs unless specified otherwise.
The basic integration test jobs ensure that we have coverage for all
currently supported versions of Ansible as well as devel to let us know
if there are any upcoming breaking changes.
Change-Id: I1745f0cf22f802aba5bf7f3d120a6b03ac88a1dd
This removes the job "ansible-role-ara-api-fedora-distributed-sqlite" and replaces
it by "ara-api-distributed-sqlite".
The job tests the support for the distributed sqlite database backend
Fedora and Ubuntu simultaneously, allowing for the addition of CentOS8
in the future.
Change-Id: I5851b4364fd567799e92feda5c41b34e5a22dc49
This removes the job "ansible-role-ara-api-ubuntu-postgresql" and replaces
it by "ara-api-postgresql".
The job is designed to have a single database server with multiple
API servers on different Linux distributions in order to get test
coverage for Ubuntu, Fedora and soon, CentOS8.
Change-Id: I2ffa6b7e1d97359e3924a7faf842340e6eb39bbe
This removes the job "ansible-role-ara-api-ubuntu-mysql" and replaces
it by "ara-api-mysql".
The job is designed to have a single database server with multiple
API servers on different Linux distributions in order to get test
coverage for Ubuntu, Fedora and soon, CentOS8.
Change-Id: Ia4916938039cf5566b1e71e4518b9c5e958ca872
This patch is self tested by the addition of a new job that exercises
the role with the packages but it does not test the current source yet.
In order to test the current source, we'll need to set up a job that
builds a package from the current source and then configure the job to
install from these built packages.
Change-Id: Ic326a5243b55b415cd31b8a5702fe92d5dfe0651
When deploying without a virtualenv, we need to supply a PATH where the
python and ara-manage binaries are likely to be found.
Change-Id: Ie9b498f988a026a2568cc445ef444fe2f90c837b
It turns out base_name was deprecated in 3.9 [1] and was just removed in
3.11 released today.
This is squashed with an integration test fix which adds another error
case handling.
[1]: 7095021db7
Change-Id: Icfbd94e40b9efd7c750cfa72a49bdbf930ad8fc6
This is an attempt to prevent encoding errors when posting results or
when rendering them in the API and built-in interface.
Setting UNICODE_JSON [1] to false allows the callback to post results'
content and allows the API browsing interface to render the result.
The built-in UI had a similar problem but isn't fixed by the
UNICODE_JSON because we are using a Response object so use
"surrogateescape" instead.
Related: https://github.com/ansible-community/ara/issues/48
[1]: https://www.django-rest-framework.org/api-guide/settings/#unicode_json
Change-Id: I48bcef440a1ee9c8574fdd24d5c05ef0f13ca666
Considering the (re-)implementation of a built-in web report interface,
it makes sense to move the default back to ara-report instead of
ara-api.
This results in:
- /ara-report/: the web report interface
- /ara-report/api/v1/: the API
Change-Id: I06cdc07f26a39dc356284a2a549f0ea3a4935e1a
This new feature is an implementation equivalent to the sqlite
middleware from 0.x but in Django instead of Flask.
It uses a WSGI middleware to map an URL to a location on
the filesystem which is then loaded by the database backend.
Fixes: https://github.com/ansible-community/ara/issues/57
Co-Authored-By: Florian Apolloner <florian@apolloner.eu>
Co-Authored-By: David Moreau-Simard <dmsimard@redhat.com>
Change-Id: I338dae2fabda2af7fd0a75c795c7b4fd6b179940