Cloudera Altus Client Setup

To set up the Cloudera Altus client, complete the following tasks:

Install the Altus client.

Generate an API access key.

Configure the Altus client with an access key.

Installing the Altus Client

You can install the Altus client through pip on Linux, macOS, or Windows. The Altus client works with Python version 2.7 or version 3.4 or later. Cloudera recommends that you install
Python version 3.6 or later.

Installing the Altus Client on Linux

To avoid conflicts with older versions of Python or other packages, Cloudera recommends that you install the Cloudera Altus client in a virtual environment. Use the virtualenv tool to create a virtual environment and install the client.

The following commands show how you can use pip to install the client on a virtual environment:

Installing the Altus Client on Windows

Add the Python home and scripts directories to the Windows PATH environment variable.

The Python directory can vary for different versions of Python and different versions of Windows. For example, on the Windows 2016 server, the Python 3.6.1 home directory and the scripts
directory are in the following locations:

Use the following commands to verify that Python and pip are correctly installed:

python --version
pip --version

Use pip to install the Altus client using the following command:

pip install altuscli

Use the following command to verify that the Altus client is correctly installed:

altus --version

To upgrade the client to the latest version, run the following command:

pip install --upgrade altuscli

Generating an API Access Key

Cloudera Altus manages access to Altus services so that only registered users can run commands to create clusters and run jobs.

The Altus client requires an access key to make service requests. Configure the client with an access key so that you can run commands to deploy clusters and run jobs. When you configure
the client with your access key, Altus creates a credentials file so that you do not need to submit your access key with each command.

Use the Cloudera Altus console to generate an access key. The API access key consists of an access key ID and a private key.

Altus creates the key and displays the information on the screen. The following image shows an example of an Altus API access key as displayed on the Altus console:

Note: The Cloudera Altus console displays the API access key immediately after you create it. You must copy or download the access key ID and
private key information when it is displayed. Do not exit the console without copying the private key. After you exit the console, there is no other way to view or copy the private key.

Configuring the Altus Client with the API Access Key

After you generate the access key, go to the command line and use the CLI to configure the client.

To configure the client with an Altus API access key:

On the command line, run the following command to configure the client with the access key:

altus configure

Enter the following information at the prompt:

Altus Access key. Copy and paste the access key ID that you generated in the Cloudera Altus console.

Altus Private key. Copy and paste the private key that you generated in the Cloudera Altus console. The private key is a very long string of characters.
Make sure that you enter the full string.

The configuration utility creates the following file to store your user credentials: ~/.altus/credentials

To verify that the credentials were created correctly, run the following command:

altus iam get-user

The command displays your Altus client credentials.

After you configure the client, you can go back to the Cloudera Altus console and click OK to exit the access key window.

If this documentation includes code, including but not limited to, code examples, Cloudera makes this available to you under the terms of the Apache License, Version 2.0, including any required
notices. A copy of the Apache License Version 2.0 can be found here.