-
Notifications
You must be signed in to change notification settings - Fork 24
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
RFC: Unified OpenSearch Command Line Interface (opensearch-cli) #18
Comments
I really like the idea of having a single installable with different modes based on the use case (i.e. SQL mode, PerfTop mode, etc). For the questions. on number 1, I'd be curious to see what people use. I think as a starting point hosting the installables on the website will be the most useful, but I can imagine Homebrew and apt could be useful to add at some point. For number 2 I definitely see some pros and cons to both approaches. Coupling the versions would make it easier to know with version of the CLI is compatible with which version of OpenSearch. However, each time we build a new minor version of OpenSearch, we would need to build and release a new version of the CLI, even if there isn't new functionality. Decoupling has the pros and cons reversed where the con is it might be harder to understand which versions are compatible with corresponding versions of OpenSearch. The pro is that these can move independently. I personally lean towards decoupling. |
Have you looked at how Git subcommands are designed? Looks very similar to your proposal. I like the simplicity of separate binaries in a predefined bin folder (or even on user's PATH), and a man page per sub command. It would not be a disadvantage if 3rd party plugins were able to install sub commands as well. You'd first install the plugin into opensearch, and then run another command if you also want to install a cli sub command. |
Thanks for sharing this @janhoy! I like the idea of being able to install subcommands under the main CLI. I'm now thinking if we had a common package manager/place to store the subcommand binaries, we could make the experience of installing them pretty simple; something like |
This is a reasonable proposal, but it's clear from above comments that beyond gluing the clients together we want an extensibility framework, and that the framework is not reinvented but something established is reused. Another example, the meta project allows for plugins, such as meta-gh, which can be authored and installed on top of the meta CLI. Thus I'd expect that someone could author a plugin (e.g. Additional thought: I would like some standardized parameters. I definitely would not want to have to specify |
The purpose of this request for comments (RFC) is to introduce our plans to provide a unified command line tool (cli) for users to interact with OpenSearch. This RFC is meant to cover how we plan to integrate the SQL, PerfTop, and OpenSearch cli into one. We do not cover implementation details and architecture. We would like to collect feedback and discuss our plans with anyone interested.
Problem Statement
OpenSearch and its plugins adopted REST based mechanism for interaction. With more than 10 different and continuously evolving OpenSearch plugins, we think it is important to provide a unified command line interface to help people use these plugins from a single tool. Today, we have three different kind of command line interfaces, namely
opensearch-cli
,opensearchsql-cli
andperftop-cli
. These command line interfaces are hosted, built, released and distributed independently. As OpenSearch user, I have to download those three command line interface from three different place, update those CLI whenever new version is released individually and configure my preferences in multiple places.Proposed Solution
We are planning to integrate all three cli into one universal cli, since, OpenSearch and its plugins are distributed together, it makes sense to integrate all three different command line interface and provide one binary artifact for our users to download and update at one place to get latest features.
These three different CLIs are meant for three different personas and they are carefully implemented by selecting the best framework choice for their users. Hence, we want to keep the essentials of individual CLI and provide one package/artifact for end user to download and use it.
We are proposing that different cli artifacts will be developed separately but shipped together as a part of one binary. Later, these different CLI will be invoked based on the wake word/sub command from
opensearch-cli.
What does this look like for
opensearchsql
users?What does this look like for
perftop
users?This solution works well for following reasons
Providing Feedback
If you have comments or feedback on our plans for OpenSearch Command Line Interface, please add it here to discuss. Some other questions we’re seeking feedback include
The text was updated successfully, but these errors were encountered: