Skip to content

Commit

Permalink
Update cli-admin-install.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SherinDaher-Runai committed Dec 17, 2024
1 parent b87425e commit 99df923
Showing 1 changed file with 67 additions and 24 deletions.
91 changes: 67 additions & 24 deletions docs/admin/config/cli-admin-install.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,102 @@
# Install the Run:ai Administrator Command-line Interface
# Administrator CLI

The Run:ai Administrator Command-line Interface (Administrator CLI) allows performing administrative tasks on the Run:ai Cluster.
The Run:ai Administrator (`runai-adm`) is a lightweight tool designed to support infrastructure administrators by simplifying two key tasks:

The instructions below will guide you through the process of installing the Administrator CLI.
* [Collecting logs](../troubleshooting/logs-collection.md) for troubleshooting and sharing with Run:ai support.
* Configuring [node roles](../config/node-roles.md) in the cluster for optimal performance and reliability.

!!! Tip
Most of the functionality of the Run:ai Administrator CLI has been removed. It now serves the limited purpose of collecting logs and setting node roles.
This article outlines the installation and usage of the Run:ai Administrator CLI to help you get started quickly.

## Prerequisites

* Run:ai Administrator CLI runs on Mac and Linux.
* Kubectl (Kubernetes command-line interface) is installed and configured to access your cluster. Please refer to [https://kubernetes.io/docs/tasks/tools/install-kubectl/](https://kubernetes.io/docs/tasks/tools/install-kubectl/){target=_blank}
* A Kubernetes configuration file obtained from a computer previously connected to the Kubernetes cluster
Before installing the CLI, review the following:

* __Operating system:__ The CLI is supported on Mac and Linux.
* __Kubectl:__ The Kubernetes command-line interface must be installed and configured to access your cluster. Follow the [official guide](https://kubernetes.io/docs/tasks/tools/){target=_blank}.
* __Cluster administrative permissions:__ The CLI requires a Kubernetes profile with administrative privileges.

## Kubernetes Configuration

The Run:ai Administrator CLI requires a Kubernetes profile with cluster administrative rights.
## Installation

To install the Run:ai Administrator CLI, ensure that the CLI version matches the version of your Run:ai cluster. You can either install the latest version or a specific version from the [list](https://runai.jfrog.io/ui/native/cli/runai-admin-cli/){target=_blank}.

## Installation
### Installing the latest version

Download the Run:ai Administrator Command-line Interface by running:
Use the following commands to download and install the latest version of the CLI:

=== "Mac"
``` bash
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/darwin # (1)
chmod +x runai-adm
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/darwin # (1)
chmod +x runai-adm
sudo mv runai-adm /usr/local/bin/runai-adm
```

1. In self-hosted environment, use the control-plane URL instead of `app.run.ai`
1. In self-hosted environment, use the control-plane URL instead of `app.run.ai`

=== "Linux"
``` bash
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/linux # (1)
chmod +x runai-adm
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/linux # (1)
chmod +x runai-adm
sudo mv runai-adm /usr/local/bin/runai-adm
```

1. In self-hosted environment, use the control-plane URL instead of `app.run.ai`

To verify the installation run:

```

### Installing a specific version

To install a specific version of the Administrator CLI that matches your Run:ai cluster version, append the version number to the download URL. Refer to the list of available versions linked above for the correct version number.

=== "Mac"
``` bash
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/<version>/darwin # Replace <version> with the desired version in the format vX.X.X (e.g., v2.19.5)
chmod +x runai-adm
sudo mv runai-adm /usr/local/bin/runai-adm
```

=== "Linux"
``` bash
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/<version>/linux # Replace <version> with the desired version in the format vX.X.X (e.g., v2.19.5)
chmod +x runai-adm
sudo mv runai-adm /usr/local/bin/runai-adm
```

### Verifying installation

Verify your installation completed successfully by running the following command:

``` bash
runai-adm version
```

### Download a specific version
## Reference

To download a specific version of `runai-adm` add the version number to URL. For example:
### Node roles

To set or remove node rules using the `runai-adm` tool, run the following:

``` bash
runai-adm set node-role [--runai-system-worker | --gpu-worker | --cpu-worker] <node-name>
```
wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/v2.7.22/darwin

``` bash
runai-adm remove node-role [--runai-system-worker | --gpu-worker | --cpu-worker] <node-name>
```
## Updating the Run:ai Administrator CLI

To update the CLI to the latest version perform the same install process again. The command `runai-adm update` is no longer supported.
!!! Note
Use the `--all` flag to set or remove a role to all nodes.

### Collect logs

To collect logs using the `runai-adm` tool:

1. Run the following command:

``` bash
runai-adm collect-logs
```

2. Locate the generated compressed log file.


0 comments on commit 99df923

Please sign in to comment.