We’re trying to automate kots install via curl. We have, but we’re working around interactive prompts by using bash’s expect tool, which is undesirable if there’s another way.
Hi,
There are some environment variables that can be set to bypass the interactive prompts and configure the installation.
When first running the install script an interactive prompt will ask for an install directory, and usually appears like:
Please provide the full path to an installation directory that can be written to. If none
is provided in 15 seconds, then /usr/local/bin will be used.
installation directory [/usr/local/bin]:
This can be overridden and the interactive prompt skipped by setting the environment variable REPL_INSTALL_PATH
to where you would like kots to be installed, for example REPL_INSTALL_PATH=/usr/local/bin
Additionally, if the user running the install script does not have write permission on installation directory, the install script will fail unless the environment variable REPL_USE_SUDO
is set, for example REPL_USE_SUDO=y
.
So putting everything together in an example, if you want to install kots to /usr/bin and that requires sudo, the following command would work:
curl https://kots.io/install | REPL_INSTALL_PATH=/usr/bin REPL_USE_SUDO=y bash
There are a few more options also described in this document: Installing the kots CLI | Replicated Docs