SmartModule Hub

Introduction to the SmartModule Hub Service

The SmartModule Hub offers ready-to-use packages for easy Fluvio pipeline construction, letting users focus on business logic. It provides tested modules with high-level configurable inputs, supporting a mix of Hub packages and custom SmartModules without requiring module rebuilds.

A view of available and installed SmartModules is accessible from both the fluvio cli.


Fluvio Hub Smartmodule Commands

Commands for users to interact with the SmartModule hub are under the fluvio hub smartmodule set of commands.

  • fluvio hub smartmodule download group/package@version
  • fluvio hub smartmodule list

fluvio smartmodule hub download

Download SmartModules - locally or to cluster (default)

Usage: fluvio hub smartmodule download [OPTIONS] <name>

          SmartModule name: e.g. infinyon/jolt@v0.0.1

  -c, --cluster <host:port>
          Address of cluster

          Enable TLS

          TLS: use client cert

      --domain <DOMAIN>
          Required if client cert is used

      --ca-cert <CA_CERT>
          Path to TLS ca cert, required when client cert is enabled

      --client-cert <CLIENT_CERT>
          Path to TLS client certificate

      --client-key <CLIENT_KEY>
          Path to TLS client private key

  -P, --profile <profile>

  -o, --output <PATH>
          Download package to local filesystem

          given local package file, download to cluster

      --remote <REMOTE>

  -h, --help
          Print help (see a summary with '-h')

The command fluvio hub smartmodule download group/package@version will download a hub smartmodule into your cluster so it can be configured and used in your pipeline.

$ fluvio hub smartmodule download infinyon/regex-filter2@0.1.0

downloading infinyon/regex-filter2@0.1.0 to infinyon-regex-filter2-0.1.0.ipkg
... downloading complete
... checking package
trying connection to fluvio
... cluster smartmodule install complete

Once a package is downloaded, a fluvio smartmodule list command will show the installation

$ flvio sm list
  SMARTMODULE                   SIZE     
  infinyon/regex-filter@0.1.0   316.1 KB 

Once a SmartModule is download, it can be configured and applied in a pipeline. See the SmartModule page for more details on how work with SmartModules once they are downloaded in your cluster.


fluvio hub smartmodule list

The command fluvio hub smartmodule list will list SmartModules and versions available for download

List all available SmartModules

Usage: fluvio hub smartmodule list [OPTIONS]

  -O, --output <type>
          [default: table]
          [possible values: table, yaml, json]

      --remote <REMOTE>

  -h, --help
          Print help (see a summary with '-h')

The list command shows Smartmodules by group/package@version in the SMARTMODULE column. The Visibility column describes if the package is accessible to public or private views. If package visibility is private only your user login can list or download the package. Packages uploaded by InfinyOn will be in the infinyon group.

$ fluvio hub smartmodule list 

  SMARTMODULE                  Visibility 
  mypriv/foo-priv@0.1.1        private    
  infinyon/jolt@0.1.0          public     
  infinyon/json-sql@0.1.0      public     
  infinyon/regex-filter@0.1.0  public

SmartModule Packages

SmartModule Packages are listed in the hub as in the form of <group>/<package name>@version.

Packages in the infinyon group are published by InfinyOn, the creators of Fluvio. Third-party developers can upload public packages under different groups. The Hub enforces signing and publishing restrictions on uploaded packages. Once a signed package is published in a group, only the group owner can update it or add new packages within that group.


Private and Public Packages

By default, published packages are private. To make a package public, set it to public using the following CLI commands:

cd smartmodule-dev-dir
smdk set-public

Once set to public, you’ll be prompted for verification on every publish. Note that once a package version is publicly published, it cannot be revoked.