Installing task as a pre-requisite

Task is a pre-requisite to provision Keycloak Benchmark to Kubernetes. It needs to be installed before the installation can begin.

Installing task

The recommended installation is to download the latest binary from task’s GitHub releases and put it into the user’s ~/bin directory.

The installation guide is available in the Task installation guide.

The minimum version needed is v3.28.0.

On Fedora and other Linux distributions, the user can also install the package go-task. If a user chooses to do so, the binary is called go-task (instead of task). Users then need to execute go-task in all the places this manual asks to run task, or create an alias for that command.

Optional installation steps for task

Add the following snippet to the file ~/.bashrc to allow auto-completion of task commands.

_task_completion()
{
  local scripts;
  local curr_arg;

  # Remove colon from work breaks
  COMP_WORDBREAKS=${COMP_WORDBREAKS//:}

  scripts=$(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }');

  curr_arg="${COMP_WORDS[COMP_CWORD]:-"."}"

  # Do not accept more than 1 argument
  if [ "${#COMP_WORDS[@]}" != "2" ]; then
    return
  fi

  COMPREPLY=($(compgen -c | echo "$scripts" | grep $curr_arg));
}

complete -F _task_completion task

Verifying the installation of task

The command:

task --version

Should print an output like:

Task version: v3.13.0 (h1:...)