CLI Install

The playground CLI supports multiple architectures and operating systems. We recommend the automatic installation using curl but we offer different methods to accommodate the common use cases.

Curl Installation

Before you start, make sure you have the curl command installed. In case of not running it as root, you will need to also have the su or sudo commands installed. By default, the playground CLI will be installed in the /usr/local/bin/ directory and root permissions are required to copy the binary. To proceed with the installation, just execute:

curl -O https://storage.googleapis.com/artifacts.playground.napptive.dev/installer.sh && bash installer.sh
...
playground installed into /usr/local/bin/ successfully.

***************************************************
* Playground installed successfully!              *
*                                                 *
* By proceeding, you are accepting the NAPPTIVE   *
* terms and conditions                            *
* https://napptive.com/terms-and-conditions       *
*                                                 *
* You can visit our documentation page            *
* for more information https://docs.napptive.com/ *
* ENJOY!!!                                        *
***************************************************

After that, the playground CLI will be available on the /usr/local/bin directory and by default should be also in your terminal PATH and ready to use.


Manual Installation

If you prefer to install the client manually because you want to install it in another directory, you do not have root permissions, or any other reason, proceed with the following steps:

Obtaining the CLI

To obtain the CLI use the cluster menu and select the option to get the Playground CLI

download CLI

Alternatively, go to the Downloads section and manually download the version that matches your operating system and architecture.

Installing the CLI

Assuming your file is downloaded on /<my_downloads_path>/playground_<version>.tgz, you can install the CLI with the following commands:

cd /<my_downloads_path>
tar xvzf playground_<version>.tgz
mkdir -p $HOME/.napptive/bin
cp playground/playground $HOME/.napptive/bin/.

Now let’s add the playground to the ${PATH} so that it can be used in any terminal session:

For Bash

echo export PATH=$PATH:$HOME/.napptive/bin >> $HOME/.bashrc
source $HOME/.bashrc

For ZSH

echo export PATH=$PATH:$HOME/.napptive/bin >> $HOME/.zshrc
source $HOME/.zshrc

MacOS specific steps

Sometimes, when MacOS cannot verify the developer, you may receive a notification about the application not being trusted:

MacOS warning

To use the playground, you need to trust the application. Go to System Preferences -> Security & Privacy -> General and enable the blocked application from Allow apps downloaded from pane at the bottom of the window.

Authorize


Launching the CLI with Docker

Alternatively, we provide a docker image for the Playground CLI for situations where installing the CLI locally is not possible. To use it, we recommend relying on a Personal Access Token as the mechanism to easily log into the system. The classic OAuth login while possible, it is not recommended through docker. After creating the PAT, execute:

docker run --env PLAYGROUND_PAT="<YOUR_PAT>" -v $HOME/.napptive:/root/.napptive napptive/playground:latest login --pat

After that, you can issue any command for the playground with:

docker run -v $HOME/.napptive:/root/.napptive napptive/playground:latest <cmd>

Install on Windows

  • Download the required release and unzip the package.

  • Append the playground binary folder to your PATH environment variable. System -> Advance System settings -> Environment variables

Advance System settings

environment variables

  • Open a command prompt to use the playground client.

Cmd-prompt

The first time you execute the playground command you may receive a notification about the CLI being blocked by the firewall.

firewall

To proceed, please allow communication from the CLI selecting the appropriate network depending on your case.


Use of local storage

The CLI will create and use ${HOME}/.napptive to store information about the installation and logged sessions. Each time you log into the platform, a kubeconfig file with for the selected environment is automatically created on ${HOME}/.napptive/default/napptive-kubeconfig. For more information about support for on-premise clusters and their configuration check the on-premise configuration guide.


Help my installation failed

Check if any of the cases applies, or contact support.

  • exec: "xdg-open": executable file not found in $PATH

In some environments, the library to open the default browser for the login process may not be available (e.g., wsl subsystem for Windows). To solve the issue execute:

sudo ln -s ../../bin/wslview /usr/local/bin/xdg-open

What’s next