Replies: 4 comments 8 replies
-
|
Overall really useful commands @raulb ! The ones that just read from the setup are the most useful to me. I can always edit the pipeline configuration myself, but it is veeery useful to easily see what does conduit understand about the configuration that I've written into it, how many connectors are available, have I installed them correctly, etc. |
Beta Was this translation helpful? Give feedback.
-
|
Seems comprehensive with ease of use in mind. It would be a nice to have to mark the commands that are interactive and the ones that require no further input. |
Beta Was this translation helpful? Give feedback.
-
|
I would also love to see this. It would make it easier to configure, deploy and interact with Conduit. Moreover, having cli commands available would make it easier for other tools (or even just bash scripts) to interact with Conduit via executing cli commands, rather than using the http api. For example, I just learned of this tool, which might be useful to replace and augment the deprecated web UI https://github.com/dagu-org/dagu, and it appears to just run cli commands @gedw99 do you have any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
|
👋 I'm happy to announce this has been added as part of the latest release, here's a blog post announcing it https://meroxa.com/blog/introducing-the-new-conduit-cli:-a-powerful-tool-for-managing-your-pipelines/ and some related changelogs |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
Conduit Binary offers a variety of configuration options necessary for setting up your streaming service with Conduit. These meticulously designed flags are tailored to streamline the service's functionality:
$ conduit --help Usage of conduit: -api.enabled enable HTTP and gRPC API (default true) -config string global config file (default "conduit.yaml") -connectors.path string path to standalone connectors' directory (default "./connectors") -db.badger.path string path to badger DB (default "conduit.db") -db.postgres.connection-string string postgres connection string -db.postgres.table string postgres table in which to store data (will be created if it does not exist) (default "conduit_kv_store") -db.type string database type; accepts badger,postgres,inmemory (default "badger") -grpc.address string address for serving the gRPC API (default ":8084") -http.address string address for serving the HTTP API (default ":8080") -log.format string sets the format of the logging; accepts json, cli (default "cli") -log.level string sets logging level; accepts debug, info, warn, error, trace (default "info") -pipelines.exit-on-error exit Conduit if a pipeline experiences an error while running -pipelines.path string path to the directory that has the yaml pipeline configuration files, or a single pipeline configuration file (default "./pipelines") -processors.path string path to standalone processors' directory (default "./processors") -version prints current Conduit versionWhile these flags serve specific purposes for running the service, they assume an already familiarized user with steps to have a pipeline(s) successfully configured. This setting up process requires prior knowledge of the following elements:
What I’m proposing here is adding additional commands to extend a Conduit CLI to support those needs.
All commands, even when presenting potential interactivity, should be able to run via arguments and never require a prompt. For more information, see the CLIG guidelines on arguments and flags.
Assumptions
connectorsalias toconnector. So they’ll be used interchangeably.pipeline restart,pipeline stop. Once a pipeline is running, the way to interrupt the processing will be the same as up until now.--pipelineflag will be optional and it’ll use the only pipeline.Step 0.
In order to accommodate new commands, I’d suggest moving existing root configuration options under
start. To maintain backwards compatibility, these options will remain available on root, but will be hidden when typingconduit --help.conduit startstart.conduit --helpwill show only the commands added to root.conduit help COMMANDas it’s usual on CLIs.Step 1. Getting started commands
When installing the binary for the first time, as a user, I’d like to have commands to help me getting started. Instructions we could refer to from our documentation for easy access.
Initializing a new pipeline:
initThis command will initialize a simple pipeline that shows some basic features of Conduit. One example pipeline could be
generatoras a source andlogas a destination (simplest setup, not requiring a provisioned resource).The idea is that right after
conduit inita user could simply doconduit runto show how Conduit works.Additionally, this command could include a dialog in which we could present some example pipelines so anyone could use (postgres to log, etc...). This would require including some Docker images for easier installation.
Running the conduit service
conduit startIf we wanted to introduce commands such as
stop, orrestart, thisstartcommand should return an ID that could be used to later be referenced. However, this discussion post is making the assumption that the CLI will run alongside existing Conduit binary.Step 2. Extensibility
Installing a new pipeline
pipelines install [--url] [--path]This command will browse through the existing pipelines examples created in a specific repository for this purpose when
--urlis not provided. Specifying a pipeline that contains standalone connectors or processors will automatically add them.When a url wasn’t specified, and optionally, to make the experience a bit less overwhelming, we could have a curated list on top and then others in case the user would like to explore more.
Edit a pipeline
pipeline edit NAME [--path]This command would open the
$EDITORto edit the associated pipeline configuration file.Listing available pipelines
pipelines ls [--path]It’ll list the registered pipelines in
--path(or/pipelinesas default).Removing a pipeline
pipeline remove [--force]This will require either deleting the
ymlfile completely (in the event of this one having only one pipeline) or deleting just the pipeline that’s contained in that file.Describe a pipeline
pipeline describeDescribes a pipeline showing name, connectors, and processors.
$ conduit pipelines describe NAME EXAMPLES $ conduit pipeline describe kafka-to-kafka Source: kafka Processor: avro.encode Destination: kafkaInstalling a new connector
connector install [--url]This command will install any standalone connectors available via ConduitIO Labs and will add it the
connectorsdirectory by default or to--pathwhen specified via that flag. If--urlis not provided, it’ll browse through a list of available connectors to be selected, and then installed.$ conduit connectors install [--url] [--path] $ conduit connectors install --url https://github.com/conduitio-labs/conduit-connector-mongo Installing conduit-connector-mongo connector... Done!Once installed, it’ll be available to use by any pipeline afterwards via
connector add NAME --pipeline NAME.Uninstall a connector
connector uninstall NAME [--path]This command will remove the specified standalone connector. If it’s used by a pipeline will require confirmation. The
--confirmflag can be used to bypass the confirmation warning.Listing available connectors
connectors lsThe ones that could be used locally (builtin + standalone). This list will indicate in what pipelines are being used (if they are). The idea of this command is to illustrate what connectors are already available if they were configured in a pipeline. This list would indicate how to reference the connector to make it easier.
Describe a connector:
connectors describe NAMEThis command could be used to describe the configuration needed, and if it’s used by a pipeline.
Add a connector to a pipeline
connectors add NAME --pipeline P-NAME --source | --destinationOnce a connector has been installed, it’ll be ready to be used. If a user attempts to add a connector that’s not available yet, it’ll prompt to install it first. Adding will require configuration parameters that will depend on each connector. These options will be added to the pipeline, but the user will need to edit the pipeline afterwards. The optional options will be added to the pipeline configuration file, but commented out.
$ conduit connectors add plugin-name@version --pipeline pipeline --source # e.g.: $ conduit connectors add postgres --pipeline my-pipeline --destinationRemoving a connector
connectors remove NAME --pipeline P-NAMEThis will remove the connector configuration used by the specified pipeline. It’ll check if it’s used by a pipeline and will prompt configuration ahead of time.
Init a processor
processor init [NAME] [--lang]This will initialize a processor with the specified language (we’ll start with Go as default). Eventually, we could use the provided lang to indicate how to build one using a different language. We should have a processors template to have the same experience with pipelines and connectors. We’ll start with a simple processor such as the one in our documentation.
Listing available processors
processors lsThe ones that could be used locally (builtin + standalone ones):
Install a processor
processors install [--url]Similarly to connectors, when
--urlis not specified, it’ll browse through a list of available standalone processors.Uninstall a processor
processors uninstall NAME [--force]If a processor is being used by a pipeline it’ll mention it to confirm. Only standalone processors could be uninstalled.
Adding a new processor
processors add NAME --pipeline P-NAMEWill add an available processor (all builtin + any standalone that could be available) to the specified pipeline.
Removing a processor
processors remove NAME --pipeline P-NAME [--force]Remove a processor used in a specified pipeline.
Describe a processor
processors describe PLUGINShow the available options for any processor that’s available (all builtin ones + the standalone that have been added).
Building a processor
processor build NAME [--path]# GOARCH=wasm GOOS=wasip1 go build -o processor.wasm cmd/processor/main.go` $ conduit processor build NAME [--path]Step 3. Maintenance
Check pipelines via
doctorThis will check whether there’s a more up to date version of conduit and if some connectors / processors could also be updated.
Beta Was this translation helpful? Give feedback.
All reactions