Skip to content

Getting Started with Helmit

Command-Line Tools

The helmit command-line tool is used to run tests, benchmarks, and simulations inside a Kubernetes cluster. To install the helmit CLI use go get. Helmit uses Go modules for dependency management. When installing the helmit command, ensure Go modules are enabled:

GO111MODULE=on go get github.com/onosproject/helmit/cmd/helmit

Helmit uses Go modules for dependency management. Go modules must be enabled when installing the binary.

To use the Helmit CLI, you must have kubectl installed and configured. Helmit will use the Kubernetes configuration to connect to the cluster to deploy and run tests.

The Helmit CLI consists of only three commands:

Each command deploys and runs pods which can deploy Helm charts from within the Kubernetes cluster using the Helm API. Each Helmit command supports configuring Helm values in the same way the helm command itself does.

The helmit sub-commands support an optional context within which to run tests. When the --context flag is set, the specified context directory will be copied to the Helmit pod running inside Kubernetes and set as the current working directory during runs:

helmit test ./cmd/tests --context ./deploy/charts

This allows suites to reference charts by path from within Helmit containers deployed inside Kubernetes:

helm.Chart("./atomix-controller").
    Release("atomix-controller-1").
    Install(true)

As with Helm, the helmit commands also support values files and flags:

helmit test ./cmd/tests -f atomix-controller-1=atomix-values.yaml --set atomix-controller-1.replicas=2

Because suites may install multiple Helm releases, values files and flags must be prefixed by the release name. For example, -f my-release=values.yaml will add a values file to the release named my-release, and --set my-release.replicas=3 will set the replicas value for the release named my-release.