confluent-hub install

Description

Install a component from Confluent Hub.

Usage

confluent-hub install [ --component-dir <componentDir> ]
                      [ --dry-run ]
                      [ --no-prompt ]
                      [ --verbose ]
                      [ --worker-configs <workerConfigs> ]
                      [--]
                      <id>

Tip

For usage information, enter confluent-hub help install.

Options

Name Default Description
--component-dir <componentDir>  

The local directory into which components are installed. Defaults to $share/confluent-hub-components when running the client in an archive installation of Confluent Platform, and to /usr/share/confluent-hub-components when running the client in a deb/rpm installation.

This options value must be a path that must exist on the file system. The provided path must be readable and writable.

--dry-run   Simulate an operation without making any changes, but instead simply reporting all of the steps and changes that would normally be made by the operation.
--no-prompt   Do not ask for user input, proceed with default and recommended values.
--verbose   More detailed output of a command.
--worker-configs <workerConfigs>   Paths to one or more Connect Worker configuration files whose plugin path may be updated to include component directory so Connect can find the newly installed component. Delimit multiple paths with a colon (:).
--   This option can be used to separate command-line options from the list of arguments. Useful when arguments might be mistaken for command-line options.

Positional arguments

Name Default Description
<id>   Identifier of the form owner/component:version for the component in Confluent Hub, or the path to a local ZIP file that was downloaded from Confluent Hub.

Example

To install the latest version of Confluent's JMS connector, which has a component name of kafka-connect-jms and owner confluentinc:

confluent-hub install confluentinc/kafka-connect-jms:latest

This runs the tool in interactive mode to install software, so it first verifies that you want to install this component:

Do you want to install this into /Users/jsmith/confluent-5.3.0/share/confluent-hub-components? (yN)

If you enter N, the tool with exit after doing nothing. If you enter y, the client will continue and will output more information:

Downloading component Kafka Connect JMS 5.3.0, provided by Confluent, Inc. from Confluent Hub
and installing into /Users/jsmith/confluent-5.3.0/share/confluent-hub-components

Detected Worker's configs:
  1. Standard: /Users/jsmith/confluent-5.3.0/etc/kafka/connect-distributed.properties
  2. Standard: /Users/jsmith/confluent-5.3.0/etc/kafka/connect-standalone.properties
Do you want to update all detected configs? (yN)

If you enter N, the tool with exit after doing nothing. If you enter y, the client will continue and will output more information:

Adding installation directory to plugin path in the following files:
  /Users/jsmith/confluent-5.3.0/etc/kafka/connect-distributed.properties
  /Users/jsmith/confluent-5.3.0/etc/kafka/connect-standalone.properties

Completed

The specific directory paths and configuration files on your system may vary when you run the Confluent Hub client on your Confluent Platform installation.

Dry Run

The Confluent Hub client installs software, so to be cautious you may first want to run it without actually changing any part of your system. That's what the --dry-run option does. In this case, the output will begin with:

Doing a dry run of a command

and end with

A dry run has been completed successfully. All requirements are met. You can proceed with the installation.

You may also want to combine the --dry-run and --verbose options to instruct the client to output more detail about what it would do if it were not performing a dry run.

Scripting

The Confluent Hub client has been designed to be used within scripts and even within Dockerfiles where it is accessible. There are a couple of options that give you ultimate control over the installation process.

The first is the --no-prompt option, which instructs the client to never prompt for user input and to instead use the default value for all inputs unless otherwise specified.

The second is the --component-dir <componentDir> option, which specifies the local directory into which it will install the component. Specify the directory using a relative or absolute path.

The third is the --worker-configs <workerConfigs> option, which specifies all of the Connect worker configuration files that should be examined and possibly modified to ensure the plugin.path configuration property includes the component directory. Delimit multiple paths with a colon (:).

Finally, the client's error codes provide information about what, if anything, went wrong during an installation.