The ara-server standalone repository is being discontinued.
The clear and logical separation of components was nice but the overhead
in complexity was not worth it.
Change-Id: I9d5e3096db4972405932ae2af46ee63bfeef43b5
DurationSerializer provides the duration of items that have "started",
"updated" and "ended" fields.
Change-Id: Ieeab1e1cc046b7ec52a0f86c5a38fe9c9ec6f7ad
Dropping the default prefix from the default settings file allows a user
to run an ARA production config by just changing that file. This seems
more in line with default configuration search paths of most other
programs out there.
Since the generated SECRET_KEY should be safe, there should be no
problem in reusing the generated file.
Change-Id: I1cfbc04cba378d7bda9386b344efae85b3490296
This will tell them:
- If we created SERVER_DIR (info)
- If we generated a random SECRET_KEY (warn)
- What configuration file (ARA_SETTINGS) is in use (info)
Change-Id: I6a1bbc0032fc1d73859e9c7c3efec463e1574416
If there are no SECRET_KEY or ARA_SECRET_KEY environment variables
set or if there is no configuration file with the SECRET_KEY variable
set, settings.py will generate a random secret key once and it will
be persisted to the default configuration.
Change-Id: Idf2f1ee5f8a70bc2411de51a154bc4504705d89a
We need to serialize the value provided by ara_record since
the values can be structured data such as lists, dicts or json.
Editorial note: the value field in ARA 0.x was already serialized
so this is considered a bug fix.
Change-Id: I9beea4a755db077806952d3fdf7cbb04aaad3209
Files are now (once again) related to playbooks.
We expect the playbook to be created first and then it's files are
created and associated to it.
- the /api/v1/playbook/<id>/files endpoint was removed
- the playbook id is now required when doing a POST on /api/v1/files
- playbook.file referenced a file object and no longer exists.
- playbook.file was replaced by "path" which is the path for the playbook
file.
- playbook.files still exists but, from an API standpoint, this means
that to find the files associated to a playbook, we can now do
something like:
"/api/v1/files?playbook=%s" % playbook.id
To find the playbook file itself, we can do something like:
"/api/v1/files?playbook=%s&path=%s" % (playbook.id, playbook.path)
Change-Id: Id51129757e1626313caee4005b081027e5694aba
This changes the configuration engine from everett to dynaconf.
dynaconf allows loading configuration from files (json, ini, yaml, toml)
as well as environment variables prefixed by ARA_.
Our usage of dynaconf is similar to the use case from the Pulp [1]
project and they have documented an issue when loading database
parameters [2]. This issue is worked around by importing dynaconf in the
different entry points.
This introduces some other changes as well:
- We're now creating a default configuration and data directory at
~/.ara. The location of this directory is controlled with the
ARA_BASE_DIR environment variable.
- We're now creating a default configuration template in
~/.ara/default_config.yaml.
- The default database is now located at ~/.ara/ara.sqlite. The location
of this database can be customized with the ARA_DATABASE_NAME
environment variable.
Note that ARA 0.x used "~/.ara/ansible.sqlite" -- the file name change
is deliberate in order to avoid user databases clashing between
versions.
More documentation on this will be available in an upcoming patch.
[1]: https://github.com/pulp/pulp
[2]: https://github.com/rochacbruno/dynaconf/issues/89
Change-Id: I8178b4ca9f2b4d7f4c45c296c08391e84e8b990d
This moves manage.py inside the package and sets up an "ara-manage"
console entry point for doing something like "ara-manage runserver"
instead of "python manage.py runserver".
Putting this under __main__ also allows users to do "python -m
ara.server".
Change-Id: I86b57f11fed2fea0295b1980e2734e35289d84f3
We want a bit more granularity regarding the status of the
tasks, "completed" is not enough.
In 0.x, the status was inferred at runtime. We'll set it so we don't
need to compute it every time.
Change-Id: Idf2dbe9cde1b0cc8da1cbb7fe94894f1a06ea9cd
We want a bit more granularity regarding the status of the
plays, "completed" is not enough.
In 0.x, the status was inferred at runtime. We'll set it so we don't
need to compute it every time.
Change-Id: I0184aab6cf1f839165fdcfdab4b7f567ec44442e
1000 items per page is kind of big.
100 is still big but it's a better default number to start with.
Change-Id: I2759fe14e638e784afd017018b0ecaa474e2d39a
Sadly everett parses lists wrongly in configObj, this patch disables it
and also aborts after the first found config file (like the docs
suggest).
Change-Id: Ib1d94a7c523c42087e20f959e6133f4d9e220f4d
Removed the default search filter because django-admin-like FTS is not
something we want.
Removed the default ordering filter because it enables ordering by all
fields by default which can result in security issues.
Change-Id: I4438d592982a61a1b33956804ecf7769e41197c3