CSCfi / pebbles

Pebbles is a frontend to manage cloud resources and lightweight user accounts.
MIT License
7 stars 6 forks source link

Remove database dependency from configs #607

Closed Jyrsa closed 7 years ago

Jyrsa commented 7 years ago

We're moving towards running a docker image created with OSOs s2i for the worker and API roles. To remove confusion about which config comes from where and applies to what we should remove the editable global configs in the admin UI.

Driver-specific configs can be maintained as part of NamespacedKeyValue s once they are editable. Especially the DD_SHUTDOWN_MODE.

The desired new order of priority for configuration values is

1) environment variable, (to be set when starting the container) 2) a config file, under /etc/pebbles/config.yaml 3) defaults, as stated in conf.py when defining the config objects

Additionally, a manage.py command called listconfig similar should exist to easily check exactly the configuration inside a container. It should resolve each config variable and print they key and value to stdout.

This way we can avoid cluttering the ENV with all of the zillions of trivial config items (e.g. INSTALLATION_NAME), easily add per-container specific environment variables to e.g. configure DockerDriver worker and OpenShiftDriver worker differently at container startup time and use the same image for both. Additionally the API container can be the same image but different entrypoint.

apurvann commented 7 years ago

Sub-Issues: Manage command : https://github.com/CSCfi/pebbles/issues/608 UI changes: https://github.com/CSCfi/pebbles/issues/609