Refactor configuration to use dynaconf
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 commit is contained in:
committed by
Florian Apolloner
parent
6c00d7552b
commit
16aa41eaf8
@@ -6,4 +6,4 @@ django-cors-headers
|
||||
drf-extensions
|
||||
django-filter
|
||||
django-environ
|
||||
everett
|
||||
dynaconf
|
||||
|
||||
Reference in New Issue
Block a user