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
This is a first iteration on basic security and authentication
documentation. It documents the security settings users might want to
pay attention to and explains how to configure them.
We're bumping the version of sphinx in order to enable the
"autosectionlabel" extension so we don't need to create explicit
labels for sections.
Change-Id: I694eb1a2aa03193335f11cbda40ed6962357c428
ara-infra now provides a new and improved set of integration jobs
so we no longer need to have the ansible-integration job.
These new jobs test ara-server, ara-clients and ara-plugins against
a variety of operating systems and versions of Ansible.
It was convenient to be able to run these tests from ara-server by
itself, we'll re-introduce a wrapper so we can continue to do so
later.
Depends-On: https://review.openstack.org/#/c/630303
Change-Id: Iedf259e44af5165be08c5d6917e5af98b281202d
Update docs to reflect that in https://review.openstack.org/#/c/631011/
we made SECRET_KEY optional to launching ara-server by randomizing a
key if none are supplied by the configuration.
Change-Id: I469663082ed6071db250c8152430ea1e8d61b500
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
manage.py is a standard in Django projects and it is expected to
be available at the root of the repository.
We're keeping the ara-manage entry point so this is just a symlink
to ara/server/__main__.py.
Change-Id: I0819479e978eac1269d7e48e709bed0f59c9fe5e
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
It was used in the previous implementation of settings.py which has
since been replaced with dynaconf.
Change-Id: Id8bca7a35cbc817120e04d3fc6247eaee48bef01
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