Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement proposal] Configuration profiles #1068

Open
aitorarjona opened this issue Feb 27, 2023 · 2 comments
Open

[Enhancement proposal] Configuration profiles #1068

aitorarjona opened this issue Feb 27, 2023 · 2 comments

Comments

@aitorarjona
Copy link
Contributor

Currently, Lithops can be configured:

  • by a config YAML file in ~/.lithops/config
  • by ENV vars
  • by directly passing configuration path or dict to a FunctionExecutor constructor

The standard and most convenient is using a configuration file. The problem with having only one config file is that, for a multi-cloud configuration, all parameters reside in the same config file, potentially being a mess.

I propose to create configuration profiles. The "default profile" is the ~/.lithops/config file, but users could create new config files with different names (e.g. ~/.lithops/aws_lambda_testing), and select the appropraite profile in the FunctionExecutor constructor (FunctionExecutor(config_profile="aws_lambda_testing")).

WDYT @JosepSampe

@JosepSampe
Copy link
Member

Yes, good idea @aitorarjona
Do you have an example of what the configuration file with profiles should look like?

@aitorarjona
Copy link
Contributor Author

aitorarjona commented Feb 28, 2023

The idea is to keep ~/.lithops/config file as the default profile for backwards compatibility, which will look the same as always, for example:

lithops: 
    backend: localhost
    storage: localhost

localhost:
    worker_processes: 1

for testing.

Another profile for, for example, IBM Cloud in file ~/.lithops/ibm would look like this:

lithops: 
    backend: ibm_cf
    storage: ibm_cos

ibm_cf:
    endpoint : ...
    namespace : ...
    api_key : ...

ibm_cos:
    storage_bucket: ...
    region : ...

and to select this configuration profile:

FunctionExecutor(config_profile="ibm")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants