Skip to content

Install a package

Packages provide a flexible approach for combining operators, pipelines, contexts, and examples into a unified deployable unit.

The most convenient way to install a package is through the Tenzir Library:

  1. Click on a package
  2. Select the Install tab
  3. Define your inputs (optional)
  4. Click the Install button in the bottom right

To install a package interactively in TQL, use the package::add operator:

package::add "/path/to/pkg"

This installs the package from the directory /path/to/pkg. Pass an inputs record to adjust the package configuration and replace the package’s templates with concrete values:

package::add "package.yaml", inputs={
endpoint: "localhost:42000",
policy: "block",
}

Your package now appears when you list all installed packages:

package::list
{
id: "your-package",
install_status: "installed",
// …
}

To uninstall a package interactively, use package::remove and pass the package ID.

package::remove "your-package"

For IaC-style deployments, you can install packages as code by putting them next to your tenzir.yaml configuration file:

  • Directory/opt/tenzir/etc/tenzir/
    • Directorypackages/
      • Directoryyour-package/
        • Directoryoperators/
        • Directorypipelines/
        • config.yaml The configuration for the package
        • package.yaml The package manifest with metadata
    • tenzir.yaml

Inside the packages directory, each installed package has its own directory. The directory name matches the package ID.

The node searches for packages in the following locations:

  1. The packages directory in all configuration directories.
  2. All directories specified in the tenzir.package-dirs configuration option.

To provide inputs in IaC-mode, place a config.yaml file next to the package.yaml file. For example, this configuration sets the inputs endpoint and policy:

config.yaml
inputs:
endpoint: localhost:42000
policy: block

Last updated: