Installation

Pre-compiled binary

Stackable ships pre-compiled binaries of stackablectl which should work on most environments such as Windows, macOS, and Linux distros like Ubuntu and Arch.

Below are the installation instructions for Linux, macOS and Windows. If the binary does not work for you, you can always Build stackablectl from source

Linux

Download the stackablectl-x86_64-unknown-linux-gnu binary file from the latest release, then rename the file to stackabelctl. You can also use the following command:

$ curl -L -o stackablectl https://github.com/stackabletech/stackablectl/releases/latest/download/stackablectl-x86_64-unknown-linux-gnu

and mark it as executable:

$ chmod +x stackablectl

You can now invoke it with:

$ ./stackablectl

If you want to be able to call it from everywhere (not only the directory you downloaded it to) you can add it to your system with the following command:

$ sudo mv stackablectl /usr/bin/stackablectl

Windows

Download stackablectl-x86_64-pc-windows-gnu.exe from the latest release. You can simply execute it. If you want to execute it from anywhere in your system, you need to add it to the system PATH.

macOS

Download the stackablectl-x86_64-apple-darwin binary file for Intel based Macs or stackablectl-aarch64-apple-darwin binary file for ARM based Macs from the latest release. Then rename the file to stackablectl:

$ mv stackablectl-x86_64-apple-darwin stackablectl
# or
$ mv stackablectl-aarch64-apple-darwin stackablectl

and mark it as executable:

$ chmod +x stackablectl

You can now invoke it with:

$ ./stackablectl

If macOS denies the execution of stackablectl go to SettingsSecurity & PrivacyGeneral. Here you will see a pop up asking if you want to allow access for stackablectl. You must allow access.

Build stackablectl from source

To build stackablectl from source you need to have the following tools installed:

  • Rust compiler

    • Needed for compiling source code of stackablectl itself

  • Go compiler

    • Needed for compiling a wrapper around the Go lib go-helm-client

  • C compiler

    • As we use the vendored feature of the openssl crate a C compiler is needed to compile openssl from source

  • Perl

    • As we use the vendored feature of the openssl crate perl is needed to compile openssl from source

  • Make

    • As we use the vendored feature of the openssl crate Make is needed to compile openssl from source

If you have the required tools available, you need to clone the stackablectl repo https://github.com/stackabletech/stackablectl and invoke the build with

$ cargo build --release

After a successful build the binary will be placed in target/release/stackablectl. Copy it to your systems path to access it from anywhere if you like.

$ sudo cp target/release/stackablectl /usr/bin/stackablectl

Configure auto-completion

stackablectl provides completion scripts for the major shells out there. It uses the same mechanism as kubectl does, so if you have any problems following this steps, looking at their installation documentation may help you out.

All of the supported shells of clap_complete are supported. As of 07/2022 this includes the following shells:

Bash

The stackablectl completion script for Bash can be generated with the command stackablectl completion bash. Sourcing the completion script in your shell enables stackablectl autocompletion.

Install the package bash-completion e.g. via apt install bash-completion.

After that run the following command to source the completion script and tell bash to source it every time you start a new shell.

$ source <(stackablectl completion bash)
$ echo 'source <(stackablectl completion bash)' >> ~/.bashrc

Fish

The stackablectl completion script for Fish can be generated with the command stackablectl completion fish. Sourcing the completion script in your shell enables stackablectl autocompletion.

$ stackablectl completion fish | source
$ echo 'stackablectl completion fish | source' >> ~/.config/fish/config.fish

PowerShell

The stackablectl completion script for PowerShell can be generated with the command stackablectl completion powershell.

To do so in all your shell sessions, add the following line to your $PROFILE file:

kubectl completion powershell | Out-String | Invoke-Expression

This command will regenerate the auto-completion script on every PowerShell start up.

Zsh

The stackablectl completion script for Zsh can be generated with the command stackablectl completion zsh. Sourcing the completion script in your shell enables stackablectl autocompletion.

$ source <(stackablectl completion zsh)
$ echo 'source <(stackablectl completion zsh)' >> ~/.zshrc