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
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
Changes include:
* Custom admin app config instead of monkey patching attributes.
* DRF Routers & Viewsets instead of manual view configuration.
* nested viewsets from drf-extensions (for now) to scope files to playbooks.
* Removed media serving since runserver does this alreay in dev;
deployment will need another option anyways.
Change-Id: I409bd3f7faa5f133fcb204613baebf2512d34c1a
Otherwise it won't work because the API server listens on 127.0.0.1,
not localhost.
The right fix is probably to set the nodejs server to start on
127.0.0.1, though.
Figure this out later.
Change-Id: I260e794e8ff842f6b854d313d6c243e431220fcd
- Make the project installable with pbr
- Use tox to run tests, build docs, runserver
- Flesh out the README a little bit
- Real docs is WIP.
Change-Id: I3dc92250cd93add0cdf11c6a67d8f1081560d4e1