Skip to main content

Installing and using Otomi CLI

Prerequisites

  • Docker
  • Bash v4

Otomi CLI only supports bash versions greater than 4. Install or upgrade on Mac OS:

brew install bash

Install the CLI

Installer script

# Using wget
wget -O- https://git.io/otomi-cli-installer | bash
# Using curl
curl -L https://git.io/otomi-cli-installer | bash

Manual installation

Using wget

# Using wget
wget https://git.io/otomi-cli -O otomi && chmod +x otomi
# Using curl
curl https://git.io/otomi-cli -o otomi && chmod +x otomi

This will download otomi into the current directory

Using the CLI

Running any otomi command will pull the values' otomi.version image tag.

The image used is rather large, so this might take some time.

The total compressed size of the base image with all the tools in use is close to 1Gi, and shows close to 2Gi uncompressed.

To use the CLI you can run:

otomi --help

To find the options available.

Single run

To run otomi without installing the CLI, you can run the following command:

bash <(wget -q -O- https://git.io/otomi-cli) <COMMAND HERE>

Command Reference

CommandDescription
otomi applyApply all, or supplied, K8S resources
otomi bashRun interactive bash shell in otomi-core container
otomi bootstrapBootstrap values repo with artifacts corresponding to the cluster's stack version
otomi check-policiesCheck if generated manifests adhere to defined OPA policies
otomi commitExecute wrapper for generate pipelines -> git commit changed files
otomi decrypt [files..]Decrypts file(s), given as arguments, or any file matching secrets.*.yaml in the values repository
otomi destroyDestroy all, or supplied, K8S resources
otomi diffDiff all, or supplied, K8S resources
otomi encrypt [files..]Encrypts file(s), given as arguments, or any file matching secrets.*.yaml in the values repository
otomi lintUses helmfile lint to lint the target manifests
otomi pullWrapper for git pull && otomi bootstrap
otomi rotate-keysRotate keys for all the sops secrets in the values repository
otomi statusShow cluster status
otomi syncSync all, or supplied, K8S resources
otomi template [outDir]Export all, or supplied, K8S resources
otomi testRun tests against the target cluster
otomi validate-templatesValidate generated manifests against supported k8s versions/CRDs and best practices
otomi validate-valuesValidate values for each cluster against JSON schema (takes target options)
otomi valuesShow helmfile values for target cluster
otomi xExecute command in container