Skip to main content
Interania

Admin Guide: Install the Interana CLI

2votes
15updates
262views
Elizabeth

This page walks you through the process of installing and configuring the Interana command line interface (CLI) on a local system, so you can manage remote clusters from one location.

Before you begin

 Make sure your local system meets the following requirements:

Linux Mac  Windows
Ubuntu 18.04 Mac OS X 10.8 or later Windows 10 or later

Python3.7  (Python included with Linux, may have to install latest version)

Python (Python Included with Mac OS, may have to install latest version, https://www.python.org/downloads/mac-osx/)

Python (may have to install latest version, https://www.python.org/downloads/windows/)

Terminal window Terminal window Command Prompt
sudo privileges sudo privileges Run as administrator

Installation overview

You can install and configure the Interana CLI with the following steps. Click a step to jump to the walkthrough instructions.

  1. Install the Interana CLI.
  2. Configure the Interana CLI.

1. Install the Interana CLI.

In this step, you install the Interana CLI on the system on which your are logged in. 

To install the Interana CLI, do the following:
 

Download the CLI wheel provided you to by your Interana Customer Operations contact. This wheel will install the CLI and all of the necessary dependencies.

Linux/Mac: In a shell window, type the command:

python3 -m pip install ~/Downloads/interana_cli-3.0.0b0-py2.py3-none-any.whl

Windows: In a command prompt while running as an administrator, type the command:

This will depend on what folder your Python program is in. One example would be:

C:\\Users\Interana\AppData\Local\Programs\Python\Python37\Scripts\pip.exe install \Users\Interana\Downloads\interana_cli-3.0.0b0-py2.py3-none-any.whl

2. Install the Interana CLI.

Before you can use the Interana CLI, it must be configured. This step walks you through the process of configuring the CLI in either of the following ways:

  • Default cluster — Configure the login credentials for the default cluster on which Interana has been provisioned and installed. This allows you to manage the cluster remotely with the CLI.
  • Mulitple clusters — Configure the login credentials for the clusters on which Interana has been provisioned and installed, and save the authentication profile under the specified cluster name. This allows you to manage multiple Interana clusters remotely with the CLI from one system. 

Interana must already be installed and provisioned on a cluster, or clusters, to be managed with the CLI. For more information, see the installation chapters of the Admin Guide.

Single Cluster Configuration

Before you begin, you must have login credentials for the cluster to be managed with the CLI and know the cluster URL. The HTTPS URL uses the fully qualified domain name (FQDN) of the instance to configure a connection with the cluster.

To configure the CLI to manage a single cluster, do the following:

  1. Linux/Mac: In a shell window, type the command:
ia config https://<default-cluster-address.com>

    Windows: In a command prompt while running as an administrator, type the command:

This will depend on what folder your Python program is in. One example would be:

C:\\Users\Interana\AppData\Local\Programs\Python\Python37\Scripts\ia.exe config https://<default-cluster-address.com>

You receive a response similar to the following:

Visit https://mycluster.interana.com/api/create_token and supply your new API token.
  1. Click https://mycluster.interana.com/api/create_token, and you receive a generated token similar to the following.

  1. Enter the token value as it appears (between the "") when you are prompted for the API key, and then press Enter. You are notified that the credentials are configured.
Enter API Key: <pasted token value is not visible>
 
Success! Credentials stored as default config
  1. You can begin using the Interana CLI. For more information, see the Interana CLI Reference.

Multiple cluster configuration

You can configure the Interana CLI to run on multiple clusters. This allows you to manage the clusters remotely from one system. 

Perform this procedure for each Interana cluster you want to manage remotely.

With multiple cluster configuration process, you save the authentication profile under the specified cluster name. You do this using the --instance-name option in conjunction with the cluster URL to specify the cluster on which the CLI is to be configured. 

To configure the CLI to manage multiple clusters, do the following:

  1. In a shell window, type the following command.
ia config https://<mycluster2.address.com> --instance-name <cluster2_name>

You receive a response similar to the following:

Visit https://mycluster.interana.com/api/create_token and supply your new API token.
  1. Click https://mycluster.interana.com/api/create_token, and you receive a generated token similar to the following.

  1. Enter the token value as it appears (between the "") when you are prompted for the API key, and then press Enter. You are notified that the credentials are configured.
Enter API Key: <pasted token value is not shown>
 
Success! Credentials stored as default config
  1. You can begin using the Interana CLI. For more information, see the Interana CLI Reference.