You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Zheaoli (via GitHub)" <gi...@apache.org> on 2023/03/17 06:03:50 UTC

[GitHub] [incubator-opendal] Zheaoli commented on issue #422: Tracking issues of RFC-0423: Command Line Interface

Zheaoli commented on issue #422:
URL: https://github.com/apache/incubator-opendal/issues/422#issuecomment-1473189339

   > @Xuanwo Hi, `oli` seems to be an awesome tool rocket I would like to get involved in the development!
   > 
   > Before I can start, I would like to introduce a config file to `oli`. IMHO a single config file is easier to manage than a handful of env vars.
   > 
   > The config file consists of multiple `profile`s, each `profile` represents a service users want to access. Users are able to specify the endpoint, credentials and other necessary parameters in each `profile`. The config file might look like this(the format doesn't matters, I just prefer toml now):
   > 
   > ```toml
   > # ~/.oli/config.toml
   > 
   > [[profiles]]
   > name = "mys3" # required
   > service = "s3" # required
   > endpoint = "" # optional
   > access-key = "<redacted>"
   > secret-key = "<redacted>"
   > 
   > [[profiles]]
   > name = "myaz" # required
   > service = "azblob" # required
   > endpoint = "" # optional
   > access-key = "<redacted>"
   > secret-key = "<redacted>"
   > ```
   > 
   > When users want to interact with multiple services, like copying objects across services, they need to run
   > 
   > ```
   > oli cp mys3://bucket/1.txt myaz://bucket2/1.txt
   > ```
   > 
   > Please note that the profile name is used as scheme to distinguish different services here.
   > 
   > I think the advantages of the config file over env vars including but not limited to:
   > 
   > 1. it is easier to manage a config file than exporting a lot of env vars in a shell rc file
   > 2. the config file can be strongly typed(like toml), it is easier to validate the config
   > 3. it is more straightforward to see which service has been configured with a config file
   > 
   > @Xuanwo WDYT?
   
   I think we can hide the bucket from the path and move it into the config profile?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org