tdviet / fedcloudclient

EGI FedCloud Client
https://fedcloudclient.fedcloud.eu
MIT License
8 stars 10 forks source link

Adding configuration file #86

Open tdviet opened 3 years ago

tdviet commented 3 years ago

The fedcloudclient becomes more complex, there are many default values in the codes and environment variables. A configuration file ~/.config/fedcloud/fedcloud.ini could add some flexibility and simplify initial setting.

The configuration file could be useful for:

Example of use cases:

In both cases, simply change URL of site configuration in the fedcloud.ini file to the location of the customized site list is sufficient.

tdviet commented 2 years ago

The new fedcloud.config should read the config file and also environment variables, then set global variables including default site and VO according. That can work around the bug of requirement checking in the click-option-group lib mentioned in https://github.com/tdviet/fedcloudclient/issues/150

tdviet commented 2 years ago

Configuration file is critical also for other issues:

tdviet commented 2 years ago

Adding configuration file and related issues will need revisions of all components and may break some compatibilities. Therefore, a major version 2.0 will be released with all the changes together.

tdviet commented 2 years ago

First draft of config.py in branch 2.0-alpha: https://github.com/tdviet/fedcloudclient/blob/2.0-alpha/fedcloudclient/config.py